lib/api_signature/builder.rb in api_signature-0.1.2 vs lib/api_signature/builder.rb in api_signature-0.1.3

- old
+ new

@@ -4,11 +4,11 @@ require 'ostruct' module ApiSignature class Builder OPTIONS_KEYS = [ - :access_key, :secret, :request_method, :scheme, :host, :port, :path, :params, :timestamp + :access_key, :secret, :request_method, :path, :timestamp ].freeze delegate(*OPTIONS_KEYS, to: :@settings) delegate :expired?, to: :signature_generator @@ -27,14 +27,10 @@ 'X-Timestamp' => options[:timestamp], 'X-Signature' => signature } end - def string_headers - headers.map { |key, value| "#{key}:#{value}" }.join(' ') - end - def options { timestamp: timestamp, request_method: request_method, path: path, @@ -42,14 +38,9 @@ } end def signature @signature ||= signature_generator.generate_signature(secret) - end - - def url - klass = scheme.try(:downcase) == 'https' ? URI::HTTPS : URI::HTTP - klass.build(host: host, port: port, path: options[:path]) end private def signature_generator