git-lint 3.0.2 → 3.1.0

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: 6f3a162deab2bea492b22ada739541917c56b06539fd93a0aba830a71c03b13b
4
- data.tar.gz: 82720c43f10eb0a7945b24dd1689b116d5f1187b69f3dd71235db12ef3f8ab65
3
+ metadata.gz: 0a47d65fe5c349c4e173ae1443d4930872cf64feabfc260ea8356cebd58b2278
4
+ data.tar.gz: 2b6fe7762cc836196a2783401396a2b819951dc7879ba671d1d50465165cade6
5
5
  SHA512:
6
- metadata.gz: 8fbc8ecde20d71161f4610ba3a84844c0eb498ba77cfec896ad352eaf6092f8ea2ce094be129819b6fae8bf74fea6e9eb23f8def6752d093262b3c829e5aec68
7
- data.tar.gz: a9f338932c179152e461d10e5464305aebb1c6f5d47d547a05e379cd84a2a62ccd4955ad3db21be5d958defa0ac8865472d620a1f49f951d37cc43138bf7c972
6
+ metadata.gz: 66cce682367bdfd25aa25658f7bfc9fc516288038ee7887fec20bc13ffd4693cc55e0cf85416a64595b253fdc70be755c45e0a5e875cc2f0d4f5fb7fa0c0275f
7
+ data.tar.gz: d11672014c6d200d567460cde8f77e324674936a52083c178d3c7c3709851dc261275e268cc343fba76e01eda46b3ef880e7608bd86e275ea8a51e31a9d2b037
checksums.yaml.gz.sig CHANGED
Binary file
data/exe/git-lint CHANGED
@@ -3,5 +3,4 @@
3
3
 
4
4
  require "git/lint"
5
5
 
6
- Process.setproctitle Git::Lint::Identity::VERSION_LABEL
7
6
  Git::Lint::CLI::Shell.new.call ARGV
data/git-lint.gemspec ADDED
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "git-lint"
5
+ spec.version = "3.1.0"
6
+ spec.platform = Gem::Platform::RUBY
7
+ spec.authors = ["Brooke Kuhlmann"]
8
+ spec.email = ["brooke@alchemists.io"]
9
+ spec.homepage = "https://www.alchemists.io/projects/git-lint"
10
+ spec.summary = "A command line interface for linting Git commits."
11
+ spec.license = "Hippocratic-3.0"
12
+
13
+ spec.metadata = {
14
+ "bug_tracker_uri" => "https://github.com/bkuhlmann/git-lint/issues",
15
+ "changelog_uri" => "https://www.alchemists.io/projects/git-lint/versions",
16
+ "documentation_uri" => "https://www.alchemists.io/projects/git-lint",
17
+ "label" => "Git Lint",
18
+ "rubygems_mfa_required" => "true",
19
+ "source_code_uri" => "https://github.com/bkuhlmann/git-lint"
20
+ }
21
+
22
+ spec.signing_key = Gem.default_key_path
23
+ spec.cert_chain = [Gem.default_cert_path]
24
+
25
+ spec.required_ruby_version = "~> 3.1"
26
+ spec.add_dependency "dry-container", "~> 0.9.0"
27
+ spec.add_dependency "git_plus", "~> 1.1"
28
+ spec.add_dependency "pastel", "~> 0.8"
29
+ spec.add_dependency "refinements", "~> 9.1"
30
+ spec.add_dependency "runcom", "~> 8.0"
31
+ spec.add_dependency "zeitwerk", "~> 2.5"
32
+
33
+ spec.bindir = "exe"
34
+ spec.executables << "git-lint"
35
+ spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
36
+ spec.files = Dir["*.gemspec", "lib/**/*"]
37
+ spec.require_paths = ["lib"]
38
+ end
@@ -12,13 +12,16 @@ module Git
12
12
 
13
13
  def self.call(...) = new(...).call
14
14
 
15
- def initialize configuration = Container[:configuration], client: Parser::CLIENT
15
+ def initialize configuration = Container[:configuration],
16
+ client: Parser::CLIENT,
17
+ container: Container
16
18
  @configuration = configuration
17
19
  @client = client
20
+ @container = container
18
21
  end
19
22
 
20
23
  def call arguments = []
21
- client.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
24
+ client.banner = "Git Lint - #{specification.summary}"
22
25
  client.separator "\nUSAGE:\n"
23
26
  collate
24
27
  client.parse arguments
@@ -27,7 +30,7 @@ module Git
27
30
 
28
31
  private
29
32
 
30
- attr_reader :configuration, :client
33
+ attr_reader :configuration, :client, :container
31
34
 
32
35
  def collate = private_methods.sort.grep(/add_/).each { |method| __send__ method }
33
36
 
@@ -65,6 +68,8 @@ module Git
65
68
  configuration.merge! action_help: true
66
69
  end
67
70
  end
71
+
72
+ def specification = container[__method__]
68
73
  end
69
74
  end
70
75
  end
@@ -34,7 +34,7 @@ module Git
34
34
  in action_analyze: true, analyze_sha: String => sha then analyze_commit sha
35
35
  in action_config: Symbol => action then config action
36
36
  in action_hook: Pathname => path then hook path
37
- in action_version: true then logger.info Identity::VERSION_LABEL
37
+ in action_version: true then logger.info { "Git Lint #{specification.version}" }
38
38
  else usage
39
39
  end
40
40
  end
@@ -49,6 +49,8 @@ module Git
49
49
 
50
50
  def usage = logger.unknown { parser.to_s }
51
51
 
52
+ def specification = container[__method__]
53
+
52
54
  def logger = container[__method__]
53
55
  end
54
56
  end
@@ -15,7 +15,7 @@ module Git
15
15
  using ::Refinements::Structs
16
16
 
17
17
  DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze
18
- CLIENT = Runcom::Config.new "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS
18
+ CLIENT = Runcom::Config.new "git-lint/configuration.yml", defaults: DEFAULTS
19
19
 
20
20
  def self.call = new.call
21
21
 
@@ -11,8 +11,11 @@ module Git
11
11
  module Container
12
12
  extend Dry::Container::Mixin
13
13
 
14
+ SPEC_PATH = "#{__dir__}/../../../git-lint.gemspec".freeze
15
+
14
16
  register(:configuration) { Configuration::Loader.call }
15
17
  register(:repository) { GitPlus::Repository.new }
18
+ register(:specification) { Gem::Specification.load SPEC_PATH }
16
19
  register(:colorizer) { Pastel.new enabled: $stdout.tty? }
17
20
  register(:kernel) { Kernel }
18
21
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Errors
6
6
  # The root class of gem related errors.
7
7
  class Base < StandardError
8
- def initialize message = "Invalid #{Identity::LABEL} action."
8
+ def initialize message = "Invalid Git Lint action."
9
9
  super message
10
10
  end
11
11
  end
@@ -15,7 +15,7 @@ module Git
15
15
  end
16
16
 
17
17
  def to_s
18
- "Running #{Identity::LABEL}...#{branch_report}\n" \
18
+ "Running Git Lint...#{branch_report}\n" \
19
19
  "#{commit_total}. #{issue_totals}.\n"
20
20
  end
21
21
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
29
  W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-01-13 00:00:00.000000000 Z
31
+ date: 2022-01-23 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.0'
53
+ version: '1.1'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.0'
60
+ version: '1.1'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: pastel
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '9.0'
81
+ version: '9.1'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '9.0'
88
+ version: '9.1'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: runcom
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -127,6 +127,7 @@ files:
127
127
  - LICENSE.adoc
128
128
  - README.adoc
129
129
  - exe/git-lint
130
+ - git-lint.gemspec
130
131
  - lib/git/lint.rb
131
132
  - lib/git/lint/analyzer.rb
132
133
  - lib/git/lint/analyzers/abstract.rb
@@ -174,7 +175,6 @@ files:
174
175
  - lib/git/lint/errors/base.rb
175
176
  - lib/git/lint/errors/severity.rb
176
177
  - lib/git/lint/errors/sha.rb
177
- - lib/git/lint/identity.rb
178
178
  - lib/git/lint/kit/filter_list.rb
179
179
  - lib/git/lint/parsers/trailers/collaborator.rb
180
180
  - lib/git/lint/rake/setup.rb
@@ -195,6 +195,7 @@ metadata:
195
195
  bug_tracker_uri: https://github.com/bkuhlmann/git-lint/issues
196
196
  changelog_uri: https://www.alchemists.io/projects/git-lint/versions
197
197
  documentation_uri: https://www.alchemists.io/projects/git-lint
198
+ label: Git Lint
198
199
  rubygems_mfa_required: 'true'
199
200
  source_code_uri: https://github.com/bkuhlmann/git-lint
200
201
  post_install_message:
@@ -212,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
213
  - !ruby/object:Gem::Version
213
214
  version: '0'
214
215
  requirements: []
215
- rubygems_version: 3.3.4
216
+ rubygems_version: 3.3.5
216
217
  signing_key:
217
218
  specification_version: 4
218
219
  summary: A command line interface for linting Git commits.
metadata.gz.sig CHANGED
Binary file
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Git
4
- module Lint
5
- # Gem identity information.
6
- module Identity
7
- NAME = "git-lint"
8
- LABEL = "Git Lint"
9
- VERSION = "3.0.2"
10
- VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
11
- SUMMARY = "A command line interface for linting Git commits."
12
- end
13
- end
14
- end