clearbit 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: 5836e1bb80db4d5663e2e84e7ed9d3c60d96ea6a9b983363690a0f83cffc6224
4
- data.tar.gz: fabac72f97c7937d4678b965c93ec750a5e5b2a803d761f4833c7cfee67ddb87
3
+ metadata.gz: 775ec8d65111d426a0ec0424135c0f070c3d9e6834f818dfb902650f761836f3
4
+ data.tar.gz: 0c8cd65375787f5df66bc3821ac154bcac21d649b6e97e8804953ae4255463a1
5
5
  SHA512:
6
- metadata.gz: 0e16b8de900c7fd920d9cd7e11c73ce194ac140c90a8a6170dd5186420ca4d7bf5086ac3502a84b630c8b4998c43fd64f0a5693e7fccdc7c3ccf5df46893fdec
7
- data.tar.gz: 801102e5be08ffcbb45b4d777188f9fa06928d3956db42978ab7ab871c03d3692ab63781170266896386cfaa42cf9ae3306b6090c3d3459db3edb628b4aa5d34
6
+ metadata.gz: 24fe794b5ed903da7d941fffbbdfe0fbd956bb7aabdb7bb2d2d66d412892d01b1ab551de7c28f48d72f66a04a1772d2ba7edfad2eb3c58fd5007874087851a86
7
+ data.tar.gz: bad29a9ca346fd5accb3441bc1c9bc3272830bb2c15c5c5bc14198c68608100aca97dc7725a7a1d150e8b1066f767404ca575fbc860beae6ec3202edb53e247e
@@ -1,3 +1,3 @@
1
1
  module Clearbit
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
@@ -23,7 +23,9 @@ module Clearbit
23
23
  end
24
24
 
25
25
  def self.generate_signature(key, body)
26
- 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), key, body)
26
+ signed_body = body
27
+ signed_body = JSON.dump(signed_body) unless signed_body.is_a?(String)
28
+ 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), key, signed_body)
27
29
  end
28
30
 
29
31
  def initialize(env, key = nil)
@@ -2,7 +2,9 @@ module Spec
2
2
  module Support
3
3
  module Helpers
4
4
  def generate_signature(clearbit_key, webhook_body)
5
- 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), clearbit_key, webhook_body)
5
+ signed_body = webhook_body
6
+ signed_body = JSON.dump(signed_body) unless signed_body.is_a?(String)
7
+ 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), clearbit_key, signed_body)
6
8
  end
7
9
  end
8
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-18 00:00:00.000000000 Z
11
+ date: 2020-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler