slack_webhooks 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 8b322a902e2ebff402b2cf73be5baeb7eca9eec7
4
- data.tar.gz: dcda6b9cdc7e68f138d138ed69c170411f75fdbf
3
+ metadata.gz: 87d94f9648f93f317b9dfc4e8849bf27698d023f
4
+ data.tar.gz: 7c8ed99fc380f96d3b2c9434c85e5ba9adf3aefa
5
5
  SHA512:
6
- metadata.gz: 34bd5a0fa88a73efe0e994ad132fa7b07519f2147c54d385c60c3c27476aa8ae80ba7023a447eb0bcfc5a01b14f6add067150fabd381bfb8cdf8566042f82d29
7
- data.tar.gz: 89b34ac67cc5f013badd7a7f6024d49c7e1edefedfdf3ae40cb9a5b4ff6c2d0e46a3b6987b16b18ca62b8e068def29fad0dc0499cffd1ec8305a21b99f8d6a67
6
+ metadata.gz: e1a82264d814f23db2cdbcf2911b33ce5fc495f2e3786a76bf1e2d9fb26060584316255c3b54b4df7d405ba10fb971f7b594f430aa56c82acbac4c2a88df72f6
7
+ data.tar.gz: 27169b54ceb33e6abd11b514e93b9728fd188902bafaff4554ccf3c1b0cecf57940b0e5f6a2ca13de9a1b4418cf283d7b3aa27cdb3df66dc619e27751305b245
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .idea/
2
+ *.gem
@@ -45,7 +45,7 @@ module SlackWebhooks
45
45
 
46
46
  end
47
47
 
48
- def send(s, attachment=nil)
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
- if attachment
58
- resp = notifier.ping s, attachments: [attachment]
59
- else
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
@@ -1,3 +1,3 @@
1
1
  module SlackWebhooks
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-08 00:00:00.000000000 Z
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