megam_api 1.6.6 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e2116834f32ccc85a0f032e1aa194ddcec1ddf1
4
- data.tar.gz: bf6d94110b3cd5381975b00474fa8b527c482dd0
3
+ metadata.gz: 776f06fd527678942056d9b9fefee5d3876d28c0
4
+ data.tar.gz: 4a56fb364e4d4748f7032da252a405909e03eb12
5
5
  SHA512:
6
- metadata.gz: 83a21792cf1e6f210706181ec91657d7273b406bc6621ba448e45a98180fd02690f798315e18906660cb03142dc9cb7525b0b487d4d155c7b3b66fd04f91245e
7
- data.tar.gz: 99257e6adb30fd253b70fc56f44e0a2eec86f89dd87bf2653522d57d854d7f972afbc00328e233619340c68551619eb036fcbe51ccaf5480df812e55251e2c43
6
+ metadata.gz: c347483a08676ee3b306742abcfa1e70759575e4359ce45d2c6ee972f3ede97e368ba2d7007c4e9de0b49f3350fdbdc949936e77a41f1d69d558d78c120eb217
7
+ data.tar.gz: d2ffdd3759f0c2b6e15cf44c8dfc5d1ac133c3b96f586b7e028148a133b56e0511229fd5371688d4fe26a4550ae27a4b11630b733221f0c42dbedbba4ba72e6d
data/lib/megam/api.rb CHANGED
@@ -251,14 +251,16 @@ module Megam
251
251
  def encode_header(cmd_parms)
252
252
  header_params = {}
253
253
  body_digest = OpenSSL::Digest::MD5.digest(cmd_parms[:body])
254
- body_base64 = Base64.encode64(body_digest)
254
+ body_base64 = Base64.urlsafe_encode64(body_digest)
255
255
 
256
256
  current_date = Time.now.strftime('%Y-%m-%d %H:%M')
257
257
 
258
258
  data = "#{current_date}" + "\n" + "#{cmd_parms[:path]}" + "\n" + "#{body_base64}"
259
-
259
+
260
260
  digest = OpenSSL::Digest.new('sha1')
261
- movingFactor = data.rstrip!
261
+
262
+ movingFactor = data
263
+
262
264
  if !(@password_hash.nil?) && @api_key.nil?
263
265
  hash = OpenSSL::HMAC.hexdigest(digest, Base64.strict_decode64(@password_hash), movingFactor)
264
266
  elsif !(@api_key.nil?)
@@ -271,3 +273,4 @@ module Megam
271
273
  end
272
274
  end
273
275
  end
276
+
@@ -1,5 +1,5 @@
1
1
  module Megam
2
2
  class API
3
- VERSION = "1.6.6"
3
+ VERSION = "1.6.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: megam_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.6
4
+ version: 1.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajthilak, Kishorekumar Neelamegam, Ranjitha R, Rajesh Rajagopalan, Thomas Alrin,
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-09-12 00:00:00.000000000 Z
12
+ date: 2016-09-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: excon