Skip to content

Commit

Permalink
Loosen Bourne dependency to ~> 1.3
Browse files Browse the repository at this point in the history
> Use a pessimistic version in the Gemfile for gems that follow semantic
> versioning, such as rspec, factory_girl, and capybara.

https://github.com/thoughtbot/guides/tree/master/best-practices

* Upgrade dependencies so specs run on new Bourne.
* Use semantic versions in step_definitions gems.
* Rely on ActiveSupport::Dependencies.clear for reloading constants.
  http://rkh.im/code-reloading
  • Loading branch information
Dan Croak committed Mar 19, 2013
1 parent 9ca8ab9 commit b793604
Show file tree
Hide file tree
Showing 12 changed files with 240 additions and 220 deletions.
51 changes: 27 additions & 24 deletions Gemfile.lock
Expand Up @@ -3,7 +3,7 @@ PATH
specs: specs:
shoulda-matchers (1.5.0) shoulda-matchers (1.5.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
bourne (~> 1.2.0) bourne (~> 1.3)


GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
Expand Down Expand Up @@ -43,8 +43,8 @@ GEM
childprocess (~> 0.3.6) childprocess (~> 0.3.6)
cucumber (>= 1.1.1) cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0) rspec-expectations (>= 2.7.0)
bourne (1.2.1) bourne (1.4.0)
mocha (= 0.12.7) mocha (~> 0.13.2)
builder (3.0.4) builder (3.0.4)
childprocess (0.3.6) childprocess (0.3.6)
ffi (~> 1.0, >= 1.0.6) ffi (~> 1.0, >= 1.0.6)
Expand All @@ -53,29 +53,29 @@ GEM
diff-lcs (>= 1.1.3) diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0) gherkin (~> 2.11.0)
json (>= 1.4.6) json (>= 1.4.6)
diff-lcs (1.1.3) diff-lcs (1.2.1)
erubis (2.7.0) erubis (2.7.0)
ffi (1.2.0) ffi (1.2.0)
gherkin (2.11.5) gherkin (2.11.5)
json (>= 1.4.6) json (>= 1.4.6)
hike (1.2.1) hike (1.2.1)
i18n (0.6.1) i18n (0.6.4)
journey (1.0.4) journey (1.0.4)
json (1.7.6) json (1.7.7)
mail (2.4.4) mail (2.4.4)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
metaclass (0.0.1) metaclass (0.0.1)
mime-types (1.19) mime-types (1.19)
mocha (0.12.7) mocha (0.13.3)
metaclass (~> 0.0.1) metaclass (~> 0.0.1)
multi_json (1.5.0) multi_json (1.7.1)
polyglot (0.3.3) polyglot (0.3.3)
rack (1.4.4) rack (1.4.5)
rack-cache (1.2) rack-cache (1.2)
rack (>= 0.4) rack (>= 0.4)
rack-ssl (1.3.2) rack-ssl (1.3.3)
rack rack
rack-test (0.6.2) rack-test (0.6.2)
rack (>= 1.0) rack (>= 1.0)
Expand All @@ -95,21 +95,23 @@ GEM
rdoc (~> 3.4) rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0) thor (>= 0.14.6, < 2.0)
rake (10.0.3) rake (10.0.3)
rdoc (3.12) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
rspec (2.8.0) rspec (2.13.0)
rspec-core (~> 2.8.0) rspec-core (~> 2.13.0)
rspec-expectations (~> 2.8.0) rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.8.0) rspec-mocks (~> 2.13.0)
rspec-core (2.8.0) rspec-core (2.13.1)
rspec-expectations (2.8.0) rspec-expectations (2.13.0)
diff-lcs (~> 1.1.2) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.8.0) rspec-mocks (2.13.0)
rspec-rails (2.8.1) rspec-rails (2.13.0)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec (~> 2.8.0) rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
shoulda-context (1.0.1) shoulda-context (1.0.1)
sprockets (2.2.2) sprockets (2.2.2)
hike (~> 1.2) hike (~> 1.2)
Expand All @@ -121,8 +123,8 @@ GEM
actionpack (~> 3.1) actionpack (~> 3.1)
activemodel (~> 3.1) activemodel (~> 3.1)
railties (~> 3.1) railties (~> 3.1)
thor (0.16.0) thor (0.17.0)
tilt (1.3.3) tilt (1.3.6)
treetop (1.4.12) treetop (1.4.12)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
Expand All @@ -142,7 +144,8 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.0) rails (~> 3.0)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.8.1) rspec (~> 2.13)
rspec-rails (~> 2.13)
shoulda-context (~> 1.0.0) shoulda-context (~> 1.0.0)
shoulda-matchers! shoulda-matchers!
sqlite3 sqlite3
Expand Down
9 changes: 5 additions & 4 deletions features/step_definitions/rails_steps.rb
Expand Up @@ -25,8 +25,9 @@
And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile" And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile"
And I successfully run `bundle install --local` And I successfully run `bundle install --local`
} }

if RUBY_VERSION >= '1.9.3' if RUBY_VERSION >= '1.9.3'
append_to_gemfile %(gem 'rake', '~> 0.9.3.beta.1') append_to_gemfile %(gem 'rake', '~> 0.9')
step %(I successfully run `bundle update rake`) step %(I successfully run `bundle update rake`)
end end
end end
Expand All @@ -52,21 +53,21 @@
end end


When 'I configure the application to use rspec-rails' do When 'I configure the application to use rspec-rails' do
append_to_gemfile %q(gem 'rspec-rails', '~> 2.8.1') append_to_gemfile %q(gem 'rspec-rails', '~> 2.13')
steps %{And I run `bundle install --local`} steps %{And I run `bundle install --local`}
end end


When 'I configure the application to use rspec-rails in test and development' do When 'I configure the application to use rspec-rails in test and development' do
append_to_gemfile <<-GEMFILE append_to_gemfile <<-GEMFILE
group :test, :development do group :test, :development do
gem 'rspec-rails', '~> 2.8.1' gem 'rspec-rails', '~> 2.13'
end end
GEMFILE GEMFILE
steps %{And I run `bundle install --local`} steps %{And I run `bundle install --local`}
end end


When 'I configure the application to use shoulda-context' do When 'I configure the application to use shoulda-context' do
append_to_gemfile %q(gem 'shoulda-context', '~> 1.0.0') append_to_gemfile %q(gem 'shoulda-context', '~> 1.0')
steps %{And I run `bundle install --local`} steps %{And I run `bundle install --local`}
end end


Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.0.gemfile
@@ -1,6 +1,6 @@
# This file was generated by Appraisal # This file was generated by Appraisal


source "http://rubygems.org" source "https://rubygems.org"


gem "shoulda-context", "~> 1.0.0" gem "shoulda-context", "~> 1.0.0"
gem "sqlite3", :platform=>:ruby gem "sqlite3", :platform=>:ruby
Expand Down
116 changes: 60 additions & 56 deletions gemfiles/3.0.gemfile.lock
@@ -1,40 +1,40 @@
PATH PATH
remote: /Users/draper/Dropbox/Development/shoulda-matchers remote: /Users/croaky/dev/shoulda-matchers
specs: specs:
shoulda-matchers (1.5.0) shoulda-matchers (1.5.0)
activesupport (>= 3.0.0) activesupport (>= 3.0.0)
bourne (~> 1.2.0) bourne (~> 1.3)


