capistrano-slacky 0.1.0 → 0.1.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: c87234b5cfdadfb8ce089157537abe447d9836f10bb53b457a2e56dbd8a43f39
4
- data.tar.gz: 8c80128b0c46a4b1e7882a8c13cdb68d627054d341605148eeb88964cd43dd63
3
+ metadata.gz: 386586f5b65ad40376cdf7e1fcd1bb915445c8142bb1159027da83acbda7fc48
4
+ data.tar.gz: e7a7ce2418418b4285401c8b5d737284d9d9b2930ac1c7f9514c33a49b3cb2d7
5
5
  SHA512:
6
- metadata.gz: a4a123f09d2ea1285546071859f1bd2fa7d2a86b100e435f580b410a9e348f540fd2717769a8b3fff7862ade8c9aa62b8973c1b971b8f867f9793ee5b942c89f
7
- data.tar.gz: 6918fccca963085fc524885ff4adee5cc8fa5b28723417f60a6fcdfa049728c04eb079458268d0f86dd4b7e8067030500ba11ff3be48535bbecc21ce78b34467
6
+ metadata.gz: ab2a70933589f9e2b0f1c664c5f83aa349862d945484b395d411b8c624fc3c089d147ae392e892793cb313419cd91e12b0e40c005f1847af5dfff61d667ef994
7
+ data.tar.gz: d84c8b2287b2a08c3b140e09e8dcc9bd51a363909a5e7f18ce9b7a3ee7753c07ca6e6bdc84cde690011879bcbd1ade0f5999b18b1e39ac902a5b85cc50734b8b
data/CHANGELOG.md CHANGED
@@ -6,8 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.1] - 2021-05-27
10
+ ### Fixed
11
+ - Fix a bug related to using a `Null` messaging
12
+
9
13
  ## [0.1.0] - 2021-05-26
10
14
  ### Added
11
15
  - Initial version. ([@chubchenko][])
12
16
 
13
17
  [@chubchenko]: https://github.com/chubchenko
18
+ [Unreleased]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.1...HEAD
19
+ [0.1.1]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.0...v0.1.1
20
+ [0.1.0]: https://github.com/chubchenko/capistrano-slacky/releases/tag/v0.1.0
@@ -11,15 +11,25 @@ module Capistrano
11
11
  @messaging = ::Capistrano::Slacky::Messaging.for(env: env)
12
12
  end
13
13
 
14
+ def empty?
15
+ payload_for_action.nil?
16
+ end
17
+
14
18
  def to_json
15
19
  {
16
20
  username: ::Capistrano::Slacky.username,
17
21
  icon_emoji: ::Capistrano::Slacky.icon_emoji,
18
22
  channel: ::Capistrano::Slacky.channel
19
23
  }.merge(
20
- @messaging.payload_for(action: @action)
24
+ payload_for_action
21
25
  ).to_json
22
26
  end
27
+
28
+ private
29
+
30
+ def payload_for_action
31
+ @payload_for_action ||= @messaging.payload_for(action: @action)
32
+ end
23
33
  end
24
34
  end
25
35
  end
@@ -11,6 +11,8 @@ module Capistrano
11
11
  env: env, action: action
12
12
  )
13
13
 
14
+ return if payload.empty?
15
+
14
16
  ::Capistrano::Slacky::Fanout.call(payload: payload)
15
17
  end
16
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capistrano
4
4
  module Slacky
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-slacky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.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-05-26 00:00:00.000000000 Z
11
+ date: 2021-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano