conventional_commits 0.2.14 → 0.2.15

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: 70c33309671e6ba5bc0041652ab0b2fbd69db9db4323b92aee572aa7b7111883
4
- data.tar.gz: 96cc3b6a10d994a67c91364c6c68514270a4d8650ab0c62457564fbee5df6324
3
+ metadata.gz: a536d7b08e52650664fa3a912f10526b0a637de935f4bb23066e55ba9f887a56
4
+ data.tar.gz: 927e89c493bc2f4d9427c1c88e2231dcd666e9b84efc50b3af93c379c79ff8a8
5
5
  SHA512:
6
- metadata.gz: 0b4c15d408def561c8904fafa019981505308b26bb290bd28fb36b2905176b66743c1f3d5c410f70f594d5b67b7c5397c754fdb60c91b7b98bceb375ad5a69a1
7
- data.tar.gz: 6d4fe48827fbfcd57ba6c44680236b9697da12ebcf60198223ee5d89c5a9c9809406b3e01f7d45cd4d706c0743b7c758650df7180db36298d0050dcce642dc4c
6
+ metadata.gz: 4f328aa50466dc8b4f6847596d9404e83c44bd5a1426177de7e37106c2289d04c19785f828fc0324f8ee97ce9808972a9c36555fb872ec7d3720d0ce6471ccd2
7
+ data.tar.gz: d088f3e38981a01debcb1fe894ac97f8dfa4929c17121105272ea4c65320ac08a19466d0eff51b32ac804aed776ae15ad3a17f4073e50d0e6a53c6b89e8bd299
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conventional_commits (0.2.13)
4
+ conventional_commits (0.2.14)
5
5
  open3
6
6
  thor
7
7
  yaml
@@ -30,8 +30,11 @@ module ConventionalCommits
30
30
  cfg_path = options["cfg_path"] || Configuration::DEFAULT_CONFIGURATION_PATH
31
31
 
32
32
  generator = ConventionalCommits::CommitMessageGenerator.new
33
- name = generator.prepare_message_template_for_type(type: source, cfg_path:, msg_file_path: msg_path)
34
- File.write_to_file(msg_path, name)
33
+ unless generator.should_try_to_parse_msg_from_file(source:)
34
+ name = generator.prepare_message_template_for_type(type: source, cfg_path:, msg_file_path: msg_path)
35
+ File.write_to_file(msg_path, name)
36
+ end
37
+
35
38
  rescue StandardError => e
36
39
  raise Thor::Error, e.message
37
40
  end
@@ -39,13 +39,12 @@ module ConventionalCommits
39
39
  data = File.read_file(msg_file_path).to_s
40
40
  prepare_template_message(custom_body: data, cfg_path:)
41
41
  end
42
-
43
- private
44
-
45
42
  def should_try_to_parse_msg_from_file(source: "")
46
43
  skippable_sources.include?(source)
47
44
  end
48
45
 
46
+ private
47
+
49
48
  def skippable_sources
50
49
  %w[message merge squash]
51
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConventionalCommits
4
- VERSION = "0.2.14"
4
+ VERSION = "0.2.15"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conventional_commits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swift-Gurus