Class: Forcer::ActionOptionsService
- Inherits:
-
Object
- Object
- Forcer::ActionOptionsService
- Defined in:
- lib/utilities/action_options_service.rb
Class Method Summary collapse
-
.load_config_file(old_options = {}) ⇒ Object
attempts to read salesforce org information from yaml.
Class Method Details
.load_config_file(old_options = {}) ⇒ Object
attempts to read salesforce org information from yaml
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/utilities/action_options_service.rb', line 7 def self.load_config_file( = {}) p "attempting to load configuration.yml" = {} .each do |k, v| .store(k.to_sym, v) end config_file_path = File.join(Dir.pwd, "/configuration.yml") return unless File.exists?(config_file_path) dest = [:dest] configuration = YAML.load_file(config_file_path).to_hash return if configuration[dest].nil? configuration[dest].each do |key, value| .store(key.to_sym, value.to_s) unless value.to_s.empty? end [:host] = "https://#{options[:host]}" unless [:host].include?("http") return end |