capistrano-deploybot 0.0.1 → 0.0.2
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
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dea9b2ebdb899bb3b04eeff196cd673f9fe79fdb
|
4
|
+
data.tar.gz: 8ea46f88cbbbdc5f789dabb6687041ec5be718a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5b2c951d7b9febb1bb8b83bf91103199f51472c700d3b57a035cc05ccd9021d006f0d84e1a417996d2a133687bbe746a2c3bd40568fea6c5cd9745f44d32cd6
|
7
|
+
data.tar.gz: 04d5872b69158d1d62acf40baa51809c81c3c7d232a8bda3bd8effe7ac62e78319b0066118281f3dda87e92802c5a5667d43a1174ba6d45f59885674ce004d0b
|
@@ -1,6 +1,9 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require 'capistrano-deploybot/version'
|
3
|
+
|
1
4
|
Gem::Specification.new do |s|
|
2
5
|
s.name = 'capistrano-deploybot'
|
3
|
-
s.version =
|
6
|
+
s.version = CapistranoDeploybot::VERSION
|
4
7
|
s.homepage = 'https://github.com/kbackowski/capistrano-deploybot'
|
5
8
|
s.description = 'Notify slack channel with list of deployed commits'
|
6
9
|
s.date = '2017-03-07'
|
@@ -10,5 +13,5 @@ Gem::Specification.new do |s|
|
|
10
13
|
s.files = `git ls-files`.split($/)
|
11
14
|
s.license = 'MIT'
|
12
15
|
|
13
|
-
s.add_dependency 'capistrano', '
|
16
|
+
s.add_dependency 'capistrano', '~> 3.5'
|
14
17
|
end
|
@@ -22,9 +22,11 @@ module CapistranoDeploybot
|
|
22
22
|
|
23
23
|
return if !@opts[:environments].include?(rails_env.to_s) || current_revision == previous_revision
|
24
24
|
|
25
|
+
application_name = @opts[:application_name]
|
26
|
+
deploy_target = deploy_target(rails_env, application_name)
|
25
27
|
payload = {
|
26
28
|
username: @opts[:username],
|
27
|
-
text: payload_text(current_revision, previous_revision,
|
29
|
+
text: payload_text(current_revision, previous_revision, deploy_target)
|
28
30
|
}
|
29
31
|
|
30
32
|
@opts[:webhooks].each do |webhook|
|
@@ -34,8 +36,12 @@ module CapistranoDeploybot
|
|
34
36
|
|
35
37
|
private
|
36
38
|
|
37
|
-
def
|
38
|
-
|
39
|
+
def deploy_target(rails_env, application_name)
|
40
|
+
application_name.nil? ? rails_env : "#{application_name} (#{rails_env})"
|
41
|
+
end
|
42
|
+
|
43
|
+
def payload_text(current_revision, previous_revision, deploy_target)
|
44
|
+
"Deployed to #{deploy_target}:\n" + `git shortlog #{previous_revision}..#{current_revision}`
|
39
45
|
end
|
40
46
|
|
41
47
|
def post_to_webhook(payload)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-deploybot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Baćkowski
|
@@ -14,16 +14,16 @@ dependencies:
|
|
14
14
|
name: capistrano
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.5
|
19
|
+
version: '3.5'
|
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.5
|
26
|
+
version: '3.5'
|
27
27
|
description: Notify slack channel with list of deployed commits
|
28
28
|
email: kbackowski@gmail.com
|
29
29
|
executables: []
|