bobhr 0.5.25 → 0.5.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bob/api/api.rb +3 -15
- data/lib/bob/models/employee.rb +1 -1
- data/lib/bob/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d39ef155e26e6b7c16e18d33ce574692a5fe0c5e63225fe8b089e4e9701cc096
|
4
|
+
data.tar.gz: 74e110d4a67c7ec4f0a7e11cf441ce6acb5099f92faf210416ef293aa9f3b793
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be2ee4efc1042e790e6ceccb56a9b308a80980256c1c543a8bf9073b59329737d535fc97317680e858cc298f640a689a1fe56a4b507429abf17eb2dedbf16d17
|
7
|
+
data.tar.gz: 417b9615eed6fb3fe074390a7c8df6c5fe4797a64a6dff84fc0c47f678a61111e15398708c0babcbae6d661246ab4bee815abef42b011dc40cff2d478acbc448
|
data/lib/bob/api/api.rb
CHANGED
@@ -10,22 +10,10 @@ module Bob
|
|
10
10
|
class API
|
11
11
|
BASE_URL = 'https://api.hibob.com'
|
12
12
|
|
13
|
-
MAX_RETRIES = 3
|
14
|
-
|
15
13
|
def self.get(endpoint, params = {}, csv_response: false)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
url = build_url(endpoint, params)
|
20
|
-
response = RestClient.get(url, authorization_header)
|
21
|
-
rescue
|
22
|
-
if (retries += 1) < MAX_RETRIES
|
23
|
-
sleep 60
|
24
|
-
retry
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
return create_csv(response.body) if csv_response
|
14
|
+
url = build_url(endpoint, params)
|
15
|
+
response = RestClient.get(url, authorization_header)
|
16
|
+
return create_csv(response.body) if csv_response
|
29
17
|
|
30
18
|
JSON.parse(response.body)
|
31
19
|
end
|
data/lib/bob/models/employee.rb
CHANGED
data/lib/bob/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.27
|
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: 2023-
|
11
|
+
date: 2023-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -134,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
|
-
rubygems_version: 3.
|
137
|
+
rubygems_version: 3.3.26
|
138
138
|
signing_key:
|
139
139
|
specification_version: 4
|
140
140
|
summary: Ruby gem for Bob API
|