repp 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/lib/repp/handler/slack.rb +6 -4
- data/lib/repp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0e64beac3df37288beb466cfe647e6ddf855d6ca70e1cc3502602cc7b57d340
|
4
|
+
data.tar.gz: e0c4ff3a28e1703ba70dd3e731f53921f0acf549dc9d316668150d9b5cd0c5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 168361e7d16ae907b1ee0e38225af53feeb0317ddf36d47bc41612c0948dc3fa83181a2beaf2ef6f710c944e480d3f21f23f46b10f3577d4307809e633b547a4
|
7
|
+
data.tar.gz: cff245448996af9994bdeb24f56a58ca12891e8b82f7c2965afd28f8f59acaf7b3a8ff6d7d7db8d6e52595e615665acefeaa5d62fa68754f56728228591370b4
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.3.1
|
4
|
+
|
5
|
+
- Fix wrong slack api method name [#7](https://github.com/kinoppyd/repp/pull/7)
|
6
|
+
- Add attachment options for Slack handler [#6](https://github.com/kinoppyd/repp/pull/6)
|
7
|
+
|
8
|
+
## 0.3.0
|
9
|
+
|
10
|
+
- cron
|
11
|
+
|
12
|
+
## 0.2.0
|
13
|
+
|
14
|
+
- Some slack options
|
15
|
+
|
16
|
+
## 0.1.0
|
17
|
+
|
18
|
+
- First release
|
data/lib/repp/handler/slack.rb
CHANGED
@@ -21,7 +21,7 @@ module Repp
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def users(refresh = false)
|
24
|
-
@users = @web_client.
|
24
|
+
@users = @web_client.users_list.members if refresh
|
25
25
|
@users ||= @web_client.users_list.members
|
26
26
|
end
|
27
27
|
|
@@ -46,8 +46,9 @@ module Repp
|
|
46
46
|
|
47
47
|
res = app.call(receive)
|
48
48
|
if res.first
|
49
|
-
channel_to_post = res.last
|
50
|
-
|
49
|
+
channel_to_post = res.last && res.last[:channel] || receive.channel
|
50
|
+
attachments = res.last && res.last[:attachments]
|
51
|
+
web_client.chat_postMessage(text: res.first, channel: channel_to_post, as_user: true, attachments: attachments)
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
@@ -70,7 +71,8 @@ module Repp
|
|
70
71
|
if res.first
|
71
72
|
if res.last && res.last[:dest_channel]
|
72
73
|
channel_to_post = res.last[:dest_channel]
|
73
|
-
|
74
|
+
attachments = res.last[:attachments]
|
75
|
+
@web_client.chat_postMessage(text: res.first, channel: channel_to_post, as_user: true, attachments: attachments)
|
74
76
|
else
|
75
77
|
message = "Need 'dest_to:' option to every or cron job like:\n" +
|
76
78
|
"every 1.hour, dest_to: 'channel_name' do"
|
data/lib/repp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: repp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kinoppyd
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -116,6 +116,7 @@ extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
|
+
- CHANGELOG.md
|
119
120
|
- Gemfile
|
120
121
|
- LICENSE.txt
|
121
122
|
- README.md
|