Module: GemHelper::RailsShim
- Defined in:
- lib/gem_helper/rails_shim.rb
Class Method Summary collapse
- .config(file_path) ⇒ Object
- .load(config) ⇒ Object
- .load_config(config, file_path = 'geminstaller.yml') ⇒ Object
Class Method Details
.config(file_path) ⇒ Object
3 4 5 |
# File 'lib/gem_helper/rails_shim.rb', line 3 def self.config(file_path) YAML.load_file(File.join(RAILS_ROOT, 'config', file_path)) end |
.load(config) ⇒ Object
7 8 9 10 |
# File 'lib/gem_helper/rails_shim.rb', line 7 def self.load(config) self.load_config(config) self.load_config(config, 'geminstaller.local.yml') if Rails.env.test? end |
.load_config(config, file_path = 'geminstaller.yml') ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/gem_helper/rails_shim.rb', line 12 def self.load_config(config, file_path='geminstaller.yml') self.config(file_path)["gems"].each do |definition| if definition['lib'] != false && definition['version'] config.gem definition["name"], definition.symbolize_keys! end end end |