examples/aaws.rb in httparty-0.13.3 vs examples/aaws.rb in httparty-0.13.4
- old
+ new
@@ -2,11 +2,11 @@
require 'active_support'
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
require File.join(dir, 'httparty')
require 'pp'
-config = YAML::load(File.read(File.join(ENV['HOME'], '.aaws')))
+config = YAML.load(File.read(File.join(ENV['HOME'], '.aaws')))
module AAWS
class Book
include HTTParty
base_uri 'http://ecs.amazonaws.com'
@@ -14,10 +14,10 @@
def initialize(key)
self.class.default_params AWSAccessKeyId: key
end
- def search(options={})
+ def search(options = {})
raise ArgumentError, 'You must search for something' if options[:query].blank?
# amazon uses nasty camelized query params
options[:query] = options[:query].inject({}) { |h, q| h[q[0].to_s.camelize] = q[1]; h }