slack-notify 0.3.2 → 0.6.0

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
- SHA1:
3
- metadata.gz: f3aeabc3229c7b0d40604c184e02f5bbf0cf4bfd
4
- data.tar.gz: 54cfe613f63c08a26336bfa21e09f9c04667e75a
2
+ SHA256:
3
+ metadata.gz: 0d6b954c155bcbae7d94b97ebdb1a9d767c3f0bc3d88e399b63b5b0654044eb3
4
+ data.tar.gz: cb6bc6916ba93a4755f8ff85ce4866519bc37d3e5a1a35253fb8e6ad2aa849e1
5
5
  SHA512:
6
- metadata.gz: 8d934f1e989c9f91b38081407bf38cc74f9ff92cb00157995b6ee63a836622679f896c9e318ddb9ec8089f76501e91a32ab99fb01d99a0617b8345a927591491
7
- data.tar.gz: 8a5088cd804750458979aa8ef953d9cdb6eff73e2879e5f3024cc4ad54677d5d643844e31668060d4a66e3a96e8c33fa8fa448794a7496b4c4fef3cdd7a6e4b2
6
+ metadata.gz: 82811a5f336002015831362cc47fd491d0235e8720ebab753e9b7089a8a7470a772b36afb5427085d5c97fcf31b4c35abd11fac929863997e8f6e0d4a69f3105
7
+ data.tar.gz: f454442325ace3add13e300fdf5f4dfd57051c3a2bd8cec9deee1eed1b5ec366552c84f2f1693da993aa006114a715371cfcccb7dd3ac72e09a2a410d3e3c1f6
@@ -1,3 +1,5 @@
1
1
  rvm:
2
- - "2.0"
3
- - "2.1"
2
+ - "2.2"
3
+ - "2.3"
4
+ - "2.4"
5
+ - "2.5"
@@ -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
@@ -1,6 +1,6 @@
1
1
  # slack-notify
2
2
 
3
- Send notifications to [Slack](http://slack.com/)
3
+ Send notifications to [Slack](http://slack.com/) via webhooks.
4
4
 
5
5
  [![Build Status](http://img.shields.io/travis/sosedoff/slack-notify/master.svg?style=flat)](https://travis-ci.org/sosedoff/slack-notify)
6
6
  [![Code Climate](http://img.shields.io/codeclimate/github/sosedoff/slack-notify.svg?style=flat)](https://codeclimate.com/github/sosedoff/slack-notify)
@@ -37,19 +37,26 @@ require "slack-notify"
37
37
  Initialize client:
38
38
 
39
39
  ```ruby
40
- client = SlackNotify::Client.new("team", "token")
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("team", "token", {
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
+ )
54
+ ```
55
+
56
+ Initialize via shorthand method:
57
+
58
+ ```ruby
59
+ client = SlackNotify.new(options)
53
60
  ```
54
61
 
55
62
  Send test request:
@@ -78,15 +85,8 @@ You can also test gem via rake console:
78
85
  rake console
79
86
  ```
80
87
 
81
- ## Gotchas
82
-
83
- Current issues with Slack API:
84
-
85
- - No message raised if team subdomain is invalid
86
- - 500 server error is raised on bad requests
87
-
88
88
  ## License
89
89
 
90
- Copyright (c) 2013-2014 Dan Sosedoff, <dan.sosedoff@gmail.com>
90
+ Copyright (c) 2013-2015 Dan Sosedoff, <dan.sosedoff@gmail.com>
91
91
 
92
92
  MIT License
@@ -2,4 +2,10 @@ require "slack-notify/version"
2
2
  require "slack-notify/error"
3
3
  require "slack-notify/connection"
4
4
  require "slack-notify/payload"
5
- require "slack-notify/client"
5
+ require "slack-notify/client"
6
+
7
+ module SlackNotify
8
+ def self.new(options = {})
9
+ SlackNotify::Client.new(options)
10
+ end
11
+ end
@@ -5,16 +5,18 @@ module SlackNotify
5
5
  class Client
6
6
  include SlackNotify::Connection
7
7
 
8
- def initialize(team, token, options = {})
9
- @team = team
10
- @token = token
11
- @username = options[:username]
12
- @channel = options[:channel]
13
- @icon_url = options[:icon_url]
14
- @icon_emoji = options[:icon_emoji]
15
- @link_names = options[:link_names]
16
-
17
- validate_arguments
8
+ def initialize(options = {})
9
+ @webhook_url = options[:webhook_url]
10
+ @username = options[:username]
11
+ @channel = options[:channel]
12
+ @icon_url = options[:icon_url]
13
+ @icon_emoji = options[:icon_emoji]
14
+ @link_names = options[:link_names]
15
+ @unfurl_links = options[:unfurl_links] || "1"
16
+
17
+ if @webhook_url.nil?
18
+ raise ArgumentError, "Webhook URL required"
19
+ end
18
20
  end
19
21
 
20
22
  def test
@@ -24,12 +26,13 @@ module SlackNotify
24
26
  def notify(text, channel = nil)
25
27
  delivery_channels(channel).each do |chan|
26
28
  payload = SlackNotify::Payload.new(
27
- text: text,
28
- channel: chan,
29
- username: @username,
30
- icon_url: @icon_url,
31
- icon_emoji: @icon_emoji,
32
- link_names: @link_names
29
+ text: text,
30
+ channel: chan,
31
+ username: @username,
32
+ icon_url: @icon_url,
33
+ icon_emoji: @icon_emoji,
34
+ link_names: @link_names,
35
+ unfurl_links: @unfurl_links
33
36
  )
34
37
 
35
38
  send_payload(payload)
@@ -40,16 +43,6 @@ module SlackNotify
40
43
 
41
44
  private
42
45
 
43
- def validate_arguments
44
- raise ArgumentError, "Team name required" if @team.nil?
45
- raise ArgumentError, "Token required" if @token.nil?
46
- raise ArgumentError, "Invalid team name" unless valid_team_name?
47
- end
48
-
49
- def valid_team_name?
50
- @team =~ /^[a-z\d\-]+$/i ? true : false
51
- end
52
-
53
46
  def delivery_channels(channel)
54
47
  [channel || @channel || "#general"].flatten.compact.uniq
55
48
  end
@@ -1,7 +1,7 @@
1
1
  module SlackNotify
2
2
  module Connection
3
3
  def send_payload(payload)
4
- conn = Faraday.new(hook_url) do |c|
4
+ conn = Faraday.new(@webhook_url) do |c|
5
5
  c.use(Faraday::Request::UrlEncoded)
6
6
  c.adapter(Faraday.default_adapter)
7
7
  c.options.timeout = 5
@@ -24,13 +24,5 @@ module SlackNotify
24
24
  end
25
25
  end
26
26
  end
27
-
28
- def hook_url
29
- "#{base_url}/services/hooks/incoming-webhook?token=#{@token}"
30
- end
31
-
32
- def base_url
33
- "https://#{@team}.slack.com"
34
- end
35
27
  end
36
28
  end
@@ -1,14 +1,21 @@
1
1
  module SlackNotify
2
2
  class Payload
3
- attr_accessor :username, :text, :channel, :icon_url, :icon_emoji, :link_names
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
- @username = options[:username] || "webhookbot"
7
- @channel = options[:channel] || "#general"
8
- @text = options[:text]
9
- @icon_url = options[:icon_url]
10
- @icon_emoji = options[:icon_emoji]
11
- @link_names = options[:link_names]
12
+ @username = options[:username] || "webhookbot"
13
+ @channel = options[:channel] || "#general"
14
+ @text = options[:text]
15
+ @icon_url = options[:icon_url]
16
+ @icon_emoji = options[:icon_emoji]
17
+ @link_names = options[:link_names]
18
+ @unfurl_links = options[:unfurl_links] || "1"
12
19
 
13
20
  unless channel[0] =~ /^(#|@)/
14
21
  @channel = "##{@channel}"
@@ -17,12 +24,13 @@ module SlackNotify
17
24
 
18
25
  def to_hash
19
26
  hash = {
20
- text: text,
21
- username: username,
22
- channel: channel,
23
- icon_url: icon_url,
24
- icon_emoji: icon_emoji,
25
- link_names: link_names
27
+ text: text,
28
+ username: username,
29
+ channel: channel,
30
+ icon_url: icon_url,
31
+ icon_emoji: icon_emoji,
32
+ link_names: link_names,
33
+ unfurl_links: unfurl_links
26
34
  }
27
35
 
28
36
  hash.delete_if { |_,v| v.nil? }
@@ -1,3 +1,3 @@
1
1
  module SlackNotify
2
- VERSION = "0.3.2"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler", "~> 1.3"
22
- spec.add_development_dependency "rake", "~> 10"
23
- spec.add_development_dependency "simplecov", "~> 0.7"
24
- spec.add_development_dependency "rspec", "~> 2.13"
25
- spec.add_development_dependency "webmock", "~> 1.0"
21
+ spec.add_development_dependency "bundler", ">= 1.3"
22
+ spec.add_development_dependency "rake", ">= 10"
23
+ spec.add_development_dependency "simplecov", ">= 0.7"
24
+ spec.add_development_dependency "rspec", ">= 2.13"
25
+ spec.add_development_dependency "webmock", ">= 1.0"
26
26
 
27
- spec.add_dependency "faraday", "~> 0.9.0"
28
- spec.add_dependency "json", "~> 1.8"
27
+ spec.add_dependency "faraday", ">= 0.9"
28
+ spec.add_dependency "json", ">= 1.8"
29
29
  end
@@ -2,36 +2,17 @@ require "spec_helper"
2
2
 
3
3
  describe SlackNotify::Client do
4
4
  describe "#initialize" do
5
- it "requires team name" do
6
- expect { described_class.new(nil, nil) }.
7
- to raise_error ArgumentError, "Team name required"
5
+ it "requires webhook_url" do
6
+ expect { described_class.new }.to raise_error ArgumentError, "Webhook URL required"
8
7
  end
9
8
 
10
- it "requires token" do
11
- expect { described_class.new("foobar", nil) }.
12
- to raise_error ArgumentError, "Token required"
13
- end
14
-
15
- it "raises error on invalid team name" do
16
- names = ["foo bar", "foo $bar", "foo.bar"]
17
-
18
- names.each do |name|
19
- expect { described_class.new(name, "token") }.
20
- to raise_error "Invalid team name"
21
- end
22
- end
23
-
24
- it "does not raise error on valid team name" do
25
- names = ["foo", "Foo", "foo-bar"]
26
-
27
- names.each do |name|
28
- expect { described_class.new(name, "token") }.not_to raise_error
29
- end
9
+ it "does not raise error when webhook_url is set" do
10
+ expect { described_class.new(webhook_url: "foobar") }.not_to raise_error
30
11
  end
31
12
  end
32
13
 
33
14
  describe "#test" do
34
- let(:client) { described_class.new("foo", "token") }
15
+ let(:client) { described_class.new(webhook_url: "foobar") }
35
16
 
36
17
  before do
37
18
  client.stub(:notify)
@@ -44,48 +25,33 @@ describe SlackNotify::Client do
44
25
  end
45
26
 
46
27
  describe "#notify" do
47
- let(:client) { described_class.new("foo", "token") }
28
+ let(:client) do
29
+ described_class.new(webhook_url: "https://hooks.slack.com/services/foo/bar")
30
+ end
48
31
 
49
- it "delivers payload" do
50
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=token").
51
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\"}"=>true},
52
- :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
53
- to_return(:status => 200, :body => "", :headers => {})
32
+ before do
33
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
34
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"unfurl_links\":\"1\"}"=>nil},
35
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
36
+ to_return(:status => 200, :body => "", :headers => {})
37
+ end
54
38
 
39
+ it "delivers payload" do
55
40
  expect(client.notify("Message")).to eq true
56
41
  end
57
42
 
58
- context "with settings from environment variables" do
59
- let(:vars) { ["SLACK_TEAM", "SLACK_TOKEN", "SLACK_CHANNEL", "SLACK_USER"] }
60
-
43
+ context "when icon_url is set" do
61
44
  let(:client) do
62
- described_class.new(ENV["SLACK_TEAM"], ENV["SLACK_TOKEN"], {
63
- channel: ENV["SLACK_CHANNEL"],
64
- username: ENV["SLACK_USER"]
65
- })
45
+ described_class.new(
46
+ webhook_url: "https://hooks.slack.com/services/foo/bar",
47
+ icon_url: "foobar"
48
+ )
66
49
  end
67
50
 
68
51
  before do
69
- vars.each { |v| ENV[v] = "foobar" }
70
- client.stub(:send_payload) { true }
71
- end
72
-
73
- after do
74
- vars.each { |v| ENV.delete(v) }
75
- end
76
-
77
- it "sends data to channel specified by environment variables" do
78
- client.notify("Message")
79
- end
80
- end
81
-
82
- context "when icon_url is set" do
83
- let(:client) { described_class.new("foo", "bar", icon_url: "foobar") }
84
-
85
- before do
86
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=bar").
87
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_url\":\"foobar\"}"=>true},
88
- :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'}).
52
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
53
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_url\":\"foobar\",\"unfurl_links\":\"1\"}"=>nil},
54
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
89
55
  to_return(:status => 200, :body => "", :headers => {})
90
56
  end
91
57
 
@@ -95,12 +61,17 @@ describe SlackNotify::Client do
95
61
  end
96
62
 
97
63
  context "when icon_emoji is set" do
98
- let(:client) { described_class.new("foo", "bar", icon_emoji: "foobar") }
64
+ let(:client) do
65
+ described_class.new(
66
+ webhook_url: "https://hooks.slack.com/services/foo/bar",
67
+ icon_emoji: "foobar"
68
+ )
69
+ end
99
70
 
100
71
  before do
101
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=bar").
102
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_emoji\":\"foobar\"}"=>true},
103
- :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'}).
72
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
73
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"icon_emoji\":\"foobar\",\"unfurl_links\":\"1\"}"=>nil},
74
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
104
75
  to_return(:status => 200, :body => "", :headers => {})
105
76
  end
106
77
 
@@ -110,12 +81,17 @@ describe SlackNotify::Client do
110
81
  end
111
82
 
112
83
  context "when link_names is set" do
113
- let(:client) { described_class.new("foo", "bar", link_names: 1) }
84
+ let(:client) do
85
+ described_class.new(
86
+ webhook_url: "https://hooks.slack.com/services/foo/bar",
87
+ link_names: 1
88
+ )
89
+ end
114
90
 
115
91
  before do
116
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=bar").
117
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"link_names\":1}"=>true},
118
- :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'}).
92
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
93
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"link_names\":1,\"unfurl_links\":\"1\"}"=>nil},
94
+ :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
119
95
  to_return(:status => 200, :body => "", :headers => {})
120
96
  end
121
97
 
@@ -137,8 +113,8 @@ describe SlackNotify::Client do
137
113
 
138
114
  context "when team name is invalid" do
139
115
  before do
140
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=token").
141
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\"}"=>true},
116
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
117
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"unfurl_links\":\"1\"}"=>nil},
142
118
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
143
119
  to_return(:status => 404, :body => "Line 1\nLine 2\nLine 3", :headers => {})
144
120
  end
@@ -150,8 +126,8 @@ describe SlackNotify::Client do
150
126
 
151
127
  context "when token is invalid" do
152
128
  before do
153
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=token").
154
- with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\"}"=>true},
129
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
130
+ with(:body => {"{\"text\":\"Message\",\"username\":\"webhookbot\",\"channel\":\"#general\",\"unfurl_links\":\"1\"}"=>nil},
155
131
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
156
132
  to_return(:status => 500, :body => "No hooks", :headers => {})
157
133
  end
@@ -164,8 +140,8 @@ describe SlackNotify::Client do
164
140
 
165
141
  context "when channel is invalid" do
166
142
  before do
167
- stub_request(:post, "https://foo.slack.com/services/hooks/incoming-webhook?token=token").
168
- with(:body => {"{\"text\":\"message\",\"username\":\"webhookbot\",\"channel\":\"#foobar\"}"=>true},
143
+ stub_request(:post, "https://hooks.slack.com/services/foo/bar").
144
+ with(:body => {"{\"text\":\"message\",\"username\":\"webhookbot\",\"channel\":\"#foobar\",\"unfurl_links\":\"1\"}"=>nil},
169
145
  :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded'}).
170
146
  to_return(:status => 500, :body => "Invalid channel specified", :headers => {})
171
147
  end
@@ -84,6 +84,7 @@ describe SlackNotify::Payload do
84
84
  icon_emoji: ":chart_with_upwards_trend:",
85
85
  link_names: 1,
86
86
  text: "hola",
87
+ unfurl_links: "1",
87
88
  username: "foo"
88
89
  )
89
90
  end
@@ -0,0 +1,9 @@
1
+ require "spec_helper"
2
+
3
+ describe SlackNotify do
4
+ describe ".new" do
5
+ it "returns a client instance" do
6
+ expect(SlackNotify.new(webhook_url: "foobar")).to be_a SlackNotify::Client
7
+ end
8
+ end
9
+ end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-notify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Sosedoff
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-17 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.13'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.13'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: webmock
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: faraday
85
85
  requirement: !ruby/object:Gem::Requirement
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
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.8'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.8'
111
111
  description: Send notifications to a Slack channel
@@ -131,12 +131,13 @@ files:
131
131
  - slack-notify.gemspec
132
132
  - spec/slack-notify/client_spec.rb
133
133
  - spec/slack-notify/payload_spec.rb
134
+ - spec/slack_notify_spec.rb
134
135
  - spec/spec_helper.rb
135
136
  homepage: https://github.com/sosedoff/slack-notify
136
137
  licenses:
137
138
  - MIT
138
139
  metadata: {}
139
- post_install_message:
140
+ post_install_message:
140
141
  rdoc_options: []
141
142
  require_paths:
142
143
  - lib
@@ -151,12 +152,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.2.2
156
- signing_key:
155
+ rubygems_version: 3.0.8
156
+ signing_key:
157
157
  specification_version: 4
158
158
  summary: Send notifications to a Slack channel
159
159
  test_files:
160
160
  - spec/slack-notify/client_spec.rb
161
161
  - spec/slack-notify/payload_spec.rb
162
+ - spec/slack_notify_spec.rb
162
163
  - spec/spec_helper.rb