lib/right_chimp/resources/Connection.rb in right_chimp-2.1.17 vs lib/right_chimp/resources/Connection.rb in right_chimp-2.1.18
- old
+ new
@@ -32,11 +32,13 @@
def self.connect
self.start_right_api_client
end
def self.start_right_api_client
- require 'yaml'
- require 'right_api_client'
+ # Make sure to configure safe_yaml properly
+ SafeYAML::OPTIONS[:default_mode] = :safe
+ SafeYAML::OPTIONS[:deserialize_symbols] = true
+
begin
creds = YAML.load_file("#{ENV['HOME']}/.rest_connection/rest_api_config.yaml")
# Extract the account
creds[:account] = File.basename(creds[:api_url])