GEM GEM
remote: http://rubygems.org/ remote: https://rubygems.org/
specs: specs:
abstract (1.0.0) abstract (1.0.0)
actionmailer (3.0.17) actionmailer (3.0.20)
actionpack (= 3.0.17) actionpack (= 3.0.20)
mail (~> 2.2.19) mail (~> 2.2.19)
actionpack (3.0.17) actionpack (3.0.20)
activemodel (= 3.0.17) activemodel (= 3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
builder (~> 2.1.2) builder (~> 2.1.2)
erubis (~> 2.6.6) erubis (~> 2.6.6)
i18n (~> 0.5.0) i18n (~> 0.5.0)
rack (~> 1.2.5) rack (~> 1.2.5)
rack-mount (~> 0.6.14) rack-mount (~> 0.6.14)
rack-test (~> 0.5.7) rack-test (~> 0.5.7)
tzinfo (~> 0.3.23) tzinfo (~> 0.3.23)
activemodel (3.0.17) activemodel (3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
builder (~> 2.1.2) builder (~> 2.1.2)
i18n (~> 0.5.0) i18n (~> 0.5.0)
activerecord (3.0.17) activerecord (3.0.20)
activemodel (= 3.0.17) activemodel (= 3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
arel (~> 2.0.10) arel (~> 2.0.10)
tzinfo (~> 0.3.23) tzinfo (~> 0.3.23)
activeresource (3.0.17) activeresource (3.0.20)
activemodel (= 3.0.17) activemodel (= 3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
activesupport (3.0.17) activesupport (3.0.20)
appraisal (0.5.1) appraisal (0.5.1)
bundler bundler
rake rake
Expand All @@ -43,80 +43,83 @@ GEM
childprocess (~> 0.3.6) childprocess (~> 0.3.6)
cucumber (>= 1.1.1) cucumber (>= 1.1.1)
rspec-expectations (>= 2.7.0) rspec-expectations (>= 2.7.0)
bourne (1.2.1) bourne (1.4.0)
mocha (= 0.12.7) mocha (~> 0.13.2)
builder (2.1.2) builder (2.1.2)
childprocess (0.3.6) childprocess (0.3.9)
ffi (~> 1.0, >= 1.0.6) ffi (~> 1.0, >= 1.0.11)
cucumber (1.2.1) cucumber (1.2.3)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.3) diff-lcs (>= 1.1.3)
gherkin (~> 2.11.0) gherkin (~> 2.11.6)
json (>= 1.4.6) multi_json (~> 1.3)
diff-lcs (1.1.3) diff-lcs (1.2.1)
erubis (2.6.6) erubis (2.6.6)
abstract (>= 1.0.0) abstract (>= 1.0.0)
ffi (1.3.1) ffi (1.4.0)
gherkin (2.11.5) gherkin (2.11.6)
json (>= 1.4.6) json (>= 1.7.6)
i18n (0.5.0) i18n (0.5.0)
json (1.7.6) json (1.7.7)
mail (2.2.19) mail (2.2.19)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
i18n (>= 0.4.0) i18n (>= 0.4.0)
mime-types (~> 1.16) mime-types (~> 1.16)
treetop (~> 1.4.8) treetop (~> 1.4.8)
metaclass (0.0.1) metaclass (0.0.1)
mime-types (1.19) mime-types (1.21)
mocha (0.12.7) mocha (0.13.3)
metaclass (~> 0.0.1) metaclass (~> 0.0.1)
multi_json (1.7.1)
polyglot (0.3.3) polyglot (0.3.3)
rack (1.2.7) rack (1.2.8)
rack-mount (0.6.14) rack-mount (0.6.14)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (0.5.7) rack-test (0.5.7)
rack (>= 1.0) rack (>= 1.0)
rails (3.0.17) rails (3.0.20)
actionmailer (= 3.0.17) actionmailer (= 3.0.20)
actionpack (= 3.0.17) actionpack (= 3.0.20)
activerecord (= 3.0.17) activerecord (= 3.0.20)
activeresource (= 3.0.17) activeresource (= 3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
bundler (~> 1.0) bundler (~> 1.0)
railties (= 3.0.17) railties (= 3.0.20)
railties (3.0.17) railties (3.0.20)
actionpack (= 3.0.17) actionpack (= 3.0.20)
activesupport (= 3.0.17) activesupport (= 3.0.20)
rake (>= 0.8.7) rake (>= 0.8.7)
rdoc (~> 3.4) rdoc (~> 3.4)
thor (~> 0.14.4) thor (~> 0.14.4)
rake (10.0.3) rake (10.0.3)
rdoc (3.12) rdoc (3.12.2)
json (~> 1.4) json (~> 1.4)
rspec (2.8.0) rspec (2.13.0)
rspec-core (~> 2.8.0) rspec-core (~> 2.13.0)
rspec-expectations (~> 2.8.0) rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.8.0) rspec-mocks (~> 2.13.0)
rspec-core (2.8.0) rspec-core (2.13.1)
rspec-expectations (2.8.0) rspec-expectations (2.13.0)
diff-lcs (~> 1.1.2) diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.8.0) rspec-mocks (2.13.0)
rspec-rails (2.8.1) rspec-rails (2.13.0)
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
railties (>= 3.0) railties (>= 3.0)
rspec (~> 2.8.0) rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
shoulda-context (1.0.2) shoulda-context (1.0.2)
sqlite3 (1.3.7) sqlite3 (1.3.7)
strong_parameters (0.1.6) strong_parameters (0.2.0)
actionpack (~> 3.0) actionpack (~> 3.0)
activemodel (~> 3.0) activemodel (~> 3.0)
railties (~> 3.0) railties (~> 3.0)
thor (0.14.6) thor (0.14.6)
treetop (1.4.12) treetop (1.4.12)
polyglot polyglot
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.35) tzinfo (0.3.37)


PLATFORMS PLATFORMS
ruby ruby
Expand All @@ -132,7 +135,8 @@ DEPENDENCIES
jruby-openssl jruby-openssl
rails (~> 3.0.17) rails (~> 3.0.17)
rake (>= 0.9.2) rake (>= 0.9.2)
rspec-rails (~> 2.8.1) rspec (~> 2.13)
rspec-rails (~> 2.13)
shoulda-context (~> 1.0.0) shoulda-context (~> 1.0.0)
shoulda-matchers! shoulda-matchers!
sqlite3 sqlite3
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/3.1.gemfile
@@ -1,6 +1,6 @@
# This file was generated by Appraisal # This file was generated by Appraisal


source "http://rubygems.org" source "https://rubygems.org"


gem "shoulda-context", "~> 1.0.0" gem "shoulda-context", "~> 1.0.0"
gem "sqlite3", :platform=>:ruby gem "sqlite3", :platform=>:ruby
Expand Down

0 comments on commit b793604

Please sign in to comment.