capistrano-slack_notification 0.0.6 → 0.0.7

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: 769e83e337729442f5ba62844b9eca6eccbaaab0
4
- data.tar.gz: ccec546c35885f9d02d9428bb1a39c19fa0e22e3
3
+ metadata.gz: 7e72e1677f4f337d523465026ab43fea05f32d22
4
+ data.tar.gz: 12789f427d1f7aca2918d3cccef2577adb9d7eac
5
5
  SHA512:
6
- metadata.gz: 364de8da5f1eec21eb654746aa3aa2862b2547f4e6d896cbd1aca9545aaf029a31af7807d04903db67a96f7d20bbbca262aa9fbacd8b6fbe0973d461e9c4aed2
7
- data.tar.gz: d82959bfc35c5249f09ffe47f7cf4e5962315827348278b85d1cd1918cc81c2dea62018d6b0fb0c3c4b7277f453d30488c71783fdfaa9f2e1a476f272e1fa836
6
+ metadata.gz: 4d1afca5522d9ac6cb2f97b7405ab6a645229163861d5aadea83b9124fa759d8b0cbd19ed9301be67f9690be0e358bbf1398ec55f7ecbda533c34907c7d3ef2a
7
+ data.tar.gz: 2f2abba849a4ac834e3294ff54eb9ac275c202ba436953d6cfc7faba8a440cb2bbed1b7545a12529b28da16a021c297422458f9b3a7d85831a6f7e5305d3ba7d
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module SlackNotification
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
5
5
  end
@@ -34,29 +34,36 @@ namespace :slack do
34
34
  channel: fetch(:slack_channel),
35
35
  icon_url: fetch(:slack_icon_url),
36
36
  text: '',
37
- link_names: 1
37
+ link_names: 1,
38
+ mrkdwn: true
38
39
  }
39
40
  }
40
41
 
41
42
  set :slack_start_body, -> {
43
+ text = "Started deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
44
+ " (branch #{fetch(:branch)})",
45
+
42
46
  fetch(:slack_default_body).merge(
43
47
  attachments: JSON.dump([{
44
48
  color: "warning",
45
49
  title: fetch(:application),
46
- text: "Started deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
47
- " (branch #{fetch(:branch)})",
50
+ text: text,
51
+ fallback: text,
48
52
  mrkdwn_in: ['text']
49
53
  }])
50
54
  )
51
55
  }
52
56
 
53
57
  set :slack_failure_body, -> {
58
+ text = "Failed deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
59
+ " (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)"
60
+
54
61
  fetch(:slack_default_body).merge(
55
62
  attachments: JSON.dump([{
56
63
  color: 'danger',
57
64
  title: fetch(:application),
58
- text: "Failed deploying to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
59
- " (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)",
65
+ text: text,
66
+ fallback: text,
60
67
  mrkdwn_in: ['text']
61
68
  }])
62
69
  )
@@ -64,12 +71,15 @@ namespace :slack do
64
71
 
65
72
  set :slack_success_body, -> {
66
73
  task = fetch(:deploying) ? 'deployment' : '*rollback*'
74
+ text = "Successful #{task} to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
75
+ " (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)"
76
+
67
77
  fetch(:slack_default_body).merge(
68
78
  attachments: JSON.dump([{
69
79
  color: 'good',
70
80
  title: fetch(:application),
71
- text: "Successful #{task} to #{fetch(:slack_stage)} by @#{fetch(:slack_deployer)}" +
72
- " (branch #{fetch(:branch)} at #{fetch(:current_revision)} / #{elapsed_time.call} sec)",
81
+ text: text,
82
+ fallback: text,
73
83
  mrkdwn_in: ['text']
74
84
  }])
75
85
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-slack_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - linyows