git-lint 5.1.2 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 979c80bd2907a9a0a5b3035e82c861dacacae1fc8282f37679357bc79f6ac5a0
4
- data.tar.gz: 6175e280b6b538a262c2f3cbf6d566ffde5d7e91feb81abd50e0fcf4f0994ccf
3
+ metadata.gz: 588bd293760045f8bffac98557e0b8bd084a8f20113735627c87c843a5ca9c23
4
+ data.tar.gz: 7870c61941155e7665e84c312e44128809dd14f1a4dbf6ef7a8e999c593d405d
5
5
  SHA512:
6
- metadata.gz: 577c1ba631c684d659de0bf543cba7b8ef56dc5fec373fcd013969884d3d582db012cf53c5397bd4a7d3218d6f77580366b11cd66a9276ebe027e17193b2a625
7
- data.tar.gz: 7c0ed96012c7ee151b5faba3d554075e3d07d8336772897a1ff229ad4a4a01859277600968b69a9ce07c529223717284261f2e782f4605c9058b087d4019fbc8
6
+ metadata.gz: 9a543e267cdc7ce41b0402b03e7d20b4ae1eb78c4d1f8443c8410cd7496717dfae49b978a2d0f7f25fecc9a048051f197b2b5732f1ca0f71ca64d03e40e6ce36
7
+ data.tar.gz: 2aa9fde18ca69c66a2131652719c33addd4761c48634777581ecb7a4f8a27ce17aa943a7a53f54e4004cce9db44249e7f7c721428a05f529f845015e8305345f
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -30,7 +30,16 @@ toc::[]
30
30
 
31
31
  == Setup
32
32
 
33
- To install, run:
33
+ To install _with_ security, run:
34
+
35
+ [source,bash]
36
+ ----
37
+ # 💡 Skip this line if you already have the public certificate installed.
38
+ gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
39
+ gem install git-lint --trust-policy HighSecurity
40
+ ----
41
+
42
+ To install _without_ security, run:
34
43
 
35
44
  [source,bash]
36
45
  ----
data/git-lint.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "git-lint"
5
- spec.version = "5.1.2"
5
+ spec.version = "5.2.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/git-lint"
@@ -29,10 +29,10 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency "dry-monads", "~> 1.6"
30
30
  spec.add_dependency "gitt", "~> 1.1"
31
31
  spec.add_dependency "infusible", "~> 1.0"
32
- spec.add_dependency "pastel", "~> 0.8"
33
32
  spec.add_dependency "refinements", "~> 10.0"
34
33
  spec.add_dependency "runcom", "~> 9.0"
35
34
  spec.add_dependency "spek", "~> 1.0"
35
+ spec.add_dependency "tone", "~> 0.1"
36
36
  spec.add_dependency "zeitwerk", "~> 2.6"
37
37
 
38
38
  spec.bindir = "exe"
@@ -4,6 +4,7 @@ require "cogger"
4
4
  require "dry-container"
5
5
  require "gitt"
6
6
  require "spek"
7
+ require "tone"
7
8
 
8
9
  module Git
9
10
  module Lint
@@ -17,6 +18,7 @@ module Git
17
18
  register(:specification) { Spek::Loader.call "#{__dir__}/../../../git-lint.gemspec" }
18
19
  register(:kernel) { Kernel }
19
20
  register(:logger) { Cogger::Client.new }
21
+ register(:color) { Tone.new }
20
22
 
21
23
  namespace :trailers do
22
24
  register(:collaborator) { /\ACo.*Authored.*By.*\Z/i }
@@ -1,17 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pastel"
4
-
5
3
  module Git
6
4
  module Lint
7
5
  module Reporters
8
6
  # Reports issues related to a single branch.
9
7
  class Branch
8
+ include Import[:color]
10
9
  using ::Refinements::Strings
11
10
 
12
- def initialize collector: Collector.new, colorizer: Pastel.new
11
+ def initialize(collector: Collector.new, **)
12
+ super(**)
13
13
  @collector = collector
14
- @colorizer = colorizer
15
14
  end
16
15
 
17
16
  def to_s
@@ -23,7 +22,7 @@ module Git
23
22
 
24
23
  private
25
24
 
26
- attr_reader :collector, :colorizer
25
+ attr_reader :collector
27
26
 
28
27
  def branch_report
29
28
  return "" unless collector.issues?
@@ -46,26 +45,26 @@ module Git
46
45
  if collector.issues?
47
46
  "#{issue_total} detected (#{warning_total}, #{error_total})"
48
47
  else
49
- colorizer.green("0 issues") + " detected"
48
+ color["0 issues", :green] + " detected"
50
49
  end
51
50
  end
52
51
 
53
52
  def issue_total
54
- color = collector.errors? ? :red : :yellow
53
+ style = collector.errors? ? :red : :yellow
55
54
  total = collector.total_issues
56
- colorizer.public_send color, "#{total} issue".pluralize("s", count: total)
55
+ color["#{total} issue".pluralize("s", count: total), style]
57
56
  end
58
57
 
59
58
  def warning_total
60
- color = collector.warnings? ? :yellow : :green
59
+ style = collector.warnings? ? :yellow : :green
61
60
  total = collector.total_warnings
62
- colorizer.public_send color, "#{total} warning".pluralize("s", count: total)
61
+ color["#{total} warning".pluralize("s", count: total), style]
63
62
  end
64
63
 
65
64
  def error_total
66
- color = collector.errors? ? :red : :green
65
+ style = collector.errors? ? :red : :green
67
66
  total = collector.total_errors
68
- colorizer.public_send color, "#{total} error".pluralize("s", count: total)
67
+ color["#{total} error".pluralize("s", count: total), style]
69
68
  end
70
69
  end
71
70
  end
@@ -1,25 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "pastel"
4
-
5
3
  module Git
6
4
  module Lint
7
5
  module Reporters
8
6
  # Reports issues related to a single style.
9
7
  class Style
10
- def initialize analyzer, colorizer: Pastel.new
8
+ include Import[:color]
9
+
10
+ def initialize(analyzer, **)
11
+ super(**)
11
12
  @analyzer = analyzer
12
13
  @issue = analyzer.issue
13
- @colorizer = colorizer
14
14
  end
15
15
 
16
- def to_s = colorizer.public_send(color, message)
16
+ def to_s = color[message, style]
17
17
 
18
18
  alias to_str to_s
19
19
 
20
20
  private
21
21
 
22
- attr_reader :analyzer, :issue, :colorizer
22
+ attr_reader :analyzer, :issue
23
23
 
24
24
  def message
25
25
  " #{analyzer.class.label}#{severity_suffix}. " \
@@ -35,7 +35,7 @@ module Git
35
35
  end
36
36
  end
37
37
 
38
- def color
38
+ def style
39
39
  case analyzer.severity
40
40
  when :warn then :yellow
41
41
  when :error then :red
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- (v�������@��7,��_ ���C߀Q_6? ɢm��U��]��)%����[:���/p�1~Yaۥ������%�F�c��H>�AK���u]�~~�`F�r��12��Ѹ�)���`Ou�kDR;%Lu:�Er�e'�n���Q�.K�C�%.h�ҞPN�'r>�tS�'�o=����5�����<Vʳ��<�S���1�&�j���08
2
- �:������D��)m���H��ʺ�_U6Ҍ���������=q9)�P�@�H�-�1�Ԇ��0'971�|}!i���J>S����>>~�tN��3[���C%����m7s��e�u�0���!����r����cn6N���P�跤��1
1
+ q�p�t�<�����9@���5���r��PFzv嘞�,
2
+ ��� "�� �\!�����'��b�>Li�K$v �|�.̝���h���֫��J��?���dX9��_{���Q�y7c��'ދf��cU���\��5FR��L���/��ZXhY9Y*Լ?���lk����#.���u��l�~3��pS/�K�p l#&�C�ƃ� ]w9�}��K�܃Z/��L[���O��?9c3�$�4H�/�%�k(YOQ��!,,1pr��Y
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: 5.1.2
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2023-03-22 00:00:00.000000000 Z
38
+ date: 2023-04-10 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -122,61 +122,61 @@ dependencies:
122
122
  - !ruby/object:Gem::Version
123
123
  version: '1.0'
124
124
  - !ruby/object:Gem::Dependency
125
- name: pastel
125
+ name: refinements
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '0.8'
130
+ version: '10.0'
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '0.8'
137
+ version: '10.0'
138
138
  - !ruby/object:Gem::Dependency
139
- name: refinements
139
+ name: runcom
140
140
  requirement: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '10.0'
144
+ version: '9.0'
145
145
  type: :runtime
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '10.0'
151
+ version: '9.0'
152
152
  - !ruby/object:Gem::Dependency
153
- name: runcom
153
+ name: spek
154
154
  requirement: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '9.0'
158
+ version: '1.0'
159
159
  type: :runtime
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: '9.0'
165
+ version: '1.0'
166
166
  - !ruby/object:Gem::Dependency
167
- name: spek
167
+ name: tone
168
168
  requirement: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '1.0'
172
+ version: '0.1'
173
173
  type: :runtime
174
174
  prerelease: false
175
175
  version_requirements: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '1.0'
179
+ version: '0.1'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: zeitwerk
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -304,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
304
304
  - !ruby/object:Gem::Version
305
305
  version: '0'
306
306
  requirements: []
307
- rubygems_version: 3.4.9
307
+ rubygems_version: 3.4.10
308
308
  signing_key:
309
309
  specification_version: 4
310
310
  summary: A command line interface for linting Git commits.
metadata.gz.sig CHANGED
Binary file