# File lib/fog/core/service.rb, line 45 def new(options={}) # attempt to load credentials from config file begin default_credentials = Fog.credentials.reject {|key, value| !(recognized | requirements).include?(key)} options = default_credentials.merge(options) rescue LoadError # if there are no configured credentials, do nothing end validate_options(options) setup_requirements if Fog.mocking? service::Mock.send(:include, service::Collections) service::Mock.new(options) else service::Real.send(:include, service::Collections) service::Real.new(options) end end