capistrano-slackify 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/capistrano-slackify.gemspec +1 -1
- data/lib/capistrano/tasks/slackify.cap +1 -0
- data/lib/slackify.rb +5 -0
- data/spec/lib/slackify_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a94d352feaf5e2722d469cef6ee88feaeee669db
|
4
|
+
data.tar.gz: 31b967ad931fd534f248ed669a97aa572f97d7fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c43261a2604a207f4a871adb4e559b53b1eb838a17bbc92d486e1d9c25070945bb5a4b3a494bb509f29a155782b378cf11cde9de8e8b89256dc1daa01ec270f
|
7
|
+
data.tar.gz: 5752ff84c5b8087f2f96cb19db3e609b9a2aa24e4cfb626d9af419d38d05c0d9ff6c48d18aa370e984ebe83c630175388a8ef36b10e8e50a3547ada5f5490096
|
data/README.md
CHANGED
@@ -57,6 +57,7 @@ Any of the defaults can be over-ridden in `config/deploy.rb`:
|
|
57
57
|
set :slack_username, 'Deploybot'
|
58
58
|
set :slack_emoji, ':trollface:'
|
59
59
|
set :slack_user, ENV['GIT_AUTHOR_NAME']
|
60
|
+
set :slack_hosts, -> { release_roles(:all).map(&:hostname).join("\n") }
|
60
61
|
set :slack_text, -> {
|
61
62
|
elapsed = Integer(fetch(:time_finished) - fetch(:time_started))
|
62
63
|
"Revision #{fetch(:current_revision, fetch(:branch))} of " \
|
data/capistrano-slackify.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'capistrano-slackify'
|
7
|
-
spec.version = '2.
|
7
|
+
spec.version = '2.6.0'
|
8
8
|
spec.authors = ['seenmyfate']
|
9
9
|
spec.email = ['seenmyfate@gmail.com']
|
10
10
|
spec.summary = %q{Publish deployment notifications to Slack via the incoming webhooks integration}
|
@@ -58,6 +58,7 @@ namespace :load do
|
|
58
58
|
set :slack_emoji, ':ghost:'
|
59
59
|
set :slack_parse, 'default'
|
60
60
|
set :slack_user, -> { local_user.strip }
|
61
|
+
set :slack_hosts, -> { release_roles(:all).map(&:hostname).join("\n") }
|
61
62
|
set :slack_url, -> { fail ':slack_url is not set' }
|
62
63
|
set :slack_text, lambda {
|
63
64
|
time_elapsed = Integer(fetch(:time_finished) - fetch(:time_started))
|
data/lib/slackify.rb
CHANGED
data/spec/lib/slackify_spec.rb
CHANGED
@@ -10,6 +10,7 @@ module Slackify
|
|
10
10
|
slack_emoji: ':ghost:',
|
11
11
|
slack_parse: 'default',
|
12
12
|
slack_user: 'You',
|
13
|
+
slack_hosts: "192.168.10.1\r192.168.10.2",
|
13
14
|
slack_text: ':boom:',
|
14
15
|
slack_deploy_finished_color: 'good',
|
15
16
|
stage: 'sandbox',
|
@@ -19,7 +20,7 @@ module Slackify
|
|
19
20
|
}
|
20
21
|
|
21
22
|
let(:payload) {
|
22
|
-
%{'payload={"channel":"#general","username":"Capistrano","icon_emoji":":ghost:","parse":"default","attachments":[{"fallback":":boom:","color":"good","text":":boom:","fields":[{"title":"Status","value":"success","short":true},{"title":"Stage","value":"sandbox","short":true},{"title":"Branch","value":"master","short":true},{"title":"Revision","value":"SHA","short":true}]}]}'}
|
23
|
+
%{'payload={"channel":"#general","username":"Capistrano","icon_emoji":":ghost:","parse":"default","attachments":[{"fallback":":boom:","color":"good","text":":boom:","fields":[{"title":"Status","value":"success","short":true},{"title":"Stage","value":"sandbox","short":true},{"title":"Branch","value":"master","short":true},{"title":"Revision","value":"SHA","short":true},{"title":"Hosts","value":"192.168.10.1\\r192.168.10.2","short":true}]}]}'}
|
23
24
|
}
|
24
25
|
|
25
26
|
let(:text) { context.fetch(:slack_text) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-slackify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- seenmyfate
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|