bobhr 0.5.1 → 0.5.4
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/employees.rb +5 -0
- data/lib/bob/api/reports.rb +2 -0
- data/lib/bob/parsers/employee_parser.rb +6 -0
- data/lib/bob/util.rb +1 -0
- 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: 9e2f23eb79a6c8ff9f97d068faec100a7dfbc1ad19660dbf35d24506579a3c73
|
4
|
+
data.tar.gz: d650aac15ce41ffb4615c461eb1d4472a263c77582e114237fd442a44d90481d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0f9fe09c4605ab62d86b0bd1d624405fd9295fc536321ff371562dbbfcefe94263246f4094264a79b1f8f8013ce0ecdf7d46b112d2b9bd371c819fdc454f361
|
7
|
+
data.tar.gz: c972a2596bbfaf7c57e958f394a35a56f744c2e85dc32688ebede7aae7d30f371a8346e7cb466682b9646edbcb8bff8e8eec37ab398bd058b17a661847de9ca4
|
data/lib/bob/api/employees.rb
CHANGED
@@ -14,6 +14,11 @@ module Bob
|
|
14
14
|
EmployeeParser.new(response).employees
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.all_people_managers(params = { includeHumanReadable: true })
|
18
|
+
response = get('people', params)
|
19
|
+
EmployeeParser.new(response).managers
|
20
|
+
end
|
21
|
+
|
17
22
|
def self.find(employee_id_or_email, params: { includeHumanReadable: true })
|
18
23
|
response = get("people/#{employee_id_or_email}", params)
|
19
24
|
EmployeeParser.new(response).employee
|
data/lib/bob/api/reports.rb
CHANGED
@@ -8,4 +8,10 @@ class EmployeeParser < BaseParser
|
|
8
8
|
def employees
|
9
9
|
json_response['employees'].map { |attributes| Models::Employee.new(attributes) }
|
10
10
|
end
|
11
|
+
|
12
|
+
def managers
|
13
|
+
json_response['employees']
|
14
|
+
.select { |employee| employee['work']['isManager'] }
|
15
|
+
.map { |attributes| Models::Employee.new(attributes) }
|
16
|
+
end
|
11
17
|
end
|
data/lib/bob/util.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.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-03-
|
11
|
+
date: 2022-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
|
-
rubygems_version: 3.
|
126
|
+
rubygems_version: 3.3.7
|
127
127
|
signing_key:
|
128
128
|
specification_version: 4
|
129
129
|
summary: Ruby gem for Bob API
|