bobhr 0.5.11 → 0.5.12
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 +0 -17
- data/lib/bob/api/employee/documents.rb +0 -4
- data/lib/bob/models/employee.rb +6 -6
- data/lib/bob/models/time_off.rb +2 -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: 46e31c984fb6ebd3191f5385250b2d2dcf0267175c1d1dd239bf40bfd08d7f5c
|
4
|
+
data.tar.gz: 643b945a85c2ae4d69a461bb222a5c8cb59e2e52439fbbad5cd945306caa8a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86a5485c37a86b93d82fe90aea221432437d788149a4113e125ce5ab72bb7909d63e02fa34656ca40842ed6312a152f98bd72735b317f35cdc45ae8b0142da6
|
7
|
+
data.tar.gz: 813ffce4e29a67b615423977b29a479161d61e5c7cf7a93bd68bacc70783a0e8761cb390e8ccb18ae1f6237314fac4e5907b791dccc347f69822360064ebbef5
|
data/lib/bob/api/api.rb
CHANGED
@@ -34,23 +34,6 @@ 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
|
-
|
54
37
|
def self.delete(endpoint)
|
55
38
|
url = build_url(endpoint)
|
56
39
|
response = RestClient.delete(url)
|
@@ -10,10 +10,6 @@ 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
|
17
13
|
end
|
18
14
|
end
|
19
15
|
end
|
data/lib/bob/models/employee.rb
CHANGED
@@ -47,15 +47,15 @@ module Models
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def manager
|
50
|
-
work
|
50
|
+
work&.reports_to
|
51
51
|
end
|
52
52
|
|
53
53
|
def has_second_level_manager?
|
54
|
-
work
|
54
|
+
work&.second_level_manager.present?
|
55
55
|
end
|
56
56
|
|
57
57
|
def second_level_manager
|
58
|
-
@second_level_manager ||= Bob::Employees.find(work
|
58
|
+
@second_level_manager ||= Bob::Employees.find(work&.second_level_manager)
|
59
59
|
end
|
60
60
|
|
61
61
|
def has_third_level_manager?
|
@@ -63,15 +63,15 @@ module Models
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def third_level_manager
|
66
|
-
second_level_manager
|
66
|
+
second_level_manager&.manager
|
67
67
|
end
|
68
68
|
|
69
69
|
def has_fourth_level_manager?
|
70
|
-
second_level_manager.work
|
70
|
+
second_level_manager.work&.second_level_manager.present?
|
71
71
|
end
|
72
72
|
|
73
73
|
def fourth_level_manager
|
74
|
-
second_level_manager
|
74
|
+
second_level_manager&.second_level_manager
|
75
75
|
end
|
76
76
|
|
77
77
|
def cost_center
|
data/lib/bob/models/time_off.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.12
|
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-
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|