lib/sucker/request.rb in sucker-1.1.3 vs lib/sucker/request.rb in sucker-1.1.4

- old
+ new

@@ -1,6 +1,7 @@ require "curb" +require "openssl" require "ostruct" require "uri" module Sucker #:nodoc: @@ -53,21 +54,25 @@ self.parameters.merge!(hash) end # Returns the associate tag for the current locale def associate_tag - @associate_tags[locale.to_sym] rescue nil + associate_tags[locale.to_sym] rescue nil end # Sets the associate tag for the current locale # # worker = Sucker.new # worker.associate_tag = 'foo-bar' # def associate_tag=(token) + associate_tags[locale.to_sym] = token + end + + # Gets the associate tags for all locales + def associate_tags @associate_tags ||= {} - @associate_tags[locale.to_sym] = token end # Sets associate tags for all locales # # You need a distinct associate tag for each locale. @@ -83,18 +88,13 @@ # 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" } + # worker.curl_opts { |c| c.interface = "eth1" } # def curl_opts @curl_opts ||= OpenStruct.new yield @curl_opts if block_given?