lib/sucker/request.rb in sucker-1.1.0 vs lib/sucker/request.rb in sucker-1.1.1

- old
+ new

@@ -83,17 +83,22 @@ # def associate_tags=(tokens) @associate_tags = tokens end + def curl + warn "[DEPRECATION] `curl` is deprecated. Use `curl_opts` instead." + curl_opts + end + # Returns options for curl and yields them if given a block # # worker = Sucker.new # worker.curl { |c| c.interface = "eth1" } # def curl_opts - @curl_opts ||= CurlOptions.new + @curl_opts ||= OpenStruct.new yield @curl_opts if block_given? @curl_opts.marshal_dump end @@ -111,12 +116,12 @@ end Response.new(curl) end - # Performs a request for all locales, returns an array of responses, and - # yields them if given a block + # Performs a request for all locales, returns an array of responses, and yields + # them if given a block # # worker = Sucker.new # # # This blocks until all requests are complete # responses = worker.get_all @@ -229,9 +234,6 @@ def timestamp { "Timestamp" => Time.now.utc.strftime('%Y-%m-%dT%H:%M:%SZ') } end end - - # Curl options - class CurlOptions < OpenStruct; end end