Gemfile in draper-1.0.0 vs Gemfile in draper-1.1.0

- old
+ new

@@ -6,18 +6,32 @@ gem "sqlite3" end platforms :jruby do gem "minitest", ">= 3.0" - gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.2.1" + gem "activerecord-jdbcsqlite3-adapter" end -case ENV["RAILS_VERSION"] +version = ENV["RAILS_VERSION"] || "3.2" + +rails = case version when "master" - gem "rails", github: "rails/rails" -when "3.2", nil - gem "rails", "~> 3.2.0" -when "3.1" - gem "rails", "~> 3.1.0" -when "3.0" - gem "rails", "~> 3.0.0" + {github: "rails/rails"} +else + "~> #{version}.0" end + +mongoid = case version +when "master" + {github: "mongoid/mongoid", branch: "4.0.0-dev"} +when "3.1", "3.2" + "~> 3.0.0" +end + +devise = case version +when "3.1", "3.2" + "~> 2.2" +end + +gem "rails", rails +gem "mongoid", mongoid if mongoid +gem "devise", devise if devise