Skip to content

Commit

Permalink
Fix - set vistor on nuldb adapter intialization in order to work with…
Browse files Browse the repository at this point in the history
… AR 3.2.1
  • Loading branch information
krasio authored and Matt Van Horn committed May 14, 2012
1 parent 9b8c269 commit 8c5ac84
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
34 changes: 17 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@ PATH
remote: .
specs:
activerecord-nulldb-adapter (0.2.1)
activerecord (>= 2.0.0, < 3.1)
activerecord (>= 2.0.0)

GEM
remote: http://rubygems.org/
specs:
activemodel (3.0.8)
activesupport (= 3.0.8)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activerecord (3.0.8)
activemodel (= 3.0.8)
activesupport (= 3.0.8)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
activesupport (3.0.8)
arel (2.0.10)
builder (2.1.2)
activemodel (3.2.1)
activesupport (= 3.2.1)
builder (~> 3.0.0)
activerecord (3.2.1)
activemodel (= 3.2.1)
activesupport (= 3.2.1)
arel (~> 3.0.0)
tzinfo (~> 0.3.29)
activesupport (3.2.1)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
builder (3.0.0)
diff-lcs (1.1.2)
i18n (0.5.0)
rake (0.9.2)
i18n (0.6.0)
multi_json (1.1.0)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
Expand All @@ -30,12 +31,11 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
tzinfo (0.3.27)
tzinfo (0.3.31)

PLATFORMS
ruby

DEPENDENCIES
activerecord-nulldb-adapter!
rake
rspec (>= 1.2.9)
2 changes: 1 addition & 1 deletion ginger_scenarios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def create_scenario(version)

# Rails 3 only works on Ruby 1.8.7 and 1.9.2
if %w[1.8.7 1.9.2].include?(RUBY_VERSION)
versions += %w(3.1.1 3.1.0 3.0.8)
versions += %w(3.2.1 3.1.1 3.1.0 3.0.8)
end
versions += %w( 2.3.14 2.3.8 2.3.5 2.3.4 2.3.3 2.3.2 )
versions += %w(
Expand Down
1 change: 1 addition & 0 deletions lib/active_record/connection_adapters/nulldb_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def initialize(config={})
@schema_path = config.fetch(:schema){ "db/schema.rb" }
@config = config.merge(:adapter => :nulldb)
super(nil, @logger)
@visitor = Arel::Visitors::ToSql.new self if defined?(Arel::Visitors::ToSql)
end

# A log of every statement that has been "executed" by this connection adapter
Expand Down

0 comments on commit 8c5ac84

Please sign in to comment.