talentio-notifier 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +11 -4
- data/Gemfile.lock +29 -32
- data/Makefile +2 -2
- data/lib/talentio/notifier/slack.rb +12 -10
- data/lib/talentio/notifier/version.rb +1 -1
- data/manifests/cron.yml +20 -10
- data/talentio-notifier.gemspec +15 -15
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a5e1c9678d11c46667ecbeb541795d7b39c09d2f33822634223633fd709b4f9
|
|
4
|
+
data.tar.gz: a33a6fb4146bc5d8103adef986c60c75c563902a7a61c9e9979af7f69b159ae4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dec6ec6e1c8a7149913f1436f0f525dea823331d5e1ad5b8c805a46fe035ed910ef8e7e4979d9ff5faeb8b9f3c9d9ec01356514e3616527c339ac2612e7f40eb
|
|
7
|
+
data.tar.gz: 44ec474b3d992fd6014878c36f588abe1b0bd9427bfe2e66a5f58705c827c682cd650022c43de10940ac9ffc4b1648f25fb7e279d6caada8c7c2e0cd3b1f64a0
|
data/Dockerfile
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
FROM ruby:
|
|
1
|
+
FROM ruby:latest
|
|
2
2
|
WORKDIR /talentio-notifier
|
|
3
3
|
ENV LANG C.UTF-8
|
|
4
|
-
RUN apt update -qqy && apt
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
RUN apt update -qqy && apt upgrade -qqy && \
|
|
5
|
+
apt update -qqy && apt install -qqy wget && \
|
|
6
|
+
wget https://github.com/knqyf263/holiday_jp-go/releases/download/v0.0.1/holiday_jp-go_0.0.1_linux_amd64.deb && \
|
|
7
|
+
dpkg -i holiday_jp-go_0.0.1_linux_amd64.deb && \
|
|
8
|
+
apt clean && rm -rf /var/lib/apt/lists/*
|
|
9
|
+
RUN useradd talentio && \
|
|
10
|
+
chown talentio /talentio-notifier
|
|
11
|
+
USER talentio
|
|
12
|
+
|
|
13
|
+
RUN gem install talentio-notifier -v "0.3.6"
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
talentio-notifier (0.3.
|
|
4
|
+
talentio-notifier (0.3.6)
|
|
5
5
|
activesupport
|
|
6
6
|
faraday
|
|
7
7
|
holiday_jp
|
|
@@ -12,44 +12,43 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
activesupport (
|
|
15
|
+
activesupport (7.0.6)
|
|
16
16
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
17
|
-
i18n (>=
|
|
18
|
-
minitest (
|
|
19
|
-
tzinfo (~>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
diff-lcs (1.4.4)
|
|
17
|
+
i18n (>= 1.6, < 2)
|
|
18
|
+
minitest (>= 5.1)
|
|
19
|
+
tzinfo (~> 2.0)
|
|
20
|
+
concurrent-ruby (1.2.2)
|
|
21
|
+
diff-lcs (1.5.0)
|
|
23
22
|
eventmachine (1.2.7)
|
|
24
|
-
faraday (0.17.
|
|
23
|
+
faraday (0.17.6)
|
|
25
24
|
multipart-post (>= 1.2, < 3)
|
|
26
25
|
faraday_middleware (0.10.1)
|
|
27
26
|
faraday (>= 0.7.4, < 1.0)
|
|
28
27
|
faye-websocket (0.10.9)
|
|
29
28
|
eventmachine (>= 0.12.0)
|
|
30
29
|
websocket-driver (>= 0.5.1)
|
|
31
|
-
gli (2.
|
|
32
|
-
hashie (
|
|
33
|
-
holiday_jp (0.
|
|
34
|
-
i18n (1.
|
|
30
|
+
gli (2.21.0)
|
|
31
|
+
hashie (5.0.0)
|
|
32
|
+
holiday_jp (0.8.1)
|
|
33
|
+
i18n (1.14.1)
|
|
35
34
|
concurrent-ruby (~> 1.0)
|
|
36
|
-
minitest (5.
|
|
35
|
+
minitest (5.18.1)
|
|
37
36
|
multi_json (1.15.0)
|
|
38
|
-
multipart-post (2.
|
|
37
|
+
multipart-post (2.3.0)
|
|
39
38
|
rake (12.3.3)
|
|
40
|
-
rspec (3.
|
|
41
|
-
rspec-core (~> 3.
|
|
42
|
-
rspec-expectations (~> 3.
|
|
43
|
-
rspec-mocks (~> 3.
|
|
44
|
-
rspec-core (3.
|
|
45
|
-
rspec-support (~> 3.
|
|
46
|
-
rspec-expectations (3.
|
|
39
|
+
rspec (3.12.0)
|
|
40
|
+
rspec-core (~> 3.12.0)
|
|
41
|
+
rspec-expectations (~> 3.12.0)
|
|
42
|
+
rspec-mocks (~> 3.12.0)
|
|
43
|
+
rspec-core (3.12.2)
|
|
44
|
+
rspec-support (~> 3.12.0)
|
|
45
|
+
rspec-expectations (3.12.3)
|
|
47
46
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
48
|
-
rspec-support (~> 3.
|
|
49
|
-
rspec-mocks (3.
|
|
47
|
+
rspec-support (~> 3.12.0)
|
|
48
|
+
rspec-mocks (3.12.5)
|
|
50
49
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
-
rspec-support (~> 3.
|
|
52
|
-
rspec-support (3.
|
|
50
|
+
rspec-support (~> 3.12.0)
|
|
51
|
+
rspec-support (3.12.1)
|
|
53
52
|
slack-api (1.6.1)
|
|
54
53
|
faraday (~> 0.11)
|
|
55
54
|
faraday_middleware (~> 0.10.0)
|
|
@@ -62,14 +61,12 @@ GEM
|
|
|
62
61
|
gli
|
|
63
62
|
hashie
|
|
64
63
|
websocket-driver
|
|
65
|
-
thor (1.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
websocket-driver (0.7.3)
|
|
64
|
+
thor (1.2.2)
|
|
65
|
+
tzinfo (2.0.6)
|
|
66
|
+
concurrent-ruby (~> 1.0)
|
|
67
|
+
websocket-driver (0.7.5)
|
|
70
68
|
websocket-extensions (>= 0.1.0)
|
|
71
69
|
websocket-extensions (0.1.5)
|
|
72
|
-
zeitwerk (2.4.0)
|
|
73
70
|
|
|
74
71
|
PLATFORMS
|
|
75
72
|
ruby
|
data/Makefile
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
require 'time'
|
|
2
2
|
require 'json'
|
|
3
|
-
require 'pp'
|
|
4
3
|
require 'slack-ruby-client'
|
|
5
4
|
require 'holiday_jp'
|
|
6
5
|
require 'active_support/core_ext/module'
|
|
@@ -14,24 +13,27 @@ module Talentio
|
|
|
14
13
|
|
|
15
14
|
def nofity
|
|
16
15
|
return unless notify?
|
|
17
|
-
|
|
18
16
|
end
|
|
19
17
|
|
|
20
18
|
def mention_id_from_evaluations(evaluations)
|
|
21
19
|
members.map do |sm|
|
|
22
|
-
evaluations.select {|e| !e['finished']}.map do |m|
|
|
23
|
-
|
|
20
|
+
evaluations.select { |e| !e['finished'] }.map do |m|
|
|
21
|
+
next unless sm['email'] == m['email']
|
|
22
|
+
|
|
23
|
+
{ id: "@#{sm['id']}",
|
|
24
|
+
name: sm['name'] }
|
|
24
25
|
end
|
|
25
26
|
end.flatten.compact
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
private
|
|
30
|
+
|
|
29
31
|
def members
|
|
30
32
|
unless @members
|
|
31
33
|
members = []
|
|
32
34
|
next_cursor = nil
|
|
33
35
|
loop do
|
|
34
|
-
slack_users = client.users_list({limit: 1000, cursor: next_cursor})
|
|
36
|
+
slack_users = client.users_list({ limit: 1000, cursor: next_cursor })
|
|
35
37
|
members << slack_users['members']
|
|
36
38
|
next_cursor = slack_users['response_metadata']['next_cursor']
|
|
37
39
|
break if next_cursor.empty?
|
|
@@ -47,11 +49,11 @@ module Talentio
|
|
|
47
49
|
conf.token = ENV['SLACK_APIKEY']
|
|
48
50
|
end
|
|
49
51
|
@client = ::Slack::Web::Client.new
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
if ENV['TALENTIO_TEST']
|
|
53
|
+
@client.define_singleton_method(:chat_postMessage) do |m|
|
|
54
|
+
puts m
|
|
55
|
+
end
|
|
56
|
+
end
|
|
55
57
|
end
|
|
56
58
|
|
|
57
59
|
@client
|
data/manifests/cron.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
apiVersion: batch/
|
|
1
|
+
apiVersion: batch/v1
|
|
2
2
|
kind: CronJob
|
|
3
3
|
metadata:
|
|
4
4
|
name: talentio-notifier-result
|
|
@@ -10,7 +10,14 @@ spec:
|
|
|
10
10
|
spec:
|
|
11
11
|
containers:
|
|
12
12
|
- name: talentio-notifier
|
|
13
|
-
|
|
13
|
+
resources:
|
|
14
|
+
requests:
|
|
15
|
+
cpu: 50m
|
|
16
|
+
memory: 256M
|
|
17
|
+
limits:
|
|
18
|
+
cpu: 200m
|
|
19
|
+
memory: 512M
|
|
20
|
+
image: pyama/talentio-notifier:0.3.6
|
|
14
21
|
imagePullPolicy: Always
|
|
15
22
|
env:
|
|
16
23
|
- name: LANG
|
|
@@ -20,8 +27,6 @@ spec:
|
|
|
20
27
|
secretKeyRef:
|
|
21
28
|
name: talentio-notifier-secret
|
|
22
29
|
key: talentio-apikey
|
|
23
|
-
- name: LANG
|
|
24
|
-
value: C.UTF-8
|
|
25
30
|
- name: SLACK_APIKEY
|
|
26
31
|
valueFrom:
|
|
27
32
|
secretKeyRef:
|
|
@@ -30,10 +35,10 @@ spec:
|
|
|
30
35
|
args:
|
|
31
36
|
- "/bin/bash"
|
|
32
37
|
- "-c"
|
|
33
|
-
- "
|
|
38
|
+
- "holiday_jp-go || talentio-notifier remind-result"
|
|
34
39
|
restartPolicy: Never
|
|
35
40
|
---
|
|
36
|
-
apiVersion: batch/
|
|
41
|
+
apiVersion: batch/v1
|
|
37
42
|
kind: CronJob
|
|
38
43
|
metadata:
|
|
39
44
|
name: talentio-notifier-interview
|
|
@@ -45,7 +50,14 @@ spec:
|
|
|
45
50
|
spec:
|
|
46
51
|
containers:
|
|
47
52
|
- name: talentio-notifier
|
|
48
|
-
image: pyama/talentio-notifier:0.3.
|
|
53
|
+
image: pyama/talentio-notifier:0.3.6
|
|
54
|
+
resources:
|
|
55
|
+
requests:
|
|
56
|
+
cpu: 50m
|
|
57
|
+
memory: 256M
|
|
58
|
+
limits:
|
|
59
|
+
cpu: 200m
|
|
60
|
+
memory: 512M
|
|
49
61
|
env:
|
|
50
62
|
- name: TALENTIO_SKIP_STAGE
|
|
51
63
|
value: "3"
|
|
@@ -56,8 +68,6 @@ spec:
|
|
|
56
68
|
secretKeyRef:
|
|
57
69
|
name: talentio-notifier-secret
|
|
58
70
|
key: talentio-apikey
|
|
59
|
-
- name: LANG
|
|
60
|
-
value: C.UTF-8
|
|
61
71
|
- name: SLACK_APIKEY
|
|
62
72
|
valueFrom:
|
|
63
73
|
secretKeyRef:
|
|
@@ -66,5 +76,5 @@ spec:
|
|
|
66
76
|
args:
|
|
67
77
|
- "/bin/bash"
|
|
68
78
|
- "-c"
|
|
69
|
-
- "
|
|
79
|
+
- "holiday_jp-go || talentio-notifier remind-interview"
|
|
70
80
|
restartPolicy: Never
|
data/talentio-notifier.gemspec
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
require_relative 'lib/talentio/notifier/version'
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
|
-
spec.name =
|
|
4
|
+
spec.name = 'talentio-notifier'
|
|
5
5
|
spec.version = Talentio::Notifier::VERSION
|
|
6
|
-
spec.authors = [
|
|
7
|
-
spec.email = [
|
|
6
|
+
spec.authors = ['pyama86']
|
|
7
|
+
spec.email = ['www.kazu.com@gmail.com']
|
|
8
8
|
|
|
9
|
-
spec.summary =
|
|
10
|
-
spec.description =
|
|
11
|
-
spec.homepage =
|
|
12
|
-
spec.license =
|
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(
|
|
9
|
+
spec.summary = 'nofity command for talentio.'
|
|
10
|
+
spec.description = 'nofity command for talentio.'
|
|
11
|
+
spec.homepage = 'https://github.com/pyama86/talentio-notifier'
|
|
12
|
+
spec.license = 'MIT'
|
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
|
|
14
14
|
|
|
15
|
-
spec.metadata[
|
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
16
16
|
|
|
17
17
|
# Specify which files should be added to the gem when it is released.
|
|
18
18
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
19
|
-
spec.files
|
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
20
20
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
21
21
|
end
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
|
-
spec.require_paths = [
|
|
24
|
-
spec.add_dependency
|
|
25
|
-
spec.add_dependency
|
|
23
|
+
spec.require_paths = ['lib']
|
|
24
|
+
spec.add_dependency 'activesupport'
|
|
25
|
+
spec.add_dependency 'faraday'
|
|
26
|
+
spec.add_dependency 'holiday_jp'
|
|
26
27
|
spec.add_dependency 'slack-api'
|
|
27
28
|
spec.add_dependency 'slack-ruby-client'
|
|
28
|
-
spec.add_dependency
|
|
29
|
-
spec.add_dependency "activesupport"
|
|
29
|
+
spec.add_dependency 'thor'
|
|
30
30
|
end
|
metadata
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: talentio-notifier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- pyama86
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: activesupport
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
@@ -39,7 +39,7 @@ dependencies:
|
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: holiday_jp
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: slack-
|
|
56
|
+
name: slack-api
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: slack-ruby-client
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
@@ -81,7 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: thor
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -96,7 +96,7 @@ dependencies:
|
|
|
96
96
|
version: '0'
|
|
97
97
|
description: nofity command for talentio.
|
|
98
98
|
email:
|
|
99
|
-
-
|
|
99
|
+
- www.kazu.com@gmail.com
|
|
100
100
|
executables:
|
|
101
101
|
- talentio-notifier
|
|
102
102
|
extensions: []
|
|
@@ -138,14 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
138
138
|
requirements:
|
|
139
139
|
- - ">="
|
|
140
140
|
- !ruby/object:Gem::Version
|
|
141
|
-
version:
|
|
141
|
+
version: 3.1.0
|
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
requirements:
|
|
144
144
|
- - ">="
|
|
145
145
|
- !ruby/object:Gem::Version
|
|
146
146
|
version: '0'
|
|
147
147
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
148
|
+
rubygems_version: 3.3.26
|
|
149
149
|
signing_key:
|
|
150
150
|
specification_version: 4
|
|
151
151
|
summary: nofity command for talentio.
|