changelog-notifier 1.5.0 → 1.5.1

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
  SHA256:
3
- metadata.gz: 374a3a79445b96144828a772b1cf324709a2cc69299facf1d29c4b1811ab0a37
4
- data.tar.gz: c419bfa4d08532dc332789372018c7f6d1ce70b92e7d07289f4a74907a595cc6
3
+ metadata.gz: 154e3876df8735262e4d2cf193e53085ea4aae8cc95f0b978278d1ccdf167099
4
+ data.tar.gz: e5ea0010059b2f2ddaa0cfed90f8ace817c30331e01ecba84238a6087fe27cf9
5
5
  SHA512:
6
- metadata.gz: f3a42bfdea37eef6b474c803ad6761426171ee44d471d00af49943be9b104ccc4a6a3af762e0670acfab2614011915591c8d5696fc754c9d6d7d542d6365fd24
7
- data.tar.gz: 2c40c703e172c8bb94667818924d434a4758be09d6117e7714856ef4df3ccefcb0732066565cf8bc74114b37abeeccb27e9b0db74c10be5e34e1e967f0abf4a4
6
+ metadata.gz: ca82865286d8ccb44100d257b819e40a46757450d07218c20b2018caaeaab6148204397960adaa104624ade8eba1850ae050b87d028bb06b971dd5a266d1c945
7
+ data.tar.gz: 7cb19c2999a972ecc5d7507d77d0306aaeccf8ab40c92213bf3f67b63152633f704b1e1c40793b8fa9d5ca41385795736e12cc4a50ca909c965fdaa00bcdee0a
data/CHANGELOG.md CHANGED
@@ -6,7 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
-
9
+ ## [1.5.1] - 2021-05-25
10
+ ### Fixed
11
+ - Prevents calling the `publish!` adapter's method with unconfigured adapters
10
12
 
11
13
  ## [1.5.0] - 2020-10-18
12
14
  ### Added
@@ -40,7 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
40
42
  - Slack adapter to post the changelog to a Slack channel
41
43
  - Slack formatter
42
44
 
43
- [Unreleased]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.5.0...master
45
+ [Unreleased]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.5.1...master
46
+ [1.5.1]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.5.0...v1.5.1
44
47
  [1.5.0]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.4.0...v1.5.0
45
48
  [1.4.0]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.3.0...v1.4.0
46
49
  [1.3.0]: https://gitlab.com/zedtux/changelog-notifier/-/compare/v1.2.0...v1.3.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- changelog-notifier (1.4.0)
4
+ changelog-notifier (1.5.1)
5
5
  titleize (~> 1.4.1)
6
6
 
7
7
  GEM
@@ -7,6 +7,10 @@ module Changelog
7
7
  # Creates an ActiveRecord with the changelog
8
8
  #
9
9
  class ActiveRecord < Base
10
+ def configured?
11
+ @model.to_s.empty? == false
12
+ end
13
+
10
14
  def publish!(release_note_hash, version)
11
15
  formatted_release_note = format_release_note_hash(release_note_hash)
12
16
 
@@ -15,6 +15,10 @@ module Changelog
15
15
  fetches_adapter_configuration
16
16
  end
17
17
 
18
+ def configured?
19
+ raise NotImplementedError
20
+ end
21
+
18
22
  def publish!(release_note_hash, version)
19
23
  raise NotImplementedError
20
24
  end
@@ -9,6 +9,10 @@ module Changelog
9
9
  # Slack adapter sends the release note in a Slack channel.
10
10
  #
11
11
  class Slack < Base
12
+ def configured?
13
+ @webhook_url.to_s.empty? == false
14
+ end
15
+
12
16
  def publish!(release_note_hash, version)
13
17
  formatted_release_note = format_release_note_hash(release_note_hash)
14
18
 
@@ -100,8 +100,12 @@ module Changelog
100
100
  [
101
101
  Changelog::Notifier::Adapters::ActiveRecord,
102
102
  Changelog::Notifier::Adapters::Slack
103
- ].each do |adapter|
104
- adapter.new(@capistrano).publish!(@release_note_hash, @version)
103
+ ].each do |adapter_class|
104
+ adapter = adapter_class.new(@capistrano)
105
+
106
+ next unless adapter.configured?
107
+
108
+ adapter.publish!(@release_note_hash, @version)
105
109
  end
106
110
  rescue StandardError => error
107
111
  @capistrano.error error.message
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Changelog
4
4
  module Notifier
5
- VERSION = '1.5.0'
5
+ VERSION = '1.5.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelog-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Hain
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-20 00:00:00.000000000 Z
11
+ date: 2021-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: titleize
@@ -70,7 +70,7 @@ metadata:
70
70
  homepage_uri: https://gitlab.com/zedtux/changelog-notifier
71
71
  source_code_uri: https://gitlab.com/zedtux/changelog-notifier
72
72
  changelog_uri: https://gitlab.com/zedtux/changelog-notifier/-/blob/master/CHANGELOG.md
73
- post_install_message:
73
+ post_install_message:
74
74
  rdoc_options: []
75
75
  require_paths:
76
76
  - lib
@@ -85,8 +85,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.0.4
89
- signing_key:
88
+ rubygems_version: 3.1.4
89
+ signing_key:
90
90
  specification_version: 4
91
91
  summary: Sends current version's release note from your CHANGELOG.md file
92
92
  test_files: []