simple_worker 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/http_enabled.rb +7 -3
  2. metadata +1 -1
data/lib/http_enabled.rb CHANGED
@@ -99,11 +99,15 @@ module SimpleWorker
99
99
  return gmtime.strftime("%Y-%m-%dT%H:%M:%SZ")
100
100
  end
101
101
 
102
- def generate_signature_v0(operation, timestamp, secret_access_key)
102
+ def generate_signature_v0(operation, timestamp, secret_key)
103
+ HttpEnabled.generate_signature_v0(operation, timestamp, secret_key)
104
+ end
105
+
106
+ def self.generate_signature_v0(operation, timestamp, secret_key)
103
107
  if USE_EMBEDDED_HMAC
104
- my_sha_hmac = HMAC::SHA1.digest(secret_access_key, operation + timestamp)
108
+ my_sha_hmac = HMAC::SHA1.digest(secret_key, operation + timestamp)
105
109
  else
106
- my_sha_hmac = Digest::HMAC.digest(operation + timestamp, secret_access_key, Digest::SHA1)
110
+ my_sha_hmac = Digest::HMAC.digest(operation + timestamp, secret_key, Digest::SHA1)
107
111
  end
108
112
  my_b64_hmac_digest = Base64.encode64(my_sha_hmac).strip
109
113
  return my_b64_hmac_digest
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder