Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove Gemfile lockfiles #328

Closed
wants to merge 1 commit into from

2 participants

@petergoldstein

1) Added Ruby 2.0 to Travis CI matrix
2) Updated the Rails 4 version to the released version
3) Removed the lock files, so we can have different gemsets based on the platform
4) Restricted Mongoid to allowed platforms in Rails 3.2 Gemfile

All test matrix specs run green on Travis CI

@mislav
Owner

Four changes, single commit?

Removed the lock files, so we can have different gemsets based on the platform

What does this mean? What was the problem of lock files?

Restricted Mongoid to allowed platforms in Rails 3.2 Gemfile

What did this fix?

@petergoldstein

The changes are all related. They were required to get the Travis CI tests to green under the full matrix. I think (1) and (2) are self-explanatory and pretty simple.

When I attempted to run the tests on the master branch against the full matrix, I got an error on the Ruby 1.8.7 / Rails 3.2 combination. The error occurred on the loading of the Mongoid gem - Mongoid 3.x requires Ruby 1.9.2 or higher.

Remvoing the lock files and restricting Mongoid to Ruby 1.9 or Ruby 2.0 allows Travis to skip loading Mongoid for Ruby 1.8.7 and load it for the other rubies. That's the motivation for (3) and (4)

In theory (3) and (4) could have been packaged separately, but I wanted to submit a PR where the tests all ran green.

@mislav
Owner
@petergoldstein

Not quite. The Mongoid tests are actually being run for the Ruby 1.8.7 and Rails 3.2 combination. The test runs green for this combo only because the Gemfile for Rails 3.2 and the lockfile don't currently match.

The lockfile that is checked in hardcodes Mongoid at 2.4.11, a version that's at least a year old and not the most recent 2.x gem. Try running 'BUNDLE_GEMFILE=Gemfile.rails3.2 bundle update' under a Ruby 1.8.7 VM and it fails, because it attempts to load the latest Mongoid, which is a 3.x gem. The gemfile doesn't specify a 2.x version of Mongoid.

If you run the same command with a 1.9 or 2.0 VM, you'll see that the Mongoid gem in the lockfile gets upgraded to the 3.x branch, which is what you'd expect. The tests run clean against that version.

In fact, if you look at the test run here:

https://travis-ci.org/mislav/will_paginate/jobs/8315355

you can confirm that for Rails 3.2 under 1.8.7, the Mongoid tests aren't skipped (there's a warning message about bson_ext, and the warning message 'Error running Sequel specs: no such file to load -- mongoid' is NOT printed in this case). The tests are being run, but against the 2.4.11 version of Mongoid. That branch is not even the most recent 1.8.7 compatible version, so it doesn't really make sense to be running tests against it.

Similarly, the Ruby 1.9.3 and Ruby 2.0.0 tests are being run against this outdated version of Mongoid. While this runs green for Ruby 2.0.0, it's not actually a supported configuration.

Removing the lockfiles allows us to generate against recent versions of Mongoid, which are more likely to be in use. It also paves the way forward for making a bigger test matrix (running against the appropriate Mongoid version(s) for each VM, etc.)

@mislav mislav changed the title from Add Ruby 2.0 to Travis CI matrix and update Rails 4 to released version to Remove Gemfile lockfiles
@petergoldstein petergoldstein deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
1  .gitignore
@@ -1,4 +1,5 @@
.bundle
doc
+*.lock
*.gem
coverage
View
1  .travis.yml
@@ -8,6 +8,7 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
+ - 2.0.0
gemfile:
- Gemfile
- Gemfile.rails3.0
View
2  Gemfile
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-rails_version = '~> 4.0.0.rc2'
+rails_version = '~> 4.0.0'
gem 'activerecord', rails_version
gem 'actionpack', rails_version
View
86 Gemfile.lock
@@ -1,86 +0,0 @@
-GEM
- remote: https://rubygems.org/
- specs:
- actionpack (4.0.0.rc2)
- activesupport (= 4.0.0.rc2)
- builder (~> 3.1.0)
- erubis (~> 2.7.0)
- rack (~> 1.5.2)
- rack-test (~> 0.6.2)
- activemodel (4.0.0.rc2)
- activesupport (= 4.0.0.rc2)
- builder (~> 3.1.0)
- activerecord (4.0.0.rc2)
- activemodel (= 4.0.0.rc2)
- activerecord-deprecated_finders (~> 1.0.2)
- activesupport (= 4.0.0.rc2)
- arel (~> 4.0.0)
- activerecord-deprecated_finders (1.0.3)
- activesupport (4.0.0.rc2)
- i18n (~> 0.6, >= 0.6.4)
- minitest (~> 4.2)
- multi_json (~> 1.3)
- thread_safe (~> 0.1)
- tzinfo (~> 0.3.37)
- arel (4.0.0)
- atomic (1.1.9)
- builder (3.1.4)
- columnize (0.3.5)
- debugger (1.2.2)
- columnize (>= 0.3.1)
- debugger-linecache (~> 1.1.1)
- debugger-ruby_core_source (~> 1.1.5)
- debugger-linecache (1.1.2)
- debugger-ruby_core_source (>= 1.1.1)
- debugger-ruby_core_source (1.1.5)
- diff-lcs (1.1.3)
- erubis (2.7.0)
- i18n (0.6.4)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
- minitest (4.7.4)
- mocha (0.9.12)
- multi_json (1.7.7)
- mysql (2.9.0)
- mysql2 (0.3.11)
- pg (0.12.0)
- rake-compiler (~> 0.7)
- rack (1.5.2)
- rack-test (0.6.2)
- rack (>= 1.0)
- rake (0.9.2.2)
- rake-compiler (0.7.9)
- rake
- rbx-require-relative (0.0.5)
- 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)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
- sqlite3 (1.3.6)
- thread_safe (0.1.0)
- atomic
- tzinfo (0.3.37)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- actionpack (~> 4.0.0.rc2)
- activerecord (~> 4.0.0.rc2)
- debugger
- mocha (~> 0.9.8)
- mysql (~> 2.9)
- mysql2 (~> 0.3.10)
- pg (~> 0.11)
- rspec (~> 2.6.0)
- ruby-debug
- sqlite3 (~> 1.3.6)
View
107 Gemfile.rails-edge.lock
@@ -1,107 +0,0 @@
-GIT
- remote: git://github.com/rails/activerecord-deprecated_finders.git
- revision: f6ed71d62d47f0f6397b5b3e801271567f30f960
- branch: master
- specs:
- activerecord-deprecated_finders (1.0.3)
-
-GIT
- remote: git://github.com/rails/journey.git
- revision: f0938d664286dc0b47f13092fa5d04a9225038d4
- branch: master
- specs:
- journey (2.0.0.20120723141804)
-
-GIT
- remote: git://github.com/rails/rails.git
- revision: 12fe66b56479abc2ca399c002d38a7e81fce2eb2
- branch: master
- specs:
- actionpack (4.1.0.beta)
- actionview (= 4.1.0.beta)
- activesupport (= 4.1.0.beta)
- rack (~> 1.5.2)
- rack-test (~> 0.6.2)
- actionview (4.1.0.beta)
- activemodel (= 4.1.0.beta)
- activesupport (= 4.1.0.beta)
- builder (~> 3.1.0)
- erubis (~> 2.7.0)
- activemodel (4.1.0.beta)
- activesupport (= 4.1.0.beta)
- builder (~> 3.1.0)
- activerecord (4.1.0.beta)
- activemodel (= 4.1.0.beta)
- activerecord-deprecated_finders (~> 1.0.2)
- activesupport (= 4.1.0.beta)
- arel (~> 4.0.0)
- activesupport (4.1.0.beta)
- i18n (~> 0.6, >= 0.6.4)
- json (~> 1.7)
- minitest (~> 5.0)
- thread_safe (~> 0.1)
- tzinfo (~> 0.3.37)
-
-GEM
- remote: https://rubygems.org/
- specs:
- arel (4.0.0)
- atomic (1.1.9)
- builder (3.1.4)
- columnize (0.3.6)
- debugger (1.6.0)
- columnize (>= 0.3.1)
- debugger-linecache (~> 1.2.0)
- debugger-ruby_core_source (~> 1.2.1)
- debugger-linecache (1.2.0)
- debugger-ruby_core_source (1.2.2)
- diff-lcs (1.1.3)
- erubis (2.7.0)
- i18n (0.6.4)
- json (1.8.0)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
- minitest (5.0.5)
- mocha (0.9.12)
- mysql (2.9.1)
- mysql2 (0.3.11)
- pg (0.15.1)
- rack (1.5.2)
- rack-test (0.6.2)
- rack (>= 1.0)
- rbx-require-relative (0.0.9)
- 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)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
- sqlite3 (1.3.7)
- thread_safe (0.1.0)
- atomic
- tzinfo (0.3.37)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- actionpack!
- activerecord!
- activerecord-deprecated_finders!
- debugger
- journey!
- mocha (~> 0.9.8)
- mysql (~> 2.9)
- mysql2 (~> 0.3.10)
- pg (~> 0.11)
- rspec (~> 2.6.0)
- ruby-debug
- sqlite3 (~> 1.3.6)
- thread_safe
View
78 Gemfile.rails3.0.lock
@@ -1,78 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- abstract (1.0.0)
- actionpack (3.0.19)
- activemodel (= 3.0.19)
- activesupport (= 3.0.19)
- builder (~> 2.1.2)
- erubis (~> 2.6.6)
- i18n (~> 0.5.0)
- rack (~> 1.2.5)
- rack-mount (~> 0.6.14)
- rack-test (~> 0.5.7)
- tzinfo (~> 0.3.23)
- activemodel (3.0.19)
- activesupport (= 3.0.19)
- builder (~> 2.1.2)
- i18n (~> 0.5.0)
- activerecord (3.0.19)
- activemodel (= 3.0.19)
- activesupport (= 3.0.19)
- arel (~> 2.0.10)
- tzinfo (~> 0.3.23)
- activesupport (3.0.19)
- arel (2.0.10)
- builder (2.1.2)
- columnize (0.3.4)
- debugger (1.2.2)
- columnize (>= 0.3.1)
- debugger-linecache (~> 1.1.1)
- debugger-ruby_core_source (~> 1.1.5)
- debugger-linecache (1.1.2)
- debugger-ruby_core_source (>= 1.1.1)
- debugger-ruby_core_source (1.1.5)
- diff-lcs (1.1.2)
- erubis (2.6.6)
- abstract (>= 1.0.0)
- i18n (0.5.0)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
- mocha (0.9.12)
- mysql (2.8.1)
- pg (0.11.0)
- rack (1.2.6)
- rack-mount (0.6.14)
- rack (>= 1.0.0)
- rack-test (0.5.7)
- rack (>= 1.0)
- rbx-require-relative (0.0.5)
- 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)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
- sqlite3 (1.3.4)
- tzinfo (0.3.35)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- actionpack (~> 3.0.0)
- activerecord (~> 3.0.0)
- debugger
- mocha (~> 0.9.8)
- mysql (~> 2.8.1)
- pg (~> 0.11)
- rspec (~> 2.6.0)
- ruby-debug
- sqlite3 (~> 1.3.3)
View
93 Gemfile.rails3.1.lock
@@ -1,93 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- actionpack (3.1.12)
- activemodel (= 3.1.12)
- activesupport (= 3.1.12)
- builder (~> 3.0.0)
- erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.6)
- rack-cache (~> 1.2)
- rack-mount (~> 0.8.2)
- rack-test (~> 0.6.1)
- sprockets (~> 2.0.4)
- activemodel (3.1.12)
- activesupport (= 3.1.12)
- builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.12)
- activemodel (= 3.1.12)
- activesupport (= 3.1.12)
- arel (~> 2.2.3)
- tzinfo (~> 0.3.29)
- activesupport (3.1.12)
- multi_json (~> 1.0)
- arel (2.2.3)
- builder (3.0.4)
- columnize (0.3.6)
- debugger (1.2.2)
- columnize (>= 0.3.1)
- debugger-linecache (~> 1.1.1)
- debugger-ruby_core_source (~> 1.1.5)
- debugger-linecache (1.1.2)
- debugger-ruby_core_source (>= 1.1.1)
- debugger-ruby_core_source (1.1.5)
- diff-lcs (1.1.3)
- erubis (2.7.0)
- hike (1.2.3)
- i18n (0.6.4)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
- mocha (0.9.12)
- multi_json (1.7.7)
- mysql (2.8.1)
- mysql2 (0.3.11)
- pg (0.12.0)
- rake-compiler (~> 0.7)
- rack (1.3.10)
- rack-cache (1.2)
- rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
- rack-test (0.6.2)
- rack (>= 1.0)
- rake (0.9.2.2)
- rake-compiler (0.7.9)
- rake
- rbx-require-relative (0.0.5)
- 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)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
- sprockets (2.0.4)
- hike (~> 1.2)
- rack (~> 1.0)
- tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
- tilt (1.4.1)
- tzinfo (0.3.37)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- actionpack (~> 3.1.0)
- activerecord (~> 3.1.0)
- debugger
- mocha (~> 0.9.8)
- mysql (~> 2.8.1)
- mysql2 (>= 0.3.6)
- pg (~> 0.11)
- rspec (~> 2.6.0)
- ruby-debug
- sqlite3 (~> 1.3.3)
View
2  Gemfile.rails3.2
@@ -14,7 +14,7 @@ gem 'dm-core'
gem 'dm-aggregates'
gem 'dm-migrations'
gem 'dm-sqlite-adapter'
-gem 'mongoid'
+gem 'mongoid', '~> 3.0', :platforms => [:mri_19, :mri_20]
group :mysql do
gem 'mysql', '~> 2.8.1'
View
123 Gemfile.rails3.2.lock
@@ -1,123 +0,0 @@
-GEM
- remote: http://rubygems.org/
- specs:
- actionpack (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
- builder (~> 3.0.0)
- erubis (~> 2.7.0)
- journey (~> 1.0.4)
- rack (~> 1.4.5)
- rack-cache (~> 1.2)
- rack-test (~> 0.6.1)
- sprockets (~> 2.2.1)
- activemodel (3.2.13)
- activesupport (= 3.2.13)
- builder (~> 3.0.0)
- activerecord (3.2.13)
- activemodel (= 3.2.13)
- activesupport (= 3.2.13)
- arel (~> 3.0.2)
- tzinfo (~> 0.3.29)
- activesupport (3.2.13)
- i18n (= 0.6.1)
- multi_json (~> 1.0)
- addressable (2.2.6)
- arel (3.0.2)
- bson (1.6.4)
- builder (3.0.4)
- columnize (0.3.5)
- data_objects (0.10.7)
- addressable (~> 2.1)
- debugger (1.2.2)
- columnize (>= 0.3.1)
- debugger-linecache (~> 1.1.1)
- debugger-ruby_core_source (~> 1.1.5)
- debugger-linecache (1.1.2)
- debugger-ruby_core_source (>= 1.1.1)
- debugger-ruby_core_source (1.1.5)
- diff-lcs (1.1.3)
- dm-aggregates (1.2.0)
- dm-core (~> 1.2.0)
- dm-core (1.2.0)
- addressable (~> 2.2.6)
- dm-do-adapter (1.2.0)
- data_objects (~> 0.10.6)
- dm-core (~> 1.2.0)
- dm-migrations (1.2.0)
- dm-core (~> 1.2.0)
- dm-sqlite-adapter (1.2.0)
- dm-do-adapter (~> 1.2.0)
- do_sqlite3 (~> 0.10.6)
- do_sqlite3 (0.10.7)
- data_objects (= 0.10.7)
- erubis (2.7.0)
- hike (1.2.3)
- i18n (0.6.1)
- journey (1.0.4)
- linecache (0.46)
- rbx-require-relative (> 0.0.4)
- mocha (0.9.12)
- mongo (1.6.2)
- bson (~> 1.6.2)
- mongoid (2.4.11)
- activemodel (~> 3.1)
- mongo (<= 1.6.2)
- tzinfo (~> 0.3.22)
- multi_json (1.7.7)
- mysql (2.8.1)
- mysql2 (0.3.11)
- pg (0.12.0)
- rake-compiler (~> 0.7)
- rack (1.4.5)
- rack-cache (1.2)
- rack (>= 0.4)
- rack-test (0.6.2)
- rack (>= 1.0)
- rake (0.9.2.2)
- rake-compiler (0.7.9)
- rake
- rbx-require-relative (0.0.5)
- 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)
- ruby-debug (0.10.4)
- columnize (>= 0.1)
- ruby-debug-base (~> 0.10.4.0)
- ruby-debug-base (0.10.4)
- linecache (>= 0.3)
- sequel (3.30.0)
- sprockets (2.2.2)
- hike (~> 1.2)
- multi_json (~> 1.0)
- rack (~> 1.0)
- tilt (~> 1.1, != 1.3.0)
- sqlite3 (1.3.5)
- tilt (1.4.1)
- tzinfo (0.3.37)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- actionpack (~> 3.2.0)
- activerecord (~> 3.2.0)
- debugger
- dm-aggregates
- dm-core
- dm-migrations
- dm-sqlite-adapter
- mocha (~> 0.9.8)
- mongoid
- mysql (~> 2.8.1)
- mysql2 (>= 0.3.6)
- pg (~> 0.11)
- rspec (~> 2.6.0)
- ruby-debug
- sequel (~> 3.8)
- sqlite3 (~> 1.3.3)
Something went wrong with that request. Please try again.