bobhr 0.5.8 → 0.5.9

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: 33a9f7791ceb562c80e23dbd25dfd819178b3a0fc70ae94c51e607d1107df661
4
- data.tar.gz: cd7d84c45ad9ed8d9e7beef7f9921402b01f7617801fa015a6c54d3b3a4ff170
3
+ metadata.gz: ffda2d8bd0f7e6ea7a53b1a8f92fe6c247fa3702737960c2f84a9bd2e2f28942
4
+ data.tar.gz: ad09a4e4594864444610990d6d78c0c4581770f189c31f34220afa3da514ee2a
5
5
  SHA512:
6
- metadata.gz: 9c163d409a32c041395e5e35f48f306b2ba09851395e076071737ca456ecdbc102ddd6a625ca29752bd0c5d73eb31a75715305a47da21d87ad01084eb3f70914
7
- data.tar.gz: 5192da79cb0841b97c00499351d4bba7260e945e7860a0402559f7815e5f85b952d1a04ce06752336449c955bdfb40c44df8c4debaedc947036b1e262bb40a6d
6
+ metadata.gz: e6f747a56836825f25805490d6f83050c1b9dd86ad983231719791a05206cb069686ede379cca34e7f6acd6a0b8723e5c176a1b0715c3b0ace57b41e6a5abd29
7
+ data.tar.gz: ea9aba347455c16c27a74d174046b1899253b856457b87026b9353dda13d63ee4b78cb4b9b8852df184fa29a650fcb6bc2edbcc045889e410c5598db08033e5a
@@ -20,6 +20,11 @@ module Bob
20
20
  EmployeeParser.new(response).managers
21
21
  end
22
22
 
23
+ def self.starts_on(date = Date.current.to_s, params = { includeHumanReadable: true })
24
+ response = get('people', params)
25
+ EmployeeParser.new(response).starters_on(date)
26
+ end
27
+
23
28
  def self.find(employee_id_or_email, params: { includeHumanReadable: true })
24
29
  response = get("people/#{employee_id_or_email}", params)
25
30
  EmployeeParser.new(response).employee
@@ -34,6 +34,10 @@ module Models
34
34
  address.site_city || address.city
35
35
  end
36
36
 
37
+ def country
38
+ address.country || address.site_country
39
+ end
40
+
37
41
  def role_level
38
42
  human_readable.work.custom_columns.column_1629151373898
39
43
  end
@@ -77,5 +81,9 @@ module Models
77
81
  def personal_email
78
82
  home.private_email
79
83
  end
84
+
85
+ def linkedin_profile
86
+ human_readable.about.social_data&.linkedin
87
+ end
80
88
  end
81
89
  end
@@ -14,4 +14,10 @@ class EmployeeParser < BaseParser
14
14
  .select { |employee| employee['work']['isManager'] }
15
15
  .map { |attributes| Models::Employee.new(attributes) }
16
16
  end
17
+
18
+ def starters_on(date)
19
+ json_response['employees']
20
+ .select { |employee| employee['work']['startDate'] == date }
21
+ .map { |attributes| Models::Employee.new(attributes) }
22
+ end
17
23
  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.8'
4
+ VERSION = '0.5.9'
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.8
4
+ version: 0.5.9
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-04-08 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  requirements: []
129
- rubygems_version: 3.3.7
129
+ rubygems_version: 3.2.31
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Ruby gem for Bob API