bobhr 0.5.9 → 0.5.10
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 +17 -0
- data/lib/bob/api/employee/documents.rb +4 -0
- data/lib/bob/parsers/onboarding_wizard_parser.rb +1 -1
- data/lib/bob/version.rb +1 -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: 434482166e74f6e53d8d6ccd030c6198e7f669a186d96eb06c18bb8b7e9d0747
|
4
|
+
data.tar.gz: db610d2fbcb896bba33b4506e4cedb2e4922bf59c8500c6e45563864641258bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cfbb6ab9ae1324bd133837d818c537a5285a0411a7566083b14b75a8f3d92d7b9bd62a63824a69f501a2a86acbab6e748b3bc56e7d457bd7a5846de7ceede93
|
7
|
+
data.tar.gz: aa7f24c2cb908caec1fc3947432c8000a63ab21fb491c0cb202b4cf7eecf9d00fc5fc29028cce9a835e9ca32c37c730f2bc74d158399478be2fe4f2dbe100155
|
data/lib/bob/api/api.rb
CHANGED
@@ -34,6 +34,23 @@ module Bob
|
|
34
34
|
response.code
|
35
35
|
end
|
36
36
|
|
37
|
+
def self.post_file(endpoint, file)
|
38
|
+
url = build_url(endpoint)
|
39
|
+
payload = {
|
40
|
+
multipart: true,
|
41
|
+
file: file,
|
42
|
+
}
|
43
|
+
|
44
|
+
headers = {
|
45
|
+
'Content-Type': 'multipart/form-data; boundary=---011000010111000001101001',
|
46
|
+
Authorization: "Basic #{Base64.strict_encode64("#{Bob.access_user_name}:#{Bob.access_token}")}"
|
47
|
+
}
|
48
|
+
response = RestClient.post(url, payload, headers)
|
49
|
+
binding.break
|
50
|
+
p response
|
51
|
+
response.code
|
52
|
+
end
|
53
|
+
|
37
54
|
def self.delete(endpoint)
|
38
55
|
url = build_url(endpoint)
|
39
56
|
response = RestClient.delete(url)
|
@@ -10,6 +10,10 @@ module Bob
|
|
10
10
|
def self.add_private_document(employee_id, params = {})
|
11
11
|
post("docs/people/#{employee_id}/confidential", params, use_api_key: true)
|
12
12
|
end
|
13
|
+
|
14
|
+
def self.upload_public_document(employee_id, file)
|
15
|
+
post_file("docs/people/#{employee_id}/shared/upload", file)
|
16
|
+
end
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
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.10
|
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-05-
|
11
|
+
date: 2022-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|