simple_deploy 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/simple_deploy/notifier.rb +4 -0
- data/lib/simple_deploy/notifier/slack.rb +20 -0
- data/lib/simple_deploy/version.rb +1 -1
- data/simple_deploy.gemspec +1 -0
- data/spec/notifier/slack_spec.rb +18 -0
- metadata +19 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21a62f183767f5eb2b0ad15fc83f37d2235c6bd9
|
4
|
+
data.tar.gz: f3bb0ad9c9000997800defe4d829e516d0bb8602
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c150df5fcf0d5647122d2f96c93e67b19b2a10a2ebdfe073077c881a9d953adcb623399cf6c4282d034e01c52aae9852c1cb97d33f7cc12a906ba98c99ce2a1c
|
7
|
+
data.tar.gz: 626238b4b49ccaeeabb5d49888d2988b9efd94947c6c8deb5d3dba93c2ace20b136d325060356f5dd6ccbd0ef12078814880435846f9a1c3dfdbc5fdbf1e7d7e
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'simple_deploy/notifier/campfire'
|
2
|
+
require 'simple_deploy/notifier/slack'
|
2
3
|
|
3
4
|
module SimpleDeploy
|
4
5
|
class Notifier
|
@@ -36,6 +37,9 @@ module SimpleDeploy
|
|
36
37
|
campfire = Notifier::Campfire.new :stack_name => @stack_name,
|
37
38
|
:environment => @environment
|
38
39
|
campfire.send message
|
40
|
+
when 'slack'
|
41
|
+
slack = Notifier::Slack.new
|
42
|
+
slack.send message
|
39
43
|
end
|
40
44
|
end
|
41
45
|
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'slack-notifier'
|
2
|
+
|
3
|
+
module SimpleDeploy
|
4
|
+
class Notifier
|
5
|
+
class Slack
|
6
|
+
|
7
|
+
def initialize(args = {})
|
8
|
+
@logger = SimpleDeploy.logger
|
9
|
+
@notifier = ::Slack::Notifier.new SimpleDeploy.config.notifications['slack']['webhook_url']
|
10
|
+
end
|
11
|
+
|
12
|
+
def send(message)
|
13
|
+
@logger.info "Sending Slack notification."
|
14
|
+
@notifier.ping message
|
15
|
+
@logger.info "Slack notification complete."
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/simple_deploy.gemspec
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SimpleDeploy::Notifier::Slack do
|
4
|
+
include_context 'stubbed config'
|
5
|
+
include_context 'double stubbed logger'
|
6
|
+
|
7
|
+
before do
|
8
|
+
@notifier = double('slack notifier')
|
9
|
+
::Slack::Notifier.stub(:new => @notifier)
|
10
|
+
@config_mock.stub(:notifications => { 'slack' => { 'webhook_url' => 'url' } })
|
11
|
+
@slack = SimpleDeploy::Notifier::Slack.new
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should send a message to slack' do
|
15
|
+
@notifier.should_receive(:ping).with('message')
|
16
|
+
@slack.send('message')
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Weaver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakefs
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: 0.0.5
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: slack-notifier
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - '='
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 1.2.0
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.2.0
|
153
167
|
description: Opinionated gem for Managing AWS Cloud Formation stacks and deploying
|
154
168
|
updates to Instances.
|
155
169
|
email:
|
@@ -207,6 +221,7 @@ files:
|
|
207
221
|
- lib/simple_deploy/misc/attribute_merger.rb
|
208
222
|
- lib/simple_deploy/notifier.rb
|
209
223
|
- lib/simple_deploy/notifier/campfire.rb
|
224
|
+
- lib/simple_deploy/notifier/slack.rb
|
210
225
|
- lib/simple_deploy/stack.rb
|
211
226
|
- lib/simple_deploy/stack/deployment.rb
|
212
227
|
- lib/simple_deploy/stack/deployment/status.rb
|
@@ -250,6 +265,7 @@ files:
|
|
250
265
|
- spec/logger_spec.rb
|
251
266
|
- spec/misc/attribute_merger_spec.rb
|
252
267
|
- spec/notifier/campfire_spec.rb
|
268
|
+
- spec/notifier/slack_spec.rb
|
253
269
|
- spec/notifier_spec.rb
|
254
270
|
- spec/spec_helper.rb
|
255
271
|
- spec/stack/deployment/status_spec.rb
|
@@ -317,6 +333,7 @@ test_files:
|
|
317
333
|
- spec/logger_spec.rb
|
318
334
|
- spec/misc/attribute_merger_spec.rb
|
319
335
|
- spec/notifier/campfire_spec.rb
|
336
|
+
- spec/notifier/slack_spec.rb
|
320
337
|
- spec/notifier_spec.rb
|
321
338
|
- spec/spec_helper.rb
|
322
339
|
- spec/stack/deployment/status_spec.rb
|