lib/httpx/plugins/digest_authentication.rb in httpx-0.13.2 vs lib/httpx/plugins/digest_authentication.rb in httpx-0.14.0
- old
+ new
@@ -12,14 +12,14 @@
module DigestAuthentication
DigestError = Class.new(Error)
def self.extra_options(options)
Class.new(options.class) do
- def_option(:digest) do |digest|
- raise Error, ":digest must be a Digest" unless digest.is_a?(Digest)
+ def_option(:digest, <<-OUT)
+ raise Error, ":digest must be a Digest" unless value.is_a?(#{Digest})
- digest
- end
+ value
+ OUT
end.new(options)
end
def self.load_dependencies(*)
require "securerandom"