gitt 3.7.0 → 3.8.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +2 -0
- data/gitt.gemspec +5 -5
- data/lib/gitt/commands/log.rb +4 -3
- data/lib/gitt/parsers/commit.rb +2 -2
- data/lib/gitt/repository.rb +5 -1
- data/lib/gitt/sanitizers/statistic.rb +11 -10
- data.tar.gz.sig +0 -0
- metadata +12 -9
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 011f24d793d2565425982cb6eeb0d8efc3a9f954590bf86750495c6b97792873
|
4
|
+
data.tar.gz: ee9f64d17e334f1aa6827c085fb1059b453209f4b5397e7ac400e598de18960e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efe9288bf28a4eac998226055f15bf1ddedeae39dbf4e95c77a6da23faedcd9a3c3b88d8a29db5d7cde1f60273e1bce6c6c2e0d0734964d14e520790b8463d0f
|
7
|
+
data.tar.gz: '089f62916bc44d0634f408a111163bda264a13ad236ce8156484c096e5d595deae0b2c14466885d084647a3ac23d50a8005546e8f75b1d2847fd4b7239d2dcb5'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -403,6 +403,8 @@ bin/rake
|
|
403
403
|
|
404
404
|
== link:https://alchemists.io/policies/contributions[Contributions]
|
405
405
|
|
406
|
+
== link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
|
407
|
+
|
406
408
|
== link:https://alchemists.io/projects/gitt/versions[Versions]
|
407
409
|
|
408
410
|
== link:https://alchemists.io/community[Community]
|
data/gitt.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "gitt"
|
5
|
-
spec.version = "3.
|
5
|
+
spec.version = "3.8.1"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/gitt"
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.metadata = {
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/gitt/issues",
|
14
14
|
"changelog_uri" => "https://alchemists.io/projects/gitt/versions",
|
15
|
-
"
|
15
|
+
"homepage_uri" => "https://alchemists.io/projects/gitt",
|
16
16
|
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
17
17
|
"label" => "Gitt",
|
18
18
|
"rubygems_mfa_required" => "true",
|
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version = "
|
26
|
-
spec.add_dependency "core", "~> 1.
|
25
|
+
spec.required_ruby_version = ">= 3.3", "<= 3.4"
|
26
|
+
spec.add_dependency "core", "~> 1.7"
|
27
27
|
spec.add_dependency "dry-monads", "~> 1.6"
|
28
|
-
spec.add_dependency "refinements", "~> 12.
|
28
|
+
spec.add_dependency "refinements", "~> 12.8"
|
29
29
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
30
30
|
|
31
31
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
data/lib/gitt/commands/log.rb
CHANGED
@@ -70,15 +70,16 @@ module Gitt
|
|
70
70
|
|
71
71
|
# :reek:UtilityFunction
|
72
72
|
def wrap_statistics entries
|
73
|
-
entries.gsub!(/\d+\sfile.+\d+\s(insertion|deletion).+\n/) do |match|
|
74
|
-
|
73
|
+
entries.gsub!(/\n"\n\s\d+\sfile.+\d+\s(insertion|deletion).+\n/) do |match|
|
74
|
+
match.delete_prefix!("\n\"\n").strip!
|
75
|
+
"\n<statistics>#{match}</statistics>\n<break/>"
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
78
79
|
# :reek:UtilityFunction
|
79
80
|
def add_empty_statistics entries
|
80
81
|
entries.gsub! %(</trailers>\n"\n"<author_email>),
|
81
|
-
"</trailers>\n<statistics></statistics
|
82
|
+
"</trailers>\n<statistics></statistics><break/>\n<author_email>"
|
82
83
|
end
|
83
84
|
end
|
84
85
|
end
|
data/lib/gitt/parsers/commit.rb
CHANGED
@@ -18,7 +18,7 @@ module Gitt
|
|
18
18
|
|
19
19
|
def call content
|
20
20
|
attributer.call(content)
|
21
|
-
.then { |attributes|
|
21
|
+
.then { |attributes| mutate attributes }
|
22
22
|
.then { |attributes| model[**attributes] }
|
23
23
|
end
|
24
24
|
|
@@ -27,7 +27,7 @@ module Gitt
|
|
27
27
|
attr_reader :attributer, :sanitizers, :model
|
28
28
|
|
29
29
|
# :reek:TooManyStatements
|
30
|
-
def
|
30
|
+
def mutate attributes
|
31
31
|
body, trailers = attributes.values_at :body, :trailers
|
32
32
|
body = scissors_sanitizer.call body
|
33
33
|
|
data/lib/gitt/repository.rb
CHANGED
@@ -4,7 +4,6 @@ require "core"
|
|
4
4
|
|
5
5
|
module Gitt
|
6
6
|
# Primary object/wrapper for processing all Git related commands.
|
7
|
-
# :reek:TooManyMethods
|
8
7
|
class Repository
|
9
8
|
COMMANDS = {
|
10
9
|
branch: Commands::Branch,
|
@@ -34,6 +33,11 @@ module Gitt
|
|
34
33
|
|
35
34
|
def get(...) = commands.fetch(:config).get(...)
|
36
35
|
|
36
|
+
def inspect
|
37
|
+
"#<#{self.class}:#{object_id} @shell=#{shell.inspect} " \
|
38
|
+
"@commands=#{commands.values.map(&:class).inspect}>"
|
39
|
+
end
|
40
|
+
|
37
41
|
def log(...) = commands.fetch(__method__).call(...)
|
38
42
|
|
39
43
|
def origin? = commands.fetch(:config).origin?
|
@@ -12,24 +12,25 @@ module Gitt
|
|
12
12
|
(?<kind>file|insertion|deletion) # Kind capture group.
|
13
13
|
/x
|
14
14
|
|
15
|
+
def self.update_stats attributes, kind, total
|
16
|
+
case kind
|
17
|
+
when "file" then attributes[:files_changed] = total
|
18
|
+
when "insertion" then attributes[:insertions] = total
|
19
|
+
when "deletion" then attributes[:deletions] = total
|
20
|
+
else fail StandardError, "Invalid kind: #{kind.inspect}."
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
15
24
|
def initialize empty: EMPTY, pattern: PATTERN
|
16
25
|
@empty = empty
|
17
26
|
@pattern = pattern
|
18
27
|
end
|
19
28
|
|
20
|
-
# :reek:TooManyStatements
|
21
29
|
def call text
|
22
30
|
return empty unless text
|
23
31
|
|
24
|
-
text.scan(pattern).each.with_object(empty.dup) do |(number, kind),
|
25
|
-
|
26
|
-
|
27
|
-
case kind
|
28
|
-
when "file" then stats[:files_changed] = total
|
29
|
-
when "insertion" then stats[:insertions] = total
|
30
|
-
when "deletion" then stats[:deletions] = total
|
31
|
-
# :nocov:
|
32
|
-
end
|
32
|
+
text.scan(pattern).each.with_object(empty.dup) do |(number, kind), aggregate|
|
33
|
+
self.class.update_stats aggregate, kind, number.to_i
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.8.1
|
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: 2024-
|
38
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: core
|
@@ -43,14 +43,14 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '1.
|
46
|
+
version: '1.7'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
53
|
+
version: '1.7'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: dry-monads
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -71,14 +71,14 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '12.
|
74
|
+
version: '12.8'
|
75
75
|
type: :runtime
|
76
76
|
prerelease: false
|
77
77
|
version_requirements: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '12.
|
81
|
+
version: '12.8'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: zeitwerk
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,7 +141,7 @@ licenses:
|
|
141
141
|
metadata:
|
142
142
|
bug_tracker_uri: https://github.com/bkuhlmann/gitt/issues
|
143
143
|
changelog_uri: https://alchemists.io/projects/gitt/versions
|
144
|
-
|
144
|
+
homepage_uri: https://alchemists.io/projects/gitt
|
145
145
|
funding_uri: https://github.com/sponsors/bkuhlmann
|
146
146
|
label: Gitt
|
147
147
|
rubygems_mfa_required: 'true'
|
@@ -152,16 +152,19 @@ require_paths:
|
|
152
152
|
- lib
|
153
153
|
required_ruby_version: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- - "
|
155
|
+
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '3.3'
|
158
|
+
- - "<="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '3.4'
|
158
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
162
|
requirements:
|
160
163
|
- - ">="
|
161
164
|
- !ruby/object:Gem::Version
|
162
165
|
version: '0'
|
163
166
|
requirements: []
|
164
|
-
rubygems_version: 3.5.
|
167
|
+
rubygems_version: 3.5.18
|
165
168
|
signing_key:
|
166
169
|
specification_version: 4
|
167
170
|
summary: A monadic Object API for the Git CLI.
|
metadata.gz.sig
CHANGED
Binary file
|