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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffda2d8bd0f7e6ea7a53b1a8f92fe6c247fa3702737960c2f84a9bd2e2f28942
4
- data.tar.gz: ad09a4e4594864444610990d6d78c0c4581770f189c31f34220afa3da514ee2a
3
+ metadata.gz: 434482166e74f6e53d8d6ccd030c6198e7f669a186d96eb06c18bb8b7e9d0747
4
+ data.tar.gz: db610d2fbcb896bba33b4506e4cedb2e4922bf59c8500c6e45563864641258bf
5
5
  SHA512:
6
- metadata.gz: e6f747a56836825f25805490d6f83050c1b9dd86ad983231719791a05206cb069686ede379cca34e7f6acd6a0b8723e5c176a1b0715c3b0ace57b41e6a5abd29
7
- data.tar.gz: ea9aba347455c16c27a74d174046b1899253b856457b87026b9353dda13d63ee4b78cb4b9b8852df184fa29a650fcb6bc2edbcc045889e410c5598db08033e5a
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  class OnboardingWizardParser < BaseParser
4
4
  def wizards
5
- json_response['values'].map { |attributes| Models::OnboardingWizard.new(attributes) }
5
+ json_response['wizards'].map { |attributes| Models::OnboardingWizard.new(attributes) }
6
6
  end
7
7
  end
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.5.9'
4
+ VERSION = '0.5.10'
5
5
  end
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.9
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-20 00:00:00.000000000 Z
11
+ date: 2022-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json