slackistrano 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: 3a0b7b8ad94187f52d1919eabdbb2670ebcae28f
4
- data.tar.gz: 0bfd2af16bec175976fed9db8749ba52e574352a
3
+ metadata.gz: 7350c269ff5c94d10f9f36fc076df3d75a04688b
4
+ data.tar.gz: 63950460d7105f37f8fc03d71dc080eec681e22c
5
5
  SHA512:
6
- metadata.gz: b22bf23aa0c25589529ae382853e67be8f854911cc99f6250c580ae80271d3eecb86446630a92aab11410212015ffe1968e16350917a579e5a1dbd9bdb2de372
7
- data.tar.gz: c6b843f93945ac393d80726d9fb8d5b844c1ae31d9e0b313abb6630d0fcef06e90de2e3d697ec535f957b7c4c7b32b5f4da6baac0289d91eb658d027b6071c02
6
+ metadata.gz: 4c24688ffa9f549a563d98557136c32897fe21f7c6d9fc50bdb3512322cef78001ab8d3b8fde251eee52f0e7f0b495d43b43b4b1fc8916221c30a84eadf37f79
7
+ data.tar.gz: 57306c71a67d306b3a8876e749d18e7675edec79415bca26119fbc413b18897aca05a9f06511d24aa54cc235be0b0d423d2f0055474acc209fbd8d747f9eaf2f
data/README.md CHANGED
@@ -45,8 +45,10 @@ Optionally, override the other slack settings:
45
45
  set :slack_username, ->{ 'Slackistrano' }
46
46
  set :slack_run_starting, ->{ true }
47
47
  set :slack_run_finished, ->{ true }
48
+ set :slack_msg_starting, ->{ "#{ENV['USER'] || ENV['USERNAME']} has started deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}." }
49
+ set :slack_msg_finished, ->{ "#{ENV['USER'] || ENV['USERNAME']} has finished deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}." }
48
50
 
49
- Note: You may wish to disable one of the notifications if another service (ex:
51
+ **Note**: You may wish to disable one of the notifications if another service (ex:
50
52
  Honeybadger) also displays a deploy notification.
51
53
 
52
54
  Test your setup by running:
@@ -5,7 +5,6 @@ namespace :slack do
5
5
  task :starting do
6
6
  if fetch(:slack_run_starting)
7
7
  run_locally do
8
- text = "#{ENV['USER'] || ENV['USERNAME']} has started deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}."
9
8
  Slackistrano.post(
10
9
  team: fetch(:slack_team),
11
10
  token: fetch(:slack_token),
@@ -13,7 +12,7 @@ namespace :slack do
13
12
  channel: fetch(:slack_channel),
14
13
  username: fetch(:slack_username),
15
14
  icon_url: fetch(:slack_icon_url),
16
- text: text
15
+ text: fetch(:slack_msg_starting)
17
16
  }
18
17
  )
19
18
  end
@@ -23,7 +22,6 @@ namespace :slack do
23
22
  task :finished do
24
23
  if fetch(:slack_run_finished)
25
24
  run_locally do
26
- text = "#{ENV['USER'] || ENV['USERNAME']} has finished deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}."
27
25
  Slackistrano.post(
28
26
  team: fetch(:slack_team),
29
27
  token: fetch(:slack_token),
@@ -31,7 +29,7 @@ namespace :slack do
31
29
  channel: fetch(:slack_channel),
32
30
  username: fetch(:slack_username),
33
31
  icon_url: fetch(:slack_icon_url),
34
- text: text
32
+ text: fetch(:slack_msg_finished)
35
33
  }
36
34
  )
37
35
  end
@@ -52,5 +50,7 @@ namespace :load do
52
50
  set :slack_username, ->{ 'Slackistrano' }
53
51
  set :slack_run_starting, ->{ true } # Set to false to disable starting message.
54
52
  set :slack_run_finished, ->{ true } # Set to false to disable finished message.
53
+ set :slack_msg_starting, ->{ "#{ENV['USER'] || ENV['USERNAME']} has started deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}." }
54
+ set :slack_msg_finished, ->{ "#{ENV['USER'] || ENV['USERNAME']} has finished deploying branch #{fetch :branch} of #{fetch :application} to #{fetch :rails_env, 'production'}." }
55
55
  end
56
56
  end
@@ -1,3 +1,3 @@
1
1
  module Slackistrano
2
- VERSION = '0.0.6'
2
+ VERSION = '0.0.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slackistrano
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
  - Philip Hallstrom