say2slack 0.0.3 → 0.0.6
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/README.md +1 -1
- data/lib/say2slack/main.rb +3 -2
- data/lib/say2slack/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c3360302806cd423a2b8d8ff2fb9c0361850775
|
4
|
+
data.tar.gz: 8a8348fdb0b5a6279447c2bcf1f525498f333631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce90aa241d75b87c58ef6cb86ff86073f2c038dfa238c05d2b544bcfca88e96c77988abf0c41c1cbe44b872f98cd0dba92becd887686fb659fedbb020480d809
|
7
|
+
data.tar.gz: 983e1529046b8e28cbfe0b6553233134b310c47cf48620ab7c32764412d7cbcb84cdbd95763097dd92b890d04462a3cbce22c255650201cadb4c35d5069f223c
|
data/README.md
CHANGED
@@ -26,6 +26,6 @@ Set environment variables for:
|
|
26
26
|
|
27
27
|
Call from your code:
|
28
28
|
|
29
|
-
`"FromName".says("Message").
|
29
|
+
`"FromName".says("Message").to_channel("#roomName")`
|
30
30
|
|
31
31
|
where FromName is who you want the message to be sent from, Message is the text you want posted to the channel, and roomName is the name of the channel you're posting to. roomName can also be a @user. In this instance, it appear in the slackbot thread.
|
data/lib/say2slack/main.rb
CHANGED
@@ -4,7 +4,7 @@ module Say2Slack
|
|
4
4
|
def initialize(user)
|
5
5
|
@user = user
|
6
6
|
@token = ENV['SLACK_API_TOKEN'] || ""
|
7
|
-
@image = ENV['SLACK_BOT_IMG'] || ""
|
7
|
+
@image = ENV['SLACK_BOT_IMG'] || "http://i.imgur.com/EEdDLWz.png"
|
8
8
|
end
|
9
9
|
|
10
10
|
def says(message)
|
@@ -12,7 +12,8 @@ module Say2Slack
|
|
12
12
|
return [
|
13
13
|
"#{endpoint}?token=#{@token}",
|
14
14
|
"username=#{@user}",
|
15
|
-
"text=#{message}"
|
15
|
+
"text=#{message}",
|
16
|
+
"icon_url=#{@image}",
|
16
17
|
].join("&")
|
17
18
|
end
|
18
19
|
end
|
data/lib/say2slack/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: say2slack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Prokesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|