slack-notify 0.4.0 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7258bd95339bbf7ce21f40177fe44b2cefe94a06
4
- data.tar.gz: a1ff2e2acfcab61138ae1d3558f91616fae29883
3
+ metadata.gz: a34f17a8acb5c086b0e0b443cf114559c8c51d29
4
+ data.tar.gz: 7f49fd573c45047acf618cba1671b03f34ec7b41
5
5
  SHA512:
6
- metadata.gz: 0a25b9e37a3e7e74baf9e81567640f0c6bb93a4f2b9a497a6c78ba5b0908c4e2ed04e8ef2a4f58dc43cbc90e753a4b0d696741171ea7a66924e5d2896570e335
7
- data.tar.gz: a9bbde639753f8077256c3d2c80dd1696e1a031bed8f03c95d73ca82ed3b3068b6fb5283efbc5108e3b47b97a81dc1d62152f068c87b723386896d6e8ed96b31
6
+ metadata.gz: 2811b3ac411fca7cb958698d0dcd3f04cfd7b0af9fde18b569e0217ea51b6ba5326f26f0e4c34b2bfeeaede77b3f2a55e7ea8efe39cea75419422ef346a4fe99
7
+ data.tar.gz: 3f65785e6f256961155f26a632539288e5a1a6f0e4fef040ef871f82d990d64659b856f04bdb8f2e00e85eb3bedb299ee495bbe3f85a30c1cbabeee99e741446
@@ -1,3 +1,4 @@
1
1
  rvm:
2
2
  - "2.0"
3
3
  - "2.1"
4
+ - "2.2"
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2014 Dan Sosedoff, dan.sosedoff@gmail.com
1
+ Copyright (c) 2013-2015 Dan Sosedoff, dan.sosedoff@gmail.com
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -37,19 +37,20 @@ require "slack-notify"
37
37
  Initialize client:
38
38
 
39
39
  ```ruby
40
- client = SlackNotify::Client.new("slack webhook url")
40
+ client = SlackNotify::Client.new(webhook_url: "slack webhook url")
41
41
  ```
42
42
 
43
43
  Initialize with options:
44
44
 
45
45
  ```ruby
46
- client = SlackNotify::Client.new("slack webhook url", {
46
+ client = SlackNotify::Client.new(
47
+ webhook_url: "slack webhook url",
47
48
  channel: "#development",
48
49
  username: "mybot",
49
50
  icon_url: "http://mydomain.com/myimage.png",
50
51
  icon_emoji: ":shipit:",
51
52
  link_names: 1
52
- })
53
+ )
53
54
  ```
54
55
 
55
56
  Initialize via shorthand method:
@@ -86,6 +87,6 @@ rake console
86
87
 
87
88
  ## License
88
89
 
89
- Copyright (c) 2013-2014 Dan Sosedoff, <dan.sosedoff@gmail.com>
90
+ Copyright (c) 2013-2015 Dan Sosedoff, <dan.sosedoff@gmail.com>
90
91
 
91
92
  MIT License
@@ -1,6 +1,12 @@
1
1
  module SlackNotify
2
2
  class Payload
3
- attr_accessor :username, :text, :channel, :icon_url, :icon_emoji, :link_names, :unfurl_links
3
+ attr_accessor :username,
4
+ :text,
5
+ :channel,
6
+ :icon_url,
7
+ :icon_emoji,
8
+ :link_names,
9
+ :unfurl_links
4
10
 
5
11
  def initialize(options = {})
6
12
  @username = options[:username] || "webhookbot"
@@ -1,3 +1,3 @@
1
1
  module SlackNotify
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "rspec", "~> 2.13"
25
25
  spec.add_development_dependency "webmock", "~> 1.0"
26
26
 
27
- spec.add_dependency "faraday", "~> 0.9.0"
27
+ spec.add_dependency "faraday", "~> 0.9"
28
28
  spec.add_dependency "json", "~> 1.8"
29
29
  end
@@ -51,7 +51,7 @@ describe SlackNotify::Client do
51
51
  before do
52
52
  stub_request(:post, "https://hooks.slack.com/services/foo/bar").
53
53
  with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_url\":\"foobar\",\"unfurl_links\":\"1\"}"=>true},
54
- :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.0'}).
54
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
55
55
  to_return(:status => 200, :body => "", :headers => {})
56
56
  end
57
57
 
@@ -71,7 +71,7 @@ describe SlackNotify::Client do
71
71
  before do
72
72
  stub_request(:post, "https://hooks.slack.com/services/foo/bar").
73
73
  with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_emoji\":\"foobar\",\"unfurl_links\":\"1\"}"=>true},
74
- :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.0'}).
74
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
75
75
  to_return(:status => 200, :body => "", :headers => {})
76
76
  end
77
77
 
@@ -91,7 +91,7 @@ describe SlackNotify::Client do
91
91
  before do
92
92
  stub_request(:post, "https://hooks.slack.com/services/foo/bar").
93
93
  with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"link_names\":1,\"unfurl_links\":\"1\"}"=>true},
94
- :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.0'}).
94
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
95
95
  to_return(:status => 200, :body => "", :headers => {})
96
96
  end
97
97
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Sosedoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.0
89
+ version: '0.9'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.0
96
+ version: '0.9'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: json
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.2.2
156
+ rubygems_version: 2.4.6
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Send notifications to a Slack channel