mashape 2.0.7 → 2.0.8

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.
@@ -6,11 +6,7 @@ module Mashape
6
6
  class AuthenticationUtils
7
7
 
8
8
  def AuthenticationUtils.generateMashapeAuthHeader(public_key, private_key)
9
- unless public_key.empty? || private_key.empty?
10
- hash = HMAC::SHA1.hexdigest(private_key, public_key)
11
- auth = {"X-Mashape-Authorization" => Base64.encode64(public_key + ":" + hash).chomp.gsub(/\n/,'')}
12
- end
13
- return auth
9
+ return {"X-Mashape-Authorization" => mashape_key}
14
10
  end
15
11
 
16
12
  def AuthenticationUtils.generateBasicAuthHeader(username, password)
@@ -4,9 +4,9 @@ require File.join(File.dirname(__FILE__), "/authentication_utils.rb")
4
4
  module Mashape
5
5
  class MashapeAuthentication < HeaderAuthentication
6
6
 
7
- def initialize(public_key, private_key)
7
+ def initialize(mashape_key)
8
8
  super()
9
- @header = @header.merge(Mashape::AuthenticationUtils.generateMashapeAuthHeader(public_key, private_key))
9
+ @header = @header.merge(Mashape::AuthenticationUtils.generateMashapeAuthHeader(mashape_key))
10
10
  end
11
11
 
12
12
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 2
7
7
  - 0
8
- - 7
9
- version: 2.0.7
8
+ - 8
9
+ version: 2.0.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mashape
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-02-19 00:00:00 +01:00
17
+ date: 2013-02-20 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency