Permalink
Browse files

Merge pull request #74 from slbug/master

rails 4 support
  • Loading branch information...
2 parents 6f497bf + a421d5d commit 9d7dd14d9234a5b8b84182d9c103b2167bcb4ce7 @flyerhzm committed Aug 18, 2012
Showing with 184 additions and 1 deletion.
  1. +19 −0 Gemfile.rails-4-beta
  2. +159 −0 Gemfile.rails-4-beta.lock
  3. +5 −1 lib/bullet/dependency.rb
  4. +1 −0 test.sh
View
@@ -0,0 +1,19 @@
+# Use `bundle install` in order to install these gems
+# Use `bundle exec rake` in order to run the specs using the bundle
+source "http://rubygems.org"
+
+gemspec
+
+gem 'rails', github: 'rails/rails'
+gem 'journey', github: 'rails/journey'
+gem 'activerecord-deprecated_finders', github: 'rails/activerecord-deprecated_finders'
+gem 'sqlite3'
+gem 'mysql'
+gem 'activerecord-import'
+gem 'mongoid', github: 'slbug/mongoid'
+
+gem "rspec"
+gem "guard"
+gem "guard-rspec"
+
+gem "perftools.rb"
View
@@ -0,0 +1,159 @@
+GIT
+ remote: git://github.com/rails/activerecord-deprecated_finders.git
+ revision: fe150f26f009cef370658b7c19db1629b2448952
+ specs:
+ activerecord-deprecated_finders (0.0.1)
+
+GIT
+ remote: git://github.com/rails/journey.git
+ revision: e4755e0ba27a4d6863656031e7c1ce26a7413ca6
+ specs:
+ journey (2.0.0.20120723141804)
+
+GIT
+ remote: git://github.com/rails/rails.git
+ revision: 366eb7216edd4515d4c5491df6868dbf9fecd261
+ specs:
+ actionmailer (4.0.0.beta)
+ actionpack (= 4.0.0.beta)
+ mail (~> 2.4.4)
+ actionpack (4.0.0.beta)
+ activesupport (= 4.0.0.beta)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 2.0.0)
+ rack (~> 1.4.1)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ activemodel (4.0.0.beta)
+ activesupport (= 4.0.0.beta)
+ builder (~> 3.0.0)
+ activerecord (4.0.0.beta)
+ activemodel (= 4.0.0.beta)
+ activerecord-deprecated_finders (= 0.0.1)
+ activesupport (= 4.0.0.beta)
+ arel (~> 3.0.2)
+ activesupport (4.0.0.beta)
+ i18n (~> 0.6)
+ minitest (~> 3.2)
+ multi_json (~> 1.3)
+ tzinfo (~> 0.3.33)
+ rails (4.0.0.beta)
+ actionmailer (= 4.0.0.beta)
+ actionpack (= 4.0.0.beta)
+ activerecord (= 4.0.0.beta)
+ activesupport (= 4.0.0.beta)
+ bundler (~> 1.1)
+ railties (= 4.0.0.beta)
+ sprockets-rails (~> 1.0)
+ railties (4.0.0.beta)
+ actionpack (= 4.0.0.beta)
+ activesupport (= 4.0.0.beta)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (>= 0.15.4, < 2.0)
+
+GIT
+ remote: git://github.com/slbug/mongoid.git
+ revision: f1da2247a31f5db8b32eda01464e3bde4bb5943d
+ specs:
+ mongoid (3.1.0)
+ activemodel (>= 3.1)
+ moped (~> 1.2)
+ origin (~> 1.0)
+ tzinfo (~> 0.3.22)
+
+PATH
+ remote: .
+ specs:
+ bullet (4.1.6)
+ uniform_notifier (~> 1.0.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activerecord-import (0.2.0)
+ rails (>= 3.0.0rc)
+ arel (3.0.2)
+ builder (3.0.0)
+ diff-lcs (1.1.3)
+ erubis (2.7.0)
+ ffi (1.1.5)
+ guard (1.3.2)
+ listen (>= 0.4.2)
+ thor (>= 0.14.6)
+ guard-rspec (1.2.1)
+ guard (>= 1.1)
+ hike (1.2.1)
+ i18n (0.6.0)
+ json (1.7.5)
+ listen (0.4.7)
+ rb-fchange (~> 0.0.5)
+ rb-fsevent (~> 0.9.1)
+ rb-inotify (~> 0.8.8)
+ mail (2.4.4)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.19)
+ minitest (3.3.0)
+ moped (1.2.0)
+ multi_json (1.3.6)
+ mysql (2.8.1)
+ origin (1.0.6)
+ perftools.rb (2.0.0)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2.2)
+ rb-fchange (0.0.5)
+ ffi
+ rb-fsevent (0.9.1)
+ rb-inotify (0.8.8)
+ ffi (>= 0.5.0)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.11.0)
+ rspec-core (~> 2.11.0)
+ rspec-expectations (~> 2.11.0)
+ rspec-mocks (~> 2.11.0)
+ rspec-core (2.11.1)
+ rspec-expectations (2.11.2)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.11.2)
+ sprockets (2.3.2)
+ hike (~> 1.2)
+ multi_json (~> 1.0)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ sprockets-rails (1.0.0)
+ railties (>= 4.0.0.beta, < 5.0)
+ sprockets (~> 2.3.1)
+ sqlite3 (1.3.6)
+ thor (0.16.0)
+ tilt (1.3.3)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.33)
+ uniform_notifier (1.0.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord-deprecated_finders!
+ activerecord-import
+ bullet!
+ guard
+ guard-rspec
+ journey!
+ mongoid!
+ mysql
+ perftools.rb
+ rails!
+ rspec
+ sqlite3
View
@@ -24,7 +24,7 @@ def active_record_version
'active_record2'
elsif active_record30?
'active_record3'
- elsif active_record31? || active_record32?
+ elsif active_record31? || active_record32? || active_record4?
'active_record31'
end
end
@@ -60,6 +60,10 @@ def active_record3?
::ActiveRecord::VERSION::MAJOR == 3
end
+ def active_record4?
+ ::ActiveRecord::VERSION::MAJOR == 4
+ end
+
def active_record30?
active_record3? && ::ActiveRecord::VERSION::MINOR == 0
end
View
1 test.sh 100644 → 100755
@@ -2,3 +2,4 @@ bundle && bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-3.1.5 bundle && bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-3.0.13 bundle && bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-2.3.14 bundle && bundle exec rspec spec
+BUNDLE_GEMFILE=Gemfile.rails-4-beta bundle && bundle exec rspec spec

0 comments on commit 9d7dd14

Please sign in to comment.