bobhr 0.3.3 → 0.3.4

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: 372b43f26c87a5eb6756486b7fae157c03ac8c018b37fae8bce1535e89e143c0
4
- data.tar.gz: '0385c30f1f4371f410f11e0de393eeea984788f6f49d50d384002d4d6ca09c1c'
3
+ metadata.gz: 90881d623b810aaf7a5469ea86edbad348cf430961b4f166667c30931881a054
4
+ data.tar.gz: bfc0f96e9a49e0c11ebeb326a006ea5a2c03dafc8b9d3ae50be63171b93abd8f
5
5
  SHA512:
6
- metadata.gz: 05d570b22c1d4c37324bbe32bd7b6a6ff95d50fb71ba2c9e1ac4d27f33f0f92f554e4b25cc930f7f8e37b004e9b8e007ebd088bd1e5f9f20fedef0517047e26a
7
- data.tar.gz: 4884d586604c41533afda06c8c012e9c9821a090ae0123596da7ca9a81fd3ca58dc346ad9f85fcd55f6ffe24b4dc2a6c5debc18c36a487b22e27129ca1fa0cd5
6
+ metadata.gz: c68aa05573becd8c2532b7150161c86fc32a791173ec8f63edbc4461cab734f929ee6c535d2cf10813b634958f1b6f455e22182356b15198c0a080a2a96bd1f7
7
+ data.tar.gz: 18735135af683b46d6b17ac7d27f8426ee43e8815db6dfea552072d71a3e0851dd6e5c5569c939b545f5fa45abce466de5931083caa9b56796403c9d6339ca6e
data/lib/bob/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bob
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bob
4
+ class Webhooks
5
+ def self.calculate_signature(body:, key: ENV['BOB_WEBHOOK_SECRET'])
6
+ digest = OpenSSL::Digest.new('sha512')
7
+ Base64.strict_encode64(OpenSSL::HMAC.digest(digest, key, body))
8
+ end
9
+ end
10
+ end
data/lib/bob.rb CHANGED
@@ -8,6 +8,7 @@ require_relative 'bob/time_off'
8
8
  require_relative 'bob/onboarding_wizards'
9
9
  require_relative 'bob/metadata'
10
10
  require_relative 'bob/reports'
11
+ require_relative 'bob/webhooks'
11
12
 
12
13
  module Bob
13
14
  extend Configuration
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bobhr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lien Van Den Steen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -64,6 +64,7 @@ files:
64
64
  - lib/bob/reports.rb
65
65
  - lib/bob/time_off.rb
66
66
  - lib/bob/version.rb
67
+ - lib/bob/webhooks.rb
67
68
  - lib/bobhr.rb
68
69
  homepage: https://github.com/lienvdsteen/hibob
69
70
  licenses:
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  - !ruby/object:Gem::Version
86
87
  version: '0'
87
88
  requirements: []
88
- rubygems_version: 3.2.32
89
+ rubygems_version: 3.2.31
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: Ruby gem for Bob API