slack_webhooks 0.0.1 → 0.0.2
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/.gitignore +2 -0
- data/lib/slack_webhooks.rb +4 -6
- data/lib/slack_webhooks/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87d94f9648f93f317b9dfc4e8849bf27698d023f
|
4
|
+
data.tar.gz: 7c8ed99fc380f96d3b2c9434c85e5ba9adf3aefa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1a82264d814f23db2cdbcf2911b33ce5fc495f2e3786a76bf1e2d9fb26060584316255c3b54b4df7d405ba10fb971f7b594f430aa56c82acbac4c2a88df72f6
|
7
|
+
data.tar.gz: 27169b54ceb33e6abd11b514e93b9728fd188902bafaff4554ccf3c1b0cecf57940b0e5f6a2ca13de9a1b4418cf283d7b3aa27cdb3df66dc619e27751305b245
|
data/.gitignore
ADDED
data/lib/slack_webhooks.rb
CHANGED
@@ -45,7 +45,7 @@ module SlackWebhooks
|
|
45
45
|
|
46
46
|
end
|
47
47
|
|
48
|
-
def send(s,
|
48
|
+
def send(s, options={})
|
49
49
|
# Now send it to back to the channel on slack
|
50
50
|
s = "#{command} #{text}" if s.nil?
|
51
51
|
puts "Posting #{s} to #{channel}. .."
|
@@ -54,11 +54,9 @@ module SlackWebhooks
|
|
54
54
|
notifier.username = botname
|
55
55
|
|
56
56
|
resp = nil
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
resp = notifier.ping s
|
61
|
-
end
|
57
|
+
attachment = options.delete(:attachment)
|
58
|
+
options[:attachments] = [attachment]
|
59
|
+
resp = notifier.ping s, options
|
62
60
|
|
63
61
|
p resp
|
64
62
|
p resp.message
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack_webhooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Travis Reeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slack-notifier
|
@@ -30,6 +30,7 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- ".gitignore"
|
33
34
|
- Gemfile
|
34
35
|
- Gemfile.lock
|
35
36
|
- README.md
|