peoplegroup-connectors 0.1.12 → 0.1.18

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: dc2d3035647677c12121b33e4e896a58a0bc3ad2945c7f888de5d7d5f93d964d
4
- data.tar.gz: 1f672c728ebc260387479d581b5cf3ad3432a8c5bd2b1e4619a224fe5ae07770
3
+ metadata.gz: 753425475e4e6b051612621622c343f658fba4b2d76fd6bedeec74840152ec98
4
+ data.tar.gz: 4932e5a986be3139a6b15adccd1c8e69c300965ae9919d6e5737da996337601a
5
5
  SHA512:
6
- metadata.gz: 0b0f07937e19202ce835fe3bc70e04185fedb4a1d6afdfb9f7673360f6f34e97fa4d4156160eaad6414e5a53c8987fe93face1e52c309d10fcad7a158f75bf63
7
- data.tar.gz: ee28e8115a3f8065606663835afbac1b76c3b843b85f7a3d1050b565288600d287d6c61d11fa1b14e1cda12da72e771eaaac8e4646191164f7d1e8857b2a699e
6
+ metadata.gz: dccbc5a168a5f85b3024c52c0fa86ba9c151b3fd30ff4449435af2acf4b6ee546adfed6b121ce99cde2dca930ef9da0a0f03d9fcec70de262d9ddea42c4c2b95
7
+ data.tar.gz: 2438d8926129ffa30ee6761a2a4e81df802e1b3bb6cf4cce137fd887b200af798020ef7d2ddba445f7cd68a3c2ada2ee90d6df5c35a10e894749ece47f0a3713
@@ -72,7 +72,7 @@ module PeopleGroup
72
72
 
73
73
  begin
74
74
  @employees ||= @client.report.custom(fields, 'JSON').reject { |employee| employee['lastName'] == 'Test-Gitlab' }
75
- rescue Net::ReadTimeout
75
+ rescue Net::ReadTimeout, Bamboozled::GatewayError
76
76
  retry if (retries += 1) < MAX_RETRIES
77
77
  end
78
78
  end
@@ -82,6 +82,14 @@ module PeopleGroup
82
82
  end
83
83
  alias_method :active_team_members, :active_employees
84
84
 
85
+ def active_and_current_employees
86
+ today = Date.current
87
+ employees.select do |employee|
88
+ employee['status'] == 'Active' && Date.parse(employee['hireDate']) <= today
89
+ end
90
+ end
91
+ alias_method :active_and_current_team_members, :active_and_current_employees
92
+
85
93
  def add_stock_options(employee_id, data)
86
94
  @client.employee.add_table_row(employee_id, 'customEquity', data)
87
95
  end
@@ -51,7 +51,7 @@ module PeopleGroup
51
51
  new_files.each do |file|
52
52
  actions << {
53
53
  action: 'create',
54
- file_path: file.sub('tmp', '/data/team_members'),
54
+ file_path: file.sub('tmp', '/data/team_members/person'),
55
55
  content: File.read(file)
56
56
  }
57
57
  end
@@ -78,7 +78,7 @@ module PeopleGroup
78
78
  action = {
79
79
  action: 'update',
80
80
  file_path: file[:file_path],
81
- content: file[:file_with_change]
81
+ content: File.read(file[:tmp_file_path])
82
82
  }
83
83
  actions << action
84
84
  end
@@ -33,8 +33,8 @@ module PeopleGroup
33
33
  @client.chat_postMessage(channel: channel, text: text, as_user: true, attachments: attachments, unfurl_links: false)
34
34
  end
35
35
 
36
- def update_message(channel:, timestamp:, text:)
37
- @client.chat_update(channel: channel, text: text, ts: timestamp, as_user: true, attachments: [])
36
+ def update_message(channel:, timestamp:, text:, attachments: [])
37
+ @client.chat_update(channel: channel, text: text, ts: timestamp, as_user: true, attachments: attachments)
38
38
  end
39
39
 
40
40
  def send_modal_message(trigger:, view:)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PeopleGroup
4
4
  module Connectors
5
- VERSION = '0.1.12'
5
+ VERSION = '0.1.18'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peoplegroup-connectors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.18
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: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gitlab