conventional_commits 0.2.13 → 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: 93e40907849372e7406e1647988cee3d79f948e58285dad6a3c9de010bdb50df
4
- data.tar.gz: 8ac3b6ca113bd00b5cf8e757cf3044adc94cf525e699718697891c4c38d3ed9d
3
+ metadata.gz: a536d7b08e52650664fa3a912f10526b0a637de935f4bb23066e55ba9f887a56
4
+ data.tar.gz: 927e89c493bc2f4d9427c1c88e2231dcd666e9b84efc50b3af93c379c79ff8a8
5
5
  SHA512:
6
- metadata.gz: cf219cc0ed51855b074cd4d90993d78c550b88fb9707c9e211199ecaf4d56b68429d91973082c7026d89dfb36b166efb4234fd7f23c96c59caaedb2f87f1cba2
7
- data.tar.gz: 5a955ad62764dd0b9f69c87e3f8b0f8a82455f768969248172bf689e3a1afc23735e825697ae087a65cb01ae11d02e2a260f05d9303847e639b1093f483fddb7
6
+ metadata.gz: 4f328aa50466dc8b4f6847596d9404e83c44bd5a1426177de7e37106c2289d04c19785f828fc0324f8ee97ce9808972a9c36555fb872ec7d3720d0ce6471ccd2
7
+ data.tar.gz: d088f3e38981a01debcb1fe894ac97f8dfa4929c17121105272ea4c65320ac08a19466d0eff51b32ac804aed776ae15ad3a17f4073e50d0e6a53c6b89e8bd299
@@ -0,0 +1,8 @@
1
+ - id: Branch Validation
2
+ name: validate_branch
3
+ description: "Validation of branch"
4
+ entry: "conventional_commits validate_branch_name"
5
+ language: ruby
6
+ language_version: 3.2.2
7
+ always_run: true
8
+ pass_filenames: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- conventional_commits (0.2.7)
4
+ conventional_commits (0.2.14)
5
5
  open3
6
6
  thor
7
7
  yaml
@@ -99,10 +99,11 @@ GEM
99
99
  ffi (~> 1.1)
100
100
  thor (1.3.1)
101
101
  unicode-display_width (2.5.0)
102
- yaml (0.3.0)
102
+ yaml (0.4.0)
103
103
 
104
104
  PLATFORMS
105
105
  arm64-darwin-23
106
+ arm64-darwin-24
106
107
 
107
108
  DEPENDENCIES
108
109
  aruba
@@ -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.13"
4
+ VERSION = "0.2.15"
5
5
  end
@@ -73,7 +73,7 @@ module ConventionalCommits
73
73
  end
74
74
 
75
75
  def prepare_commit_cli
76
- "prepare_commit_msg --msg_path $1"
76
+ "prepare_commit_msg --msg_path $1 --source $2"
77
77
  end
78
78
 
79
79
  def validate_commit_msg
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conventional_commits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swift-Gurus
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-25 00:00:00.000000000 Z
11
+ date: 2025-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open3
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".conventional_commits/config.yml"
105
+ - ".pre-commit-hooks.yaml"
105
106
  - ".rspec"
106
107
  - ".rubocop.yml"
107
108
  - Gemfile