capistrano-slacky 0.1.4 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e892f62e82295a36d7682081bd49b9325ca4acfb6b7567d35b3d30eee900586
4
- data.tar.gz: b2fe16318ad7a07fe5152615b3ddaed80e5a50cf8003b3091ca8aa7a1b2d7f2a
3
+ metadata.gz: c9215dbde585970f40772b0738dfe16ce6fe28c9f1d974540ab0c40ff91eac2d
4
+ data.tar.gz: 1e3a4d6b5a595a9bd30ca70bd4f1a2e220253ec342878a4e392b89cec630d1db
5
5
  SHA512:
6
- metadata.gz: 5f1fafa918f99df51308081d599b96c22d97800629695ffe5f2073e8eb97df259eec2b367776b0f04f4c575350bef4f35b42212b63e6971649aba93e84377e67
7
- data.tar.gz: 8a913baa0918ba16b2ff02ecd4db61984a850ca2b3ca41ad5516bc60988dfbe0b70f31d1d8ded6a1f901078366103a30eb744031b94141be7a868491c36d0f95
6
+ metadata.gz: 74ca7ebf6508ef0a6acf9ffdd536ed1301bda168a78dfdf3124ca530ccbb81e3b36a4fc6bd57ff192c41a1ff159675d2e0a53baa5a25cdd04e9706d5e844c02e
7
+ data.tar.gz: e4387b043edcd26bdd9b83d4b12fa127a672b67ba40414563c8a96931de23dbb4cdedd420ce0a117784f2c2153ff09fec8b13b6b25d4fb5dd1dab11bfa155397
data/CHANGELOG.md CHANGED
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2022-05-02
10
+ ### Changed
11
+ - Add a reverse order for `Diff` to display the correct sequence of merge commits. ([@chubchenko][])
12
+
13
+ ## [0.2.0] - 2021-12-20
14
+ ### Added
15
+ - Add new header emoticons. ([@chubchenko][])
16
+
17
+ ## [0.1.5] - 2021-11-11
18
+ ### Fixed
19
+ - Add fall back in case of the primary server is not defined. ([@chubchenko][])
20
+ - Require `json` to convert `Hash` object to `JSON`. ([@chubchenko][])
21
+
9
22
  ## [0.1.4] - 2021-07-27
10
23
  ### Fixed
11
24
  - Ensure that `:current_revision` exists during rollback. ([@chubchenko][])
@@ -44,7 +57,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
44
57
  - Initial version. ([@chubchenko][])
45
58
 
46
59
  [@chubchenko]: https://github.com/chubchenko
47
- [Unreleased]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.4...HEAD
60
+ [Unreleased]: https://github.com/chubchenko/capistrano-slacky/compare/v0.2.1...HEAD
61
+ [0.2.1]: https://github.com/chubchenko/capistrano-slacky/compare/v0.2.0...v0.2.1
62
+ [0.2.0]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.5...v0.2.0
63
+ [0.1.5]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.4...v0.1.5
48
64
  [0.1.4]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.3...v0.1.4
49
65
  [0.1.3]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.2...v0.1.3
50
66
  [0.1.2]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.1...v0.1.2
data/README.md CHANGED
@@ -51,10 +51,11 @@ bundle install
51
51
  Out of the box, the gem has a default configuration:
52
52
 
53
53
  ```ruby
54
- set :slacky, username: "ChatOps", # Set your bot's user name.
55
- icon_emoji: ":robot_face:", # Emoji to use as the icon for this message.
56
- channel: "#deployment", # The name of the channel to send a message to.
57
- klass: Capistrano::Slacky::Messaging::Default # The class that responsible for creating a message.
54
+ set :slacky,
55
+ username: "ChatOps", # Set your bot's user name.
56
+ icon_emoji: ":robot_face:", # Emoji to use as the icon for this message.
57
+ channel: "#deployment", # The name of the channel to send a message to.
58
+ klass: Capistrano::Slacky::Messaging::Default # The class that responsible for creating a message.
58
59
  ```
59
60
 
60
61
  So you can easily tweak your deployment messages and all other configuration to what you want.
@@ -25,7 +25,7 @@ module Capistrano
25
25
  )
26
26
  end
27
27
 
28
- difference.map do |message|
28
+ difference.reverse.map do |message|
29
29
  ::Capistrano::Slacky::Block::Context.new(
30
30
  *message.to_a
31
31
  )
@@ -9,14 +9,18 @@ module Capistrano
9
9
  ":drooling_face:",
10
10
  ":sunglasses:",
11
11
  ":partying_face:",
12
- ":heart_eyes:"
12
+ ":heart_eyes:",
13
+ ":star-struck:",
14
+ ":yum:"
13
15
  ].freeze
14
16
 
15
17
  REVERTED_SUCCESSFULLY = [
16
18
  ":upside_down_face:",
17
19
  ":pensive:",
18
20
  ":face_with_raised_eyebrow:",
19
- ":worried:"
21
+ ":worried:",
22
+ ":pleading_face:",
23
+ ":shushing_face:"
20
24
  ].freeze
21
25
 
22
26
  DEPLOYMENT_FAILED = [
@@ -26,7 +30,10 @@ module Capistrano
26
30
  ":woozy_face:",
27
31
  ":exploding_head:",
28
32
  ":sob:",
29
- ":cry:"
33
+ ":cry:",
34
+ ":dizzy_face:",
35
+ ":face_with_hand_over_mouth:",
36
+ ":broken_heart:"
30
37
  ].freeze
31
38
 
32
39
  ROLLBACK_FAILED = DEPLOYMENT_FAILED
@@ -8,10 +8,13 @@ module Capistrano
8
8
  @env = env
9
9
 
10
10
  super(
11
- I18n.t("slacky.revision", scope: "capistrano",
12
- repository_url: ::Capistrano::Slacky.repo.url,
13
- current: current,
14
- previous: previous)
11
+ I18n.t(
12
+ "slacky.revision",
13
+ scope: "capistrano",
14
+ repository_url: ::Capistrano::Slacky.repo.url,
15
+ current: current,
16
+ previous: previous
17
+ )
15
18
  )
16
19
  end
17
20
 
@@ -18,7 +18,9 @@ module Capistrano
18
18
  module_function
19
19
 
20
20
  def on(within:, &block)
21
- ::Capistrano::DSL.on(::Capistrano::Configuration.env.primary(:app)) do
21
+ role = ::Capistrano::Configuration.env.primary(:app) || ::Capistrano::Configuration.env.roles(:all).first
22
+
23
+ ::Capistrano::DSL.on(role) do
22
24
  ::SSHKit::Backend.current.within(PATH_MAP.fetch(within).call, &block)
23
25
  end
24
26
  end
@@ -5,6 +5,8 @@ require_relative "messaging"
5
5
  module Capistrano
6
6
  module Slacky
7
7
  class Payload
8
+ require "json"
9
+
8
10
  def initialize(env:, action:)
9
11
  @env = env
10
12
  @action = action
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Slacky
5
- VERSION = "0.1.4"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  namespace :load do
4
+ desc "Load default configuration for slacky"
4
5
  task :defaults do
5
6
  append :linked_files, "config/slacky.yml"
6
7
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-slacky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Chubchenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2022-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 3.0.0
20
17
  - - "~>"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '3.0'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 3.0.0
30
27
  - - "~>"
31
28
  - !ruby/object:Gem::Version
32
29
  version: '3.0'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: '0'
141
141
  requirements: []
142
- rubygems_version: 3.0.8
142
+ rubygems_version: 3.1.6
143
143
  signing_key:
144
144
  specification_version: 4
145
145
  summary: Send Capistrano deployment status to Slack