slackistrano 2.0.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +12 -12
- data/lib/slackistrano/capistrano.rb +7 -4
- data/lib/slackistrano/version.rb +1 -1
- data/slackistrano.gemspec +1 -1
- data/spec/dry_run_spec.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a1150f8f084d30eee0a6980e1c0da4dc1b1ed9
|
4
|
+
data.tar.gz: 9cd936ebeafd517be8bd517c8de4dbf0f29a2b0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d24aba67028a48026a16c83911093d6a10f44851fedb38cc6cac106b4af1027538f2c376b40904154ca6c226fb6e7abcb9bd25819d5e359fe6549157a51ed2a
|
7
|
+
data.tar.gz: ee872b49c00d621d5b40bd3122ef5921bd56305503886d696bebdd424f7e18f62d178469268e92ff4c94cfb34f7fa1b89093acd4524de69c8fbfa4d86d4aca48
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -146,24 +146,24 @@ set :slack_msg_updated, nil
|
|
146
146
|
set :slack_fallback_updated, "#{fetch(:slack_deploy_user)} deployed #{fetch(:application)} on #{fetch(:stage)}"
|
147
147
|
set :slack_fields_updated, [
|
148
148
|
{
|
149
|
-
|
150
|
-
|
151
|
-
|
149
|
+
title: "Project",
|
150
|
+
value: "<https://github.com/XXXXX/#{fetch(:application)}|#{fetch(:application)}>",
|
151
|
+
short: true
|
152
152
|
},
|
153
153
|
{
|
154
|
-
|
155
|
-
|
156
|
-
|
154
|
+
title: "Environment",
|
155
|
+
value: fetch(:stage),
|
156
|
+
short: true
|
157
157
|
},
|
158
158
|
{
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
title: "Deployer",
|
160
|
+
value: fetch(:slack_deploy_user),
|
161
|
+
short: true
|
162
162
|
},
|
163
163
|
{
|
164
|
-
|
165
|
-
|
166
|
-
|
164
|
+
title: "Revision",
|
165
|
+
value: "<https://github.com/XXXXX/#{fetch(:application)}/commit/#{fetch(:slack_revision)}|#{fetch(:slack_revision)[0..6]}>",
|
166
|
+
short: true
|
167
167
|
}
|
168
168
|
]
|
169
169
|
```
|
@@ -67,10 +67,13 @@ module Slackistrano
|
|
67
67
|
channels.each do |channel|
|
68
68
|
payload[:channel] = channel
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
70
|
+
dry_run = if ::Capistrano::Configuration.respond_to?(:dry_run?)
|
71
|
+
::Capistrano::Configuration.dry_run?
|
72
|
+
else
|
73
|
+
::Capistrano::Configuration.env.send(:config)[:sshkit_backend] == SSHKit::Backend::Printer
|
74
|
+
end
|
75
|
+
|
76
|
+
if dry_run
|
74
77
|
backend.info("[slackistrano] Slackistrano Dry Run:")
|
75
78
|
backend.info("[slackistrano] Team: #{team}")
|
76
79
|
backend.info("[slackistrano] Webhook: #{webhook}")
|
data/lib/slackistrano/version.rb
CHANGED
data/slackistrano.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
21
|
gem.require_paths = ["lib"]
|
22
22
|
|
23
|
-
gem.add_dependency 'capistrano', '>= 3.0
|
23
|
+
gem.add_dependency 'capistrano', '>= 3.5.0'
|
24
24
|
gem.add_dependency 'json'
|
25
25
|
gem.add_development_dependency 'rake'
|
26
26
|
gem.add_development_dependency 'rspec'
|
data/spec/dry_run_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe Slackistrano do
|
|
8
8
|
%w[updating reverting updated reverted failed].each do |stage|
|
9
9
|
it "does not post to slack on slack:deploy:#{stage}" do
|
10
10
|
set "slack_run_#{stage}".to_sym, ->{ true }
|
11
|
-
expect(Capistrano::Configuration
|
11
|
+
expect(Capistrano::Configuration).to receive(:dry_run?).and_return(true)
|
12
12
|
expect(Slackistrano).not_to receive(:post)
|
13
13
|
Rake::Task["slack:deploy:#{stage}"].execute
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slackistrano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philip Hallstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
19
|
+
version: 3.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0
|
26
|
+
version: 3.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.5.1
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Send notifications to Slack about Capistrano deployments.
|