Skip to content

Commit e620dd1

Browse files
committed
[rake] replace deprecated db_config.spec_name
1 parent 94b2211 commit e620dd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/arjdbc/tasks/databases.rake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ module ActiveRecord::Tasks
55
DatabaseTasks.module_eval do
66

77
# @override patched to adapt jdbc configuration
8-
def each_current_configuration(environment, spec_name = nil)
8+
def each_current_configuration(environment, name = nil)
99
environments = [environment]
1010
environments << 'test' if environment == 'development'
1111

1212
environments.each do |env|
1313
ActiveRecord::Base.configurations.configs_for(env_name: env).each do |db_config|
14-
next if spec_name && spec_name != db_config.spec_name
14+
next if name && name != db_config.name
1515

1616
if db_config.database
17-
yield adapt_jdbc_config(db_config), db_config.spec_name, env
17+
yield adapt_jdbc_config(db_config), db_config.name, env
1818
end
1919
end
2020
end
@@ -38,7 +38,7 @@ module ActiveRecord::Tasks
3838
def adapt_jdbc_config(db_config)
3939
if db_config.adapter.start_with? 'jdbc'
4040
config = db_config.configuration_hash.merge(adapter: db_config.adapter.sub(/^jdbc/, ''))
41-
db_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(db_config.env_name, db_config.spec_name, config)
41+
db_config = ActiveRecord::DatabaseConfigurations::HashConfig.new(db_config.env_name, db_config.name, config)
4242
end
4343
db_config
4444
end

0 commit comments

Comments
 (0)