lib/onering/api.rb in onering-client-0.0.18 vs lib/onering/api.rb in onering-client-0.0.19

- old
+ new

@@ -30,11 +30,11 @@ class<<self def connect(options={}) # list all existing config files from least specific to most @_configfiles = ([options[:config]] + DEFAULT_OPTIONS_FILE).compact.select{|i| - File.exists?(File.expand_path(i)) + (File.exists?(File.expand_path(i)) rescue false) }.reverse # merge all config files with more-specific values overriding less-specific ones @_config = {} @_configfiles.each do |i| @@ -50,10 +50,10 @@ @_uri = Addressable::URI.parse("#{@_config['url'] || DEFAULT_BASE}/#{@_config['apiroot'] || DEFAULT_PATH}") end if @_uri @_pemfile = ([options[:pemfile], @_config['pemfile']]+DEFAULT_CLIENT_PEM).compact.select{|i| - File.exists?(File.expand_path(i)) + (File.exists?(File.expand_path(i)) rescue false) }.first if @_pemfile @_pem = File.read(File.expand_path(@_pemfile)) @_http = Net::HTTP.new(@_uri.host, (@_uri.port || 443))