gitt 1.1.3 → 2.0.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +14 -14
- data/gitt.gemspec +3 -3
- data/lib/gitt/models/commit.rb +2 -3
- data/lib/gitt/models/person.rb +2 -2
- data/lib/gitt/models/tag.rb +2 -3
- data/lib/gitt/models/trailer.rb +1 -1
- data/lib/gitt/parsers/commit.rb +1 -1
- data/lib/gitt/parsers/person.rb +1 -1
- data/lib/gitt/parsers/tag.rb +1 -1
- data/lib/gitt/parsers/trailer.rb +1 -1
- data/lib/gitt/{shared_contexts → rspec/shared_contexts}/git_commit.rb +4 -1
- data/lib/gitt.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +9 -9
- metadata.gz.sig +0 -0
- /data/lib/gitt/{shared_contexts → rspec/shared_contexts}/git_repo.rb +0 -0
- /data/lib/gitt/{shared_contexts → rspec/shared_contexts}/temp_dir.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c62b336c059bf040e1402ebb4f6ac8ebc3bccd73c88374107309aba415f3498d
|
4
|
+
data.tar.gz: 3c10aab04d441c1fe43f9713df9dc8cd7a2c5aa17cd1527bf59565fa38be2978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 827cc90c8d331de050a46f1f84a702aaf02271b11a587a9eb0bc3fd360bafe88ede43e4300113dfec8aaab7215d1045588a2121c5dc9e8748e34d83ad1acc821
|
7
|
+
data.tar.gz: a440ca56f42594cfa6cd0e4ea82e5c203e99893e9591458a28f34367cc6c595a54c171cb9de9f246fcd4467e6ea146fd55b0194e0035d2ceda61d598e07ed0f2
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -182,11 +182,11 @@ In order to have access to rich data from the Git client, there are several mode
|
|
182
182
|
|
183
183
|
==== Commit
|
184
184
|
|
185
|
-
An instance of `Gitt::
|
185
|
+
An instance of `Gitt::Models::Commit` is what is answered back to when using `Gitt::Repository` via the `#commits` or `#uncommitted` methods. In each case, you'll either get an array of records, a single record, or a failure depending on the result. Here's an example of a single record:
|
186
186
|
|
187
187
|
[source,ruby]
|
188
188
|
----
|
189
|
-
# #<struct Gitt::
|
189
|
+
# #<struct Gitt::Models::Commit
|
190
190
|
# author_date_relative="2 days ago",
|
191
191
|
# author_email="demo@example.com",
|
192
192
|
# author_name="Demo User",
|
@@ -211,20 +211,20 @@ You get a {struct_link} with the following attributes:
|
|
211
211
|
* `message`: Stores the entire, raw, commit message (i.e. subject and body).
|
212
212
|
* `sha`: Stores the commit SHA.
|
213
213
|
* `subject`: Stores the commit subject.
|
214
|
-
* `trailers`: Stores any commit trailers as an array of `
|
214
|
+
* `trailers`: Stores any commit trailers as an array of `Gitt::Models::Trailer` records.
|
215
215
|
* `trailers_index`: Stores the starting index of trailers within the commit message.
|
216
216
|
|
217
217
|
==== Tag
|
218
218
|
|
219
|
-
An instance of `Gitt::
|
219
|
+
An instance of `Gitt::Models::Tag` is what is answered back to when using `Gitt::Repository` via the `#tag_parse` method. Here's an example:
|
220
220
|
|
221
221
|
[source,ruby]
|
222
222
|
----
|
223
|
-
# #<struct Gitt::
|
223
|
+
# #<struct Gitt::Models::Tag
|
224
224
|
# author_date="Tue Dec 29 17:33:01 2020 -0700",
|
225
225
|
# author_email="demo@example.com",
|
226
226
|
# author_name="Demo User",
|
227
|
-
# body="- Added gem skeleton\n- Added RSpec
|
227
|
+
# body="- Added gem skeleton\n- Added RSpec dependency",
|
228
228
|
# sha="d041d07c29f97b5b06b3b2fd05fa1dd018c7da7c",
|
229
229
|
# subject="Version 0.1.0",
|
230
230
|
# version="0.1.0">
|
@@ -246,7 +246,7 @@ A trailer is nested within a commit record when trailer information exists. Exam
|
|
246
246
|
|
247
247
|
[source,ruby]
|
248
248
|
----
|
249
|
-
#<struct Gitt::
|
249
|
+
#<struct Gitt::Models::Trailer key="Issue", delimiter=":", space=" ", value="123">
|
250
250
|
----
|
251
251
|
|
252
252
|
The attributes break down as follows:
|
@@ -258,15 +258,15 @@ The attributes break down as follows:
|
|
258
258
|
|
259
259
|
=== RSpec
|
260
260
|
|
261
|
-
For fans of {rspec_link}, this gem provides shared contexts you can use within your own test suites. These shared contexts are _optional_ and must be manually required to use.
|
261
|
+
For fans of {rspec_link}, this gem provides shared contexts you can use within your own test suites. These shared contexts are _optional_, not required for you by default, and must be manually required to use.
|
262
262
|
|
263
263
|
==== Git Commit
|
264
264
|
|
265
|
-
Provides a default `git_commit` record of `Gitt::
|
265
|
+
Provides a default `git_commit` record of `Gitt::Models::Commit` with minimal information for testing purposes and can be used as follows:
|
266
266
|
|
267
267
|
[source,ruby]
|
268
268
|
----
|
269
|
-
require "gitt/shared_contexts/git_commit"
|
269
|
+
require "gitt/rspec/shared_contexts/git_commit"
|
270
270
|
|
271
271
|
describe Demo do
|
272
272
|
include_context "with Git commit"
|
@@ -279,8 +279,8 @@ Provides a simple Git repository with a single commit for testing purposes. This
|
|
279
279
|
|
280
280
|
[source,ruby]
|
281
281
|
----
|
282
|
-
require "gitt/shared_contexts/git_repo"
|
283
|
-
require "
|
282
|
+
require "gitt/rspec/shared_contexts/git_repo"
|
283
|
+
require "refinements/pathnames"
|
284
284
|
|
285
285
|
describe Demo do
|
286
286
|
include_context "with Git repository"
|
@@ -299,8 +299,8 @@ Provides a temporary directory (i.e. `tmp/rspec`) for creating directories and o
|
|
299
299
|
|
300
300
|
[source,ruby]
|
301
301
|
----
|
302
|
-
require "gitt/shared_contexts/temp_dir"
|
303
|
-
require "
|
302
|
+
require "gitt/rspec/shared_contexts/temp_dir"
|
303
|
+
require "refinements/pathnames"
|
304
304
|
|
305
305
|
describe Demo do
|
306
306
|
include_context "with temporary directory"
|
data/gitt.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "gitt"
|
5
|
-
spec.version = "
|
5
|
+
spec.version = "2.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/gitt"
|
9
|
-
spec.summary = "
|
9
|
+
spec.summary = "A monadic Object API for the Git CLI."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = "~> 3.2"
|
26
26
|
spec.add_dependency "core", "~> 0.1"
|
27
27
|
spec.add_dependency "dry-monads", "~> 1.6"
|
28
|
-
spec.add_dependency "refinements", "~>
|
28
|
+
spec.add_dependency "refinements", "~> 11.0"
|
29
29
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
30
30
|
|
31
31
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
data/lib/gitt/models/commit.rb
CHANGED
data/lib/gitt/models/person.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
module Gitt
|
4
4
|
module Models
|
5
5
|
# Represents a person within a repository.
|
6
|
-
Person = Struct.new :name, :delimiter, :email
|
6
|
+
Person = Struct.new :name, :delimiter, :email do
|
7
7
|
def self.for(string, parser: Parsers::Person.new) = parser.call string
|
8
8
|
|
9
|
-
def initialize
|
9
|
+
def initialize(**)
|
10
10
|
super
|
11
11
|
freeze
|
12
12
|
end
|
data/lib/gitt/models/tag.rb
CHANGED
data/lib/gitt/models/trailer.rb
CHANGED
data/lib/gitt/parsers/commit.rb
CHANGED
data/lib/gitt/parsers/person.rb
CHANGED
data/lib/gitt/parsers/tag.rb
CHANGED
data/lib/gitt/parsers/trailer.rb
CHANGED
@@ -7,10 +7,13 @@ RSpec.shared_context "with Git commit" do
|
|
7
7
|
author_name: "Test User",
|
8
8
|
authored_relative_at: "1 day ago",
|
9
9
|
body: "",
|
10
|
+
body_lines: [],
|
11
|
+
body_paragraphs: [],
|
12
|
+
lines: [],
|
10
13
|
raw: "",
|
11
14
|
sha: "180dec7d8ae8cbe3565a727c63c2111e49e0b737",
|
12
15
|
subject: "Added documentation",
|
13
|
-
trailers:
|
16
|
+
trailers: []
|
14
17
|
]
|
15
18
|
end
|
16
19
|
end
|
data/lib/gitt.rb
CHANGED
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:
|
4
|
+
version: 2.0.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-
|
38
|
+
date: 2023-06-13 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: core
|
@@ -71,14 +71,14 @@ dependencies:
|
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '11.0'
|
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: '
|
81
|
+
version: '11.0'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: zeitwerk
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +120,9 @@ files:
|
|
120
120
|
- lib/gitt/parsers/tag.rb
|
121
121
|
- lib/gitt/parsers/trailer.rb
|
122
122
|
- lib/gitt/repository.rb
|
123
|
+
- lib/gitt/rspec/shared_contexts/git_commit.rb
|
124
|
+
- lib/gitt/rspec/shared_contexts/git_repo.rb
|
125
|
+
- lib/gitt/rspec/shared_contexts/temp_dir.rb
|
123
126
|
- lib/gitt/sanitizers/container.rb
|
124
127
|
- lib/gitt/sanitizers/date.rb
|
125
128
|
- lib/gitt/sanitizers/email.rb
|
@@ -128,9 +131,6 @@ files:
|
|
128
131
|
- lib/gitt/sanitizers/scissors.rb
|
129
132
|
- lib/gitt/sanitizers/signature.rb
|
130
133
|
- lib/gitt/sanitizers/trailers.rb
|
131
|
-
- lib/gitt/shared_contexts/git_commit.rb
|
132
|
-
- lib/gitt/shared_contexts/git_repo.rb
|
133
|
-
- lib/gitt/shared_contexts/temp_dir.rb
|
134
134
|
- lib/gitt/shell.rb
|
135
135
|
homepage: https://alchemists.io/projects/gitt
|
136
136
|
licenses:
|
@@ -158,8 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.4.
|
161
|
+
rubygems_version: 3.4.14
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
|
-
summary:
|
164
|
+
summary: A monadic Object API for the Git CLI.
|
165
165
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|
File without changes
|
File without changes
|