conventional_commits 0.2.15 → 0.2.17

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: a536d7b08e52650664fa3a912f10526b0a637de935f4bb23066e55ba9f887a56
4
- data.tar.gz: 927e89c493bc2f4d9427c1c88e2231dcd666e9b84efc50b3af93c379c79ff8a8
3
+ metadata.gz: 3aa69ffeb923aaff95af828cb4becc52b2a1d1d4ae40d03745b81d68e3a21343
4
+ data.tar.gz: 427ca091217da73e1c8efc2f749c7d76ce103bb0e7c6601980edcd8e40ce28c0
5
5
  SHA512:
6
- metadata.gz: 4f328aa50466dc8b4f6847596d9404e83c44bd5a1426177de7e37106c2289d04c19785f828fc0324f8ee97ce9808972a9c36555fb872ec7d3720d0ce6471ccd2
7
- data.tar.gz: d088f3e38981a01debcb1fe894ac97f8dfa4929c17121105272ea4c65320ac08a19466d0eff51b32ac804aed776ae15ad3a17f4073e50d0e6a53c6b89e8bd299
6
+ metadata.gz: 408d456a633b7ba27178d6bcd9426c83ccf8a209a4e697d4e1eb32091f4be396b339033a6fc64bc0cff561ec8e09d83140786dafca642465869b915468170427
7
+ data.tar.gz: 4ea097e2fa9de5c08d18ee2eb8cde1af4743e24fb2a1b5fab82be9d77ed9aa2a548482efd1bc92b4dbc50260c793ed14ec04491422e69c04d3163295c709fa5a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conventional_commits (0.2.14)
4
+ conventional_commits (0.2.15)
5
5
  open3
6
6
  thor
7
7
  yaml
@@ -31,6 +31,7 @@ module ConventionalCommits
31
31
 
32
32
  generator = ConventionalCommits::CommitMessageGenerator.new
33
33
  unless generator.should_try_to_parse_msg_from_file(source:)
34
+ puts "Generating message"
34
35
  name = generator.prepare_message_template_for_type(type: source, cfg_path:, msg_file_path: msg_path)
35
36
  File.write_to_file(msg_path, name)
36
37
  end
@@ -54,10 +55,16 @@ module ConventionalCommits
54
55
  option :msg_path, type: :string, required: false
55
56
  option :msg, type: :string, required: false
56
57
  option :cfg_path, type: :string, required: false
58
+ option :source, type: :string, required: false
57
59
  def validate_commit_msg
60
+ generator = ConventionalCommits::CommitMessageGenerator.new
61
+ src = options["source"] || ""
62
+ return if generator.should_try_to_parse_msg_from_file(source: src)
63
+
58
64
  msg_path = options["msg_path"] || Configuration::DEFAULT_COMMIT_MSG_PATH
59
65
  cfg_path = options["cfg_path"] || Configuration::DEFAULT_CONFIGURATION_PATH
60
66
  validator = ConventionalCommits::CommitMessageValidator.new
67
+
61
68
  validator.validate_commit_msg_from_file(commit_msg_path: msg_path, cfg_path:)
62
69
  rescue StandardError => e
63
70
  raise Thor::Error, e.message
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConventionalCommits
4
- VERSION = "0.2.15"
4
+ VERSION = "0.2.17"
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.15
4
+ version: 0.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swift-Gurus