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 +4 -4
- data/lib/clearbit/version.rb +1 -1
- data/lib/clearbit/webhook.rb +3 -1
- data/spec/support/helpers.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 775ec8d65111d426a0ec0424135c0f070c3d9e6834f818dfb902650f761836f3
|
4
|
+
data.tar.gz: 0c8cd65375787f5df66bc3821ac154bcac21d649b6e97e8804953ae4255463a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24fe794b5ed903da7d941fffbbdfe0fbd956bb7aabdb7bb2d2d66d412892d01b1ab551de7c28f48d72f66a04a1772d2ba7edfad2eb3c58fd5007874087851a86
|
7
|
+
data.tar.gz: bad29a9ca346fd5accb3441bc1c9bc3272830bb2c15c5c5bc14198c68608100aca97dc7725a7a1d150e8b1066f767404ca575fbc860beae6ec3202edb53e247e
|
data/lib/clearbit/version.rb
CHANGED
data/lib/clearbit/webhook.rb
CHANGED
@@ -23,7 +23,9 @@ module Clearbit
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def self.generate_signature(key, body)
|
26
|
-
|
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)
|
data/spec/support/helpers.rb
CHANGED
@@ -2,7 +2,9 @@ module Spec
|
|
2
2
|
module Support
|
3
3
|
module Helpers
|
4
4
|
def generate_signature(clearbit_key, webhook_body)
|
5
|
-
|
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.
|
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-
|
11
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|