gfsm 0.7.0 → 0.8.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
  SHA256:
3
- metadata.gz: accb61758c5e95e2715a20c9e2ca48a021539314dea1e9a122efc7b605486554
4
- data.tar.gz: 7414ee6f86661bd4854683d74fb8155a1485cf593ecf2eec5e17835ea236d2c1
3
+ metadata.gz: 264d0008a9d209415a6fe539a3b46d371ec57e903f7164ced417928fa60601e4
4
+ data.tar.gz: b92b89c8d6f9f28a907c47e2fa385f00262c01ab06bc225800168c853600add1
5
5
  SHA512:
6
- metadata.gz: 7628471e0f7b4b0514ab000575632b735bd8e47a6ef694a48f3c2dfcd7a25761b77f86044ac01d37279de6765f05cec7a99e91c44713216097900ed881b47c56
7
- data.tar.gz: dd44e1c57962580accbfed793e34519ee05fb680a9c4a4f9c58f144c85c2abee12371f3b12f7c15d8eb70bc05f1705fa25a106695eaed21fb82bd2fd5a20147f
6
+ metadata.gz: 7830847278316f5bdfaef45b248ee357c300f0ec70f82b2bc4bd0fe95b9b64d2d7edbb3d48b23155a34d6cf455e126ca6eb89f9b237ffaa2576fe4f04e30336f
7
+ data.tar.gz: ad67bf616ddb43cc8780d649fdbb570bcf34a7f7efa07db677556a1be2743093b0d619cf414342acd527e51033f24e7306efdc07114c95edd90723e26373b4fe
data/gfsmrc.yml CHANGED
@@ -38,4 +38,7 @@ change_types:
38
38
  title: "Other"
39
39
  matcher: other
40
40
  bump: patch
41
- priority: 0
41
+ priority: 0
42
+ ignore:
43
+ matcher: ignore
44
+ ignore_on_changelog: true
@@ -105,7 +105,9 @@ module GFSM
105
105
  subdivisions.each do |subdivision_data|
106
106
  change_type = subdivision_data[0]
107
107
  commits = subdivision_data[1]
108
-
108
+
109
+ next if change_type.ignore_on_changelog?
110
+
109
111
  changelog_entries += "#{change_type.to_changelog_entry}\n\n"
110
112
 
111
113
  commits.each do |commit|
@@ -3,13 +3,14 @@
3
3
  module GFSM
4
4
  module Data
5
5
  class ChangeType
6
- attr_reader :matcher, :title, :bump_type, :priority, :commits
6
+ attr_reader :matcher, :title, :bump_type, :priority, :ignore_on_changelog, :commits
7
7
 
8
- def initialize(matcher, title, bump_type, priority)
8
+ def initialize(matcher, title, bump_type, priority, ignore_on_changelog)
9
9
  @matcher = matcher
10
10
  @title = title
11
11
  @bump_type = bump_type
12
12
  @priority = priority
13
+ @ignore_on_changelog = ignore_on_changelog
13
14
  @commits = []
14
15
  end
15
16
 
@@ -25,6 +26,10 @@ module GFSM
25
26
  @bump_type == :patch
26
27
  end
27
28
 
29
+ def ignore_on_changelog?
30
+ @ignore_on_changelog
31
+ end
32
+
28
33
  def to_s
29
34
  @title
30
35
  end
@@ -31,15 +31,16 @@ module GFSM
31
31
 
32
32
  def load_change_types(change_types_config)
33
33
  change_types_config.each do |key, value|
34
- if !value.include?("title") || !value.include?("matcher") || !value.include?("bump")
35
- raise "Change type has invalid configuration"
34
+ if !value.include?("matcher")
35
+ raise "Change type #{key} is missing the matcher"
36
36
  end
37
37
 
38
38
  @change_types << GFSM::Data::ChangeType.new(
39
39
  /#{Regexp.quote(value["matcher"])}/i,
40
- value["title"],
41
- value["bump"].to_sym,
42
- value.include?("priority") ? value["priority"] : -100
40
+ value.include?("title") ? value["title"] : 'no-title',
41
+ value.include?("bump") ? value["bump"].to_sym : :patch,
42
+ value.include?("priority") ? value["priority"] : -100,
43
+ value.include?("ignore_on_changelog") ? value["ignore_on_changelog"] : false,
43
44
  )
44
45
  end
45
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gfsm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zille Marco
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-04 00:00:00.000000000 Z
11
+ date: 2024-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yaml