From ff0e6fb6c01b836f4176f500bcc249ed516b3b3d Mon Sep 17 00:00:00 2001 From: Joshua Clayton Date: Thu, 3 May 2012 00:36:58 -0400 Subject: [PATCH] Fix Appraisal dependencies and get suite green The twiddle-wakka specifying only major and minor (not tiny) versions will grab latest minor, which ended up being 3.2 for all versions of Rails supported. This ensures that when we report supporting Rails 3.0, 3.1, and 3.2, we actually test against those versions. It also backports ActiveSupport::Notifications.subscribed, which was added in 3.2. Closes #367 --- Appraisals | 6 +- Gemfile.lock | 80 +++++++++---------- gemfiles/3.0.gemfile | 2 +- gemfiles/3.0.gemfile.lock | 45 +++++------ gemfiles/3.1.gemfile | 2 +- gemfiles/3.1.gemfile.lock | 36 ++++----- gemfiles/3.2.gemfile | 2 +- gemfiles/3.2.gemfile.lock | 18 ++--- .../activesupport_instrumentation_spec.rb | 13 +++ 9 files changed, 105 insertions(+), 99 deletions(-) diff --git a/Appraisals b/Appraisals index 11c67b9..322e71b 100644 --- a/Appraisals +++ b/Appraisals @@ -1,11 +1,11 @@ appraise "3.0" do - gem "activerecord", "~> 3.0" + gem "activerecord", "~> 3.0.0" end appraise "3.1" do - gem "activerecord", "~> 3.1" + gem "activerecord", "~> 3.1.0" end appraise "3.2" do - gem "activerecord", "~> 3.2" + gem "activerecord", "~> 3.2.0" end diff --git a/Gemfile.lock b/Gemfile.lock index 841d841..640fe5c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,36 +7,31 @@ PATH GEM remote: http://rubygems.org/ specs: - activemodel (3.1.0) - activesupport (= 3.1.0) - bcrypt-ruby (~> 3.0.0) + activemodel (3.2.3) + activesupport (= 3.2.3) builder (~> 3.0.0) - i18n (~> 0.6) - activerecord (3.1.0) - activemodel (= 3.1.0) - activesupport (= 3.1.0) - arel (~> 2.2.1) + activerecord (3.2.3) + activemodel (= 3.2.3) + activesupport (= 3.2.3) + arel (~> 3.0.2) tzinfo (~> 0.3.29) - activesupport (3.1.0) + activesupport (3.2.3) + i18n (~> 0.6) multi_json (~> 1.0) appraisal (0.4.1) bundler rake - arel (2.2.1) - aruba (0.4.6) - bcat (>= 0.6.1) - childprocess (>= 0.2.0) - cucumber (>= 1.0.2) - rdiscount (>= 1.6.8) - rspec (>= 2.6.0) - bcat (0.6.2) - rack (~> 1.0) - bcrypt-ruby (3.0.1) - bluecloth (2.1.0) - bourne (1.0) - mocha (= 0.9.8) + arel (3.0.2) + aruba (0.4.11) + childprocess (>= 0.2.3) + cucumber (>= 1.1.1) + ffi (>= 1.0.11) + rspec (>= 2.7.0) + bluecloth (2.2.0) + bourne (1.1.2) + mocha (= 0.10.5) builder (3.0.0) - childprocess (0.2.2) + childprocess (0.3.2) ffi (~> 1.0.6) cucumber (1.1.9) builder (>= 2.1.2) @@ -45,36 +40,35 @@ GEM json (>= 1.4.6) term-ansicolor (>= 1.0.6) diff-lcs (1.1.3) - ffi (1.0.9) + ffi (1.0.11) gherkin (2.9.3) json (>= 1.4.6) i18n (0.6.0) - json (1.6.6) - mocha (0.9.8) - rake - multi_json (1.0.3) - rack (1.3.3) + json (1.7.0) + metaclass (0.0.1) + mocha (0.10.5) + metaclass (~> 0.0.1) + multi_json (1.3.4) rake (0.9.2.2) - rdiscount (1.6.8) - rspec (2.6.0) - rspec-core (~> 2.6.0) - rspec-expectations (~> 2.6.0) - rspec-mocks (~> 2.6.0) - rspec-core (2.6.4) - rspec-expectations (2.6.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.6.0) - simplecov (0.6.1) - multi_json (~> 1.0) + rspec (2.9.0) + rspec-core (~> 2.9.0) + rspec-expectations (~> 2.9.0) + rspec-mocks (~> 2.9.0) + rspec-core (2.9.0) + rspec-expectations (2.9.1) + diff-lcs (~> 1.1.3) + rspec-mocks (2.9.0) + simplecov (0.6.2) + multi_json (~> 1.3) simplecov-html (~> 0.5.3) simplecov-html (0.5.3) - sqlite3 (1.3.4) + sqlite3 (1.3.6) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) term-ansicolor (1.0.7) timecop (0.3.5) - tzinfo (0.3.29) - yard (0.7.2) + tzinfo (0.3.33) + yard (0.8.1) PLATFORMS ruby diff --git a/gemfiles/3.0.gemfile b/gemfiles/3.0.gemfile index 68518b8..d2a3042 100644 --- a/gemfiles/3.0.gemfile +++ b/gemfiles/3.0.gemfile @@ -2,6 +2,6 @@ source "http://rubygems.org" -gem "activerecord", "~> 3.0" +gem "activerecord", "~> 3.0.0" gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/3.0.gemfile.lock b/gemfiles/3.0.gemfile.lock index 0a491aa..2b402a2 100644 --- a/gemfiles/3.0.gemfile.lock +++ b/gemfiles/3.0.gemfile.lock @@ -7,21 +7,20 @@ PATH GEM remote: http://rubygems.org/ specs: - activemodel (3.2.3) - activesupport (= 3.2.3) - builder (~> 3.0.0) - activerecord (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activesupport (3.2.3) - i18n (~> 0.6) - multi_json (~> 1.0) + activemodel (3.0.12) + activesupport (= 3.0.12) + builder (~> 2.1.2) + i18n (~> 0.5.0) + activerecord (3.0.12) + activemodel (= 3.0.12) + activesupport (= 3.0.12) + arel (~> 2.0.10) + tzinfo (~> 0.3.23) + activesupport (3.0.12) appraisal (0.4.1) bundler rake - arel (3.0.2) + arel (2.0.10) aruba (0.4.11) childprocess (>= 0.2.3) cucumber (>= 1.1.1) @@ -30,8 +29,8 @@ GEM bluecloth (2.2.0) bourne (1.1.2) mocha (= 0.10.5) - builder (3.0.0) - childprocess (0.3.1) + builder (2.1.2) + childprocess (0.3.2) ffi (~> 1.0.6) cucumber (1.1.9) builder (>= 2.1.2) @@ -43,12 +42,12 @@ GEM ffi (1.0.11) gherkin (2.9.3) json (>= 1.4.6) - i18n (0.6.0) - json (1.6.6) + i18n (0.5.0) + json (1.7.0) metaclass (0.0.1) mocha (0.10.5) metaclass (~> 0.0.1) - multi_json (1.2.0) + multi_json (1.3.4) rake (0.9.2.2) rspec (2.9.0) rspec-core (~> 2.9.0) @@ -58,23 +57,23 @@ GEM rspec-expectations (2.9.1) diff-lcs (~> 1.1.3) rspec-mocks (2.9.0) - simplecov (0.6.1) - multi_json (~> 1.0) + simplecov (0.6.2) + multi_json (~> 1.3) simplecov-html (~> 0.5.3) simplecov-html (0.5.3) - sqlite3 (1.3.5) + sqlite3 (1.3.6) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) term-ansicolor (1.0.7) timecop (0.3.5) - tzinfo (0.3.32) - yard (0.7.5) + tzinfo (0.3.33) + yard (0.8.1) PLATFORMS ruby DEPENDENCIES - activerecord (~> 3.0) + activerecord (~> 3.0.0) appraisal (~> 0.4) aruba bluecloth diff --git a/gemfiles/3.1.gemfile b/gemfiles/3.1.gemfile index 24d2ede..77d5fec 100644 --- a/gemfiles/3.1.gemfile +++ b/gemfiles/3.1.gemfile @@ -2,6 +2,6 @@ source "http://rubygems.org" -gem "activerecord", "~> 3.1" +gem "activerecord", "~> 3.1.0" gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/3.1.gemfile.lock b/gemfiles/3.1.gemfile.lock index 41af944..9774146 100644 --- a/gemfiles/3.1.gemfile.lock +++ b/gemfiles/3.1.gemfile.lock @@ -7,21 +7,21 @@ PATH GEM remote: http://rubygems.org/ specs: - activemodel (3.2.3) - activesupport (= 3.2.3) + activemodel (3.1.4) + activesupport (= 3.1.4) builder (~> 3.0.0) - activerecord (3.2.3) - activemodel (= 3.2.3) - activesupport (= 3.2.3) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activesupport (3.2.3) i18n (~> 0.6) + activerecord (3.1.4) + activemodel (= 3.1.4) + activesupport (= 3.1.4) + arel (~> 2.2.3) + tzinfo (~> 0.3.29) + activesupport (3.1.4) multi_json (~> 1.0) appraisal (0.4.1) bundler rake - arel (3.0.2) + arel (2.2.3) aruba (0.4.11) childprocess (>= 0.2.3) cucumber (>= 1.1.1) @@ -31,7 +31,7 @@ GEM bourne (1.1.2) mocha (= 0.10.5) builder (3.0.0) - childprocess (0.3.1) + childprocess (0.3.2) ffi (~> 1.0.6) cucumber (1.1.9) builder (>= 2.1.2) @@ -44,11 +44,11 @@ GEM gherkin (2.9.3) json (>= 1.4.6) i18n (0.6.0) - json (1.6.6) + json (1.7.0) metaclass (0.0.1) mocha (0.10.5) metaclass (~> 0.0.1) - multi_json (1.2.0) + multi_json (1.3.4) rake (0.9.2.2) rspec (2.9.0) rspec-core (~> 2.9.0) @@ -58,23 +58,23 @@ GEM rspec-expectations (2.9.1) diff-lcs (~> 1.1.3) rspec-mocks (2.9.0) - simplecov (0.6.1) - multi_json (~> 1.0) + simplecov (0.6.2) + multi_json (~> 1.3) simplecov-html (~> 0.5.3) simplecov-html (0.5.3) - sqlite3 (1.3.5) + sqlite3 (1.3.6) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) term-ansicolor (1.0.7) timecop (0.3.5) - tzinfo (0.3.32) - yard (0.7.5) + tzinfo (0.3.33) + yard (0.8.1) PLATFORMS ruby DEPENDENCIES - activerecord (~> 3.1) + activerecord (~> 3.1.0) appraisal (~> 0.4) aruba bluecloth diff --git a/gemfiles/3.2.gemfile b/gemfiles/3.2.gemfile index 4f25955..56641f9 100644 --- a/gemfiles/3.2.gemfile +++ b/gemfiles/3.2.gemfile @@ -2,6 +2,6 @@ source "http://rubygems.org" -gem "activerecord", "~> 3.2" +gem "activerecord", "~> 3.2.0" gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/3.2.gemfile.lock b/gemfiles/3.2.gemfile.lock index 8146fd7..bf7f72e 100644 --- a/gemfiles/3.2.gemfile.lock +++ b/gemfiles/3.2.gemfile.lock @@ -31,7 +31,7 @@ GEM bourne (1.1.2) mocha (= 0.10.5) builder (3.0.0) - childprocess (0.3.1) + childprocess (0.3.2) ffi (~> 1.0.6) cucumber (1.1.9) builder (>= 2.1.2) @@ -44,11 +44,11 @@ GEM gherkin (2.9.3) json (>= 1.4.6) i18n (0.6.0) - json (1.6.6) + json (1.7.0) metaclass (0.0.1) mocha (0.10.5) metaclass (~> 0.0.1) - multi_json (1.2.0) + multi_json (1.3.4) rake (0.9.2.2) rspec (2.9.0) rspec-core (~> 2.9.0) @@ -58,23 +58,23 @@ GEM rspec-expectations (2.9.1) diff-lcs (~> 1.1.3) rspec-mocks (2.9.0) - simplecov (0.6.1) - multi_json (~> 1.0) + simplecov (0.6.2) + multi_json (~> 1.3) simplecov-html (~> 0.5.3) simplecov-html (0.5.3) - sqlite3 (1.3.5) + sqlite3 (1.3.6) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) term-ansicolor (1.0.7) timecop (0.3.5) - tzinfo (0.3.32) - yard (0.7.5) + tzinfo (0.3.33) + yard (0.8.1) PLATFORMS ruby DEPENDENCIES - activerecord (~> 3.2) + activerecord (~> 3.2.0) appraisal (~> 0.4) aruba bluecloth diff --git a/spec/acceptance/activesupport_instrumentation_spec.rb b/spec/acceptance/activesupport_instrumentation_spec.rb index e50b89a..1999f31 100644 --- a/spec/acceptance/activesupport_instrumentation_spec.rb +++ b/spec/acceptance/activesupport_instrumentation_spec.rb @@ -1,5 +1,18 @@ require "spec_helper" +unless ActiveSupport::Notifications.respond_to?(:subscribed) + module SubscribedBehavior + def subscribed(callback, *args, &block) + subscriber = subscribe(*args, &callback) + yield + ensure + unsubscribe(subscriber) + end + end + + ActiveSupport::Notifications.extend SubscribedBehavior +end + describe "using ActiveSupport::Instrumentation to track factory interaction" do before do define_model("User", email: :string)