bobhr 0.5.3 → 0.5.4

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: 88c30a8019f27891863ec1dd5c4c0d33f87b34e4e05d0aae049f4d4f25c6630b
4
- data.tar.gz: f7b8bfae6431f0020cf07e417e7de50f675e69c98c391cf4d34ca6c65696ff5a
3
+ metadata.gz: 9e2f23eb79a6c8ff9f97d068faec100a7dfbc1ad19660dbf35d24506579a3c73
4
+ data.tar.gz: d650aac15ce41ffb4615c461eb1d4472a263c77582e114237fd442a44d90481d
5
5
  SHA512:
6
- metadata.gz: 6608fb37aa26b5978b9f0dcc0d4b52c7ff297800cccf59fb396fdd175d73ed7acd7b1c62687fa8dbcb0291e5f30b7fd845612902472decb8ef487a64c098ae35
7
- data.tar.gz: dec4452da26aa0e1d8d70e31346af34a5657e4616bee663bfe178215126f4de56dfe73dda4727e03ad923ae0ec09b788cd229473af753d6f32a0ce0c3c2bafda
6
+ metadata.gz: d0f9fe09c4605ab62d86b0bd1d624405fd9295fc536321ff371562dbbfcefe94263246f4094264a79b1f8f8013ce0ecdf7d46b112d2b9bd371c819fdc454f361
7
+ data.tar.gz: c972a2596bbfaf7c57e958f394a35a56f744c2e85dc32688ebede7aae7d30f371a8346e7cb466682b9646edbcb8bff8e8eec37ab398bd058b17a661847de9ca4
@@ -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
@@ -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/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bob
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
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.3
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-14 00:00:00.000000000 Z
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.2.31
126
+ rubygems_version: 3.3.7
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Ruby gem for Bob API