conventional_commits 0.2.14 → 0.2.16

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: 711e55d8a2646d8d36c9c12f738e2fb8ac0d40897550f1c418bc63717da9fce7
4
+ data.tar.gz: 2e146ec8502c0c2761a278ed1e676913b5388e6f9fc81350d9ee8c0b711c2f47
5
5
  SHA512:
6
- metadata.gz: 0b4c15d408def561c8904fafa019981505308b26bb290bd28fb36b2905176b66743c1f3d5c410f70f594d5b67b7c5397c754fdb60c91b7b98bceb375ad5a69a1
7
- data.tar.gz: 6d4fe48827fbfcd57ba6c44680236b9697da12ebcf60198223ee5d89c5a9c9809406b3e01f7d45cd4d706c0743b7c758650df7180db36298d0050dcce642dc4c
6
+ metadata.gz: 8ccc53136675957cbbabe277ae0865a169bbc536edd3babe9a0a66bebfc093a45bfd5786ec65942deedd5dda6f6f00de4600fc865298ff4d41e4ec4dd2363707
7
+ data.tar.gz: 85a0a331109ee21bf30f2d60e659c8d52f857f8c204b1910a371a306332d06f175523b2f37b2001b24321876e5ae8d2f22899dd5f80bae0c98f1606bab94545d
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.15)
5
5
  open3
6
6
  thor
7
7
  yaml
@@ -30,8 +30,12 @@ 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
+ puts "Generating message"
35
+ name = generator.prepare_message_template_for_type(type: source, cfg_path:, msg_file_path: msg_path)
36
+ File.write_to_file(msg_path, name)
37
+ end
38
+
35
39
  rescue StandardError => e
36
40
  raise Thor::Error, e.message
37
41
  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.16"
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.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swift-Gurus