slack-notify 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -2
- data/Rakefile +2 -0
- data/lib/slack-notify/connection.rb +4 -2
- data/lib/slack-notify/version.rb +1 -1
- data/slack-notify.gemspec +1 -1
- data/spec/slack-notify/client_spec.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c643856420715a7cb90434dc3c1c5afdf7da488b
|
4
|
+
data.tar.gz: f73121509a88d716b54b875f431db25f3355dec1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 719157dda53b568ff17a98b42a6d6bbe0f5feb1c609359f7e34aeb3da38e9a7b3f45a06482623bdf9f04f69ac9e3ff50511b5b79e83e60a16efac3469a3efa4a
|
7
|
+
data.tar.gz: 355bcb7153a585d9dad1322bbe45c854c21f4b4f279ffa26608461bf95986c97e52c2b0e087a1fcdb825b30d9362b81ccb19814973cc4bcf24c109d4073b1ebe
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
module SlackNotify
|
2
2
|
module Connection
|
3
3
|
def send_payload(payload)
|
4
|
-
conn = Faraday.new(hook_url
|
4
|
+
conn = Faraday.new(hook_url) do |c|
|
5
5
|
c.use(Faraday::Request::UrlEncoded)
|
6
6
|
c.adapter(Faraday.default_adapter)
|
7
|
+
c.options.timeout = 5
|
8
|
+
c.options.open_timeout = 5
|
7
9
|
end
|
8
10
|
|
9
11
|
response = conn.post do |req|
|
@@ -31,4 +33,4 @@ module SlackNotify
|
|
31
33
|
"https://#{@team}.slack.com"
|
32
34
|
end
|
33
35
|
end
|
34
|
-
end
|
36
|
+
end
|
data/lib/slack-notify/version.rb
CHANGED
data/slack-notify.gemspec
CHANGED
@@ -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", "
|
27
|
+
spec.add_dependency "faraday", "~> 0.9.0"
|
28
28
|
spec.add_dependency "json", "~> 1.8"
|
29
29
|
end
|
@@ -77,7 +77,7 @@ describe SlackNotify::Client do
|
|
77
77
|
before do
|
78
78
|
stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=bar").
|
79
79
|
with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_url\":\"foobar\"}"=>true},
|
80
|
-
: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.
|
80
|
+
: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'}).
|
81
81
|
to_return(:status => 200, :body => "", :headers => {})
|
82
82
|
end
|
83
83
|
|
@@ -92,7 +92,7 @@ describe SlackNotify::Client do
|
|
92
92
|
before do
|
93
93
|
stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=bar").
|
94
94
|
with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_emoji\":\"foobar\"}"=>true},
|
95
|
-
: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.
|
95
|
+
: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'}).
|
96
96
|
to_return(:status => 200, :body => "", :headers => {})
|
97
97
|
end
|
98
98
|
|
@@ -153,4 +153,4 @@ describe SlackNotify::Client do
|
|
153
153
|
end
|
154
154
|
end
|
155
155
|
end
|
156
|
-
end
|
156
|
+
end
|
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
|
+
version: 0.3.0
|
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
|
+
date: 2014-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -84,14 +84,14 @@ dependencies:
|
|
84
84
|
name: faraday
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 0.9.0
|
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
96
|
version: 0.9.0
|
97
97
|
- !ruby/object:Gem::Dependency
|