Browse files

A different Gemfile for Mongoid 2

  • Loading branch information...
1 parent bdad09b commit 87e8b671575d13533cb0f2b18a7808f399b134d6 @maximeg committed Jun 15, 2012
Showing with 23 additions and 2 deletions.
  1. +1 −1 .gitignore
  2. +3 −0 .travis.yml
  3. +3 −0 Gemfile
  4. +11 −0 Gemfile.mongoid2
  5. +2 −0 Guardfile
  6. +2 −0 Rakefile
  7. +1 −1 mongoid_max_denormalize.gemspec
View
2 .gitignore
@@ -1,4 +1,4 @@
-Gemfile.lock
+Gemfile*.lock
log
mongoid_max_denormalize-*.gem
View
3 .travis.yml
@@ -1,4 +1,7 @@
rvm:
- 1.9.2
- 1.9.3
+gemfile:
+ - Gemfile
+ - Gemfile.mongoid2
View
3 Gemfile
@@ -4,3 +4,6 @@ gemspec
# For Travis
gem "rake"
+# We force Mongoid 3
+gem "mongoid", ">= 3.0.0.rc"
+
View
11 Gemfile.mongoid2
@@ -0,0 +1,11 @@
+source "http://rubygems.org"
+gemspec
+
+# For Travis
+gem "rake"
+
+# Specific to Mongoid 2
+gem "bson_ext"
+
+# run with: bundle install --gemfile=Gemfile.mongoid2
+
View
2 Guardfile
@@ -1,3 +1,5 @@
+ENV['BUNDLE_GEMFILE'] = "Gemfile.mongoid2" if ENV['MONGOID'] == "2"
+
guard(
'rspec',
:all_after_pass => false,
View
2 Rakefile
@@ -1,3 +1,5 @@
+ENV['BUNDLE_GEMFILE'] = "Gemfile.mongoid2" if ENV['MONGOID'] == "2"
+
require "bundler"
Bundler.setup
View
2 mongoid_max_denormalize.gemspec
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.test_files = Dir.glob("spec/**/*")
s.has_rdoc = false
- s.add_dependency "mongoid", ">= 3.0.0.rc"
+ s.add_dependency "mongoid", ">= 2.4"
s.add_dependency "activesupport", "~> 3.1"
s.add_development_dependency "rspec", "~> 2.9"

0 comments on commit 87e8b67

Please sign in to comment.