lib/s3sync/config.rb in s3sync-2.0.0 vs lib/s3sync/config.rb in s3sync-2.0.1

- old
+ new

@@ -61,11 +61,11 @@ # Time for the dirty work, let's parse the config file and feed our # internal hash if File.exists? path config = YAML.load_file path config.each_pair do |key, value| - self[key.upcase.to_sym] = value + self[key.upcase.to_s] = value end return end end @@ -81,15 +81,14 @@ def read # Reading from file and then trying from env paths_checked = read_from_file read_from_env + # Update the environment with the latest values + ENV.update(self.to_hash) + # Checking which variables we have not_found = [] - - REQUIRED_VARS.each {|v| - not_found << v if self[v].nil? - } # Cleaning possibly empty env var from CONFIG_PATH paths = (paths_checked || CONFIG_PATHS).select {|e| !e.empty?} raise NoConfigFound.new(not_found, paths) if not_found.count > 0 end