summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-12-06 10:19:53 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-12-06 10:19:53 -0800
commit711ed3956a2bdc76e6bb2b49111f5bed87a97ad6 (patch)
tree37489c39f47fd614faa3407e11f6d35ce724be9b
parent2d3d986c751ceadc1022a46b2a856ae943fb4d65 (diff)
downloadmixlib-authentication-711ed3956a2bdc76e6bb2b49111f5bed87a97ad6.tar.gz
fix Struct.new issue
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--lib/mixlib/authentication/signedheaderauth.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mixlib/authentication/signedheaderauth.rb b/lib/mixlib/authentication/signedheaderauth.rb
index 855fd80..f107170 100644
--- a/lib/mixlib/authentication/signedheaderauth.rb
+++ b/lib/mixlib/authentication/signedheaderauth.rb
@@ -263,13 +263,13 @@ module Mixlib
# A Struct-based value object that contains the necessary information to
# generate a request signature. `SignedHeaderAuth.signing_object()`
# provides a more convenient interface to the constructor.
- class SigningObject < Struct.new(:http_method, :path, :body, :host,
+ SigningObject = Struct.new(:http_method, :path, :body, :host,
:timestamp, :user_id, :file, :proto_version,
- :headers)
+ :headers) do
include SignedHeaderAuth
def proto_version
- (self[:proto_version] || DEFAULT_PROTO_VERSION).to_s
+ (self[:proto_version] || SignedHeaderAuth::DEFAULT_PROTO_VERSION).to_s
end
def server_api_version
@@ -279,7 +279,7 @@ module Mixlib
if key
self[:headers][key]
else
- DEFAULT_SERVER_API_VERSION
+ SignedHeaderAuth::DEFAULT_SERVER_API_VERSION
end
end
end