Defect #41749 » 0001-Fixed-Unresolved-or-ambiguous-specs-during-Gem-Specification.reset-warning.patch
Gemfile | ||
---|---|---|
52 | 52 | |
53 | 53 |
# Include database gems for the adapters found in the database |
54 | 54 |
# configuration file |
55 |
require 'erb' |
|
56 |
require 'yaml' |
|
57 | 55 |
database_file = File.join(File.dirname(__FILE__), "config/database.yml") |
58 | 56 |
if File.exist?(database_file) |
59 |
yaml_config = ERB.new(IO.read(database_file)).result |
|
60 |
database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config) |
|
61 |
adapters = database_config.values.filter_map {|c| c['adapter']}.uniq |
|
57 |
database_config = File.read(database_file) |
|
58 |
adapters = database_config.scan(/^ *adapter: *(.*)/).flatten.uniq |
|
62 | 59 |
if adapters.any? |
63 | 60 |
adapters.each do |adapter| |
64 |
case adapter |
|
61 |
case adapter.strip
|
|
65 | 62 |
when 'mysql2' |
66 | 63 |
gem 'mysql2', '~> 0.5.0' |
67 | 64 |
gem "with_advisory_lock" |