capistrano-fiesta 1.2.1 → 1.3.0

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: 7af830bd829413e7e61665a095eaa27523fd445a
4
- data.tar.gz: e5bd5aae82e6a19fdf64c63223667b73bed5a107
3
+ metadata.gz: d4ef87a6331f9125a0679b6e93f160868b4d72ef
4
+ data.tar.gz: 44de2df8fea44f9eb1a638c8d63d205e5c3beccb
5
5
  SHA512:
6
- metadata.gz: aff19be736c3ce0728dee1188527e47ba0e8d2d2917e1148983fe67dd7391fdba4a27627869e9748d292f29b6e8c1924d5fc403d37bdaa558447ae7abcd8e070
7
- data.tar.gz: f32b823bcbb84862dafbb45e5d0eb6140d68271353cee33ff680286ad6d94cd6b854a36baef14adf0a954f6f40e42a0080c8c87de9ede390ed7d7a225363dcbf
6
+ metadata.gz: d67050c904372392c7db515947a5b2d7f5c972f71b81eee4c37b593237f6de2109dce2abaf2fcb16456f0cf6191f9b5a1b6d578abef28066a14de9a3db7c6370
7
+ data.tar.gz: 9e463c8770bb7b690cc35f2abe41df8f7be78a88785d4d7af94b03b82ea82b66439f1be7c304b8389f4a6116ae8683e1077f2333df701db1a730fe071db3341a
@@ -20,10 +20,11 @@ module Capistrano
20
20
  @stories = merged_pull_requests.map { |pr| Story.new(pr) }
21
21
  end
22
22
 
23
- def announce(channel: 'releases', **options)
23
+ def announce(options = {})
24
24
  text = editor.compose if stories.any?
25
25
  return Logger.warn('Announcement blank, nothing posted to Slack') if text.nil? || text.empty?
26
- chat.post options.merge(payload: { channel: channel, username: 'New Releases', icon_emoji: ':tada:', text: text })
26
+ options[:payload] = options.fetch(:payload, {}).merge(text: text)
27
+ chat.post(options)
27
28
  text
28
29
  rescue NameError => e
29
30
  Logger.warn "Install Slackistrano to announce releases on Slack (#{e.message})"
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Fiesta
3
- VERSION = "1.2.1"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -14,7 +14,7 @@ namespace :fiesta do
14
14
 
15
15
  task :announce do
16
16
  run_locally do
17
- report.announce(slack)
17
+ report.announce(slack_params)
18
18
  report.create_release fetch(:release_timestamp) if fetch(:branch) == 'master'
19
19
  Capistrano::Fiesta::Logger.logs.each { |log| warn log }
20
20
  end
@@ -33,13 +33,17 @@ namespace :fiesta do
33
33
  last_release
34
34
  end
35
35
 
36
- def slack
36
+ def slack_params
37
37
  {
38
38
  team: fetch(:slack_team),
39
39
  token: fetch(:slack_token),
40
40
  webhook: fetch(:slack_webhook),
41
41
  via_slackbot: fetch(:slack_via_slackbot),
42
- channel: fetch(:fiesta_slack_channel)
42
+ payload: {
43
+ channel: fetch(:fiesta_slack_channel) || 'releases',
44
+ username: fetch(:fiesta_slack_username) || 'New Releases',
45
+ icon_emoji: ':tada:'
46
+ }
43
47
  }
44
48
  end
45
49
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-fiesta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Balvig
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-08 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -203,4 +203,3 @@ signing_key:
203
203
  specification_version: 4
204
204
  summary: Celebrate your releases!
205
205
  test_files: []
206
- has_rdoc: