lib/schema_dev/rspec/db.rb in schema_dev-2.0.4 vs lib/schema_dev/rspec/db.rb in schema_dev-3.0.0
- old
+ new
@@ -24,10 +24,14 @@
def tmproot
@tmproot ||= Pathname.new('tmp').tap { |path| path.mkpath }
end
+ def logroot
+ @logroot ||= Pathname.new('log').tap { |path| path.mkpath }
+ end
+
def configuration
case @db
when 'mysql'
{
:adapter => 'mysql',
@@ -70,11 +74,11 @@
end
end
def set_logger
ruby = "#{RUBY_ENGINE}-#{RUBY_VERSION}"
- rails = "rails-#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"
- ActiveRecord::Base.logger = Logger.new(tmproot.join("#{ruby}.#{rails}.#{@db}.log").open("w"))
+ activerecord = "activerecord-#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}"
+ ActiveRecord::Base.logger = Logger.new(logroot.join("#{ruby}.#{activerecord}.#{@db}.log").open("w"))
end
module Helpers
extend self