gitt 3.5.0 → 3.7.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 +64 -32
- data/gitt.gemspec +2 -2
- data/lib/gitt/commands/log.rb +2 -0
- data/lib/gitt/commands/tag.rb +3 -2
- data/lib/gitt/models/commit.rb +2 -0
- data/lib/gitt/models/tag.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +5 -5
- 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: dc1b54fc75fe6483d279a479de184cc87ff8fb40338bc69508815b6fcb2aaa99
|
4
|
+
data.tar.gz: 267dc946b13877b58ddcc659b99f8943dac269d84486219dcd58d7b624a8e7c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 727e729adeba4a1c911cd43faf2baece100edaca76616989dd89231066ca5e3a45034396319a01d601a78e2229d76fd5acdf55c1e3b095547b97c5873325fa80
|
7
|
+
data.tar.gz: 613f6a491492a6730906d8af03fb3680c8df356db06aa1a016f414f1692ce434b4496f17ab7c29e98b2d0e35ffee5ff2061467e64537c00f50fd17df7da2813c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -193,57 +193,88 @@ In order to have access to rich data from the Git client, there are several mode
|
|
193
193
|
|
194
194
|
==== Commit
|
195
195
|
|
196
|
-
An instance of `Gitt::Models::Commit` is what is answered back to when using `Gitt
|
196
|
+
An instance of `Gitt::Models::Commit` is what is answered back to when using `Gitt` 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:
|
197
197
|
|
198
198
|
[source,ruby]
|
199
199
|
----
|
200
|
-
# #<
|
201
|
-
#
|
202
|
-
#
|
203
|
-
#
|
204
|
-
#
|
205
|
-
#
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
#
|
200
|
+
# #<Struct:Gitt::Models::Commit:0x0001d4e8
|
201
|
+
# author_email = "demo@example.io",
|
202
|
+
# author_name = "Brooke Kuhlmann",
|
203
|
+
# authored_at = "1720130186",
|
204
|
+
# authored_relative_at = "33 seconds ago",
|
205
|
+
# body = "",
|
206
|
+
# body_lines = [],
|
207
|
+
# body_paragraphs = [],
|
208
|
+
# committed_at = "1720130186",
|
209
|
+
# committed_relative_at = "33 seconds ago",
|
210
|
+
# committer_email = "demo@example.io",
|
211
|
+
# committer_name = "Brooke Kuhlmann",
|
212
|
+
# deletions = 3,
|
213
|
+
# encoding = "",
|
214
|
+
# files_changed = 3,
|
215
|
+
# fingerprint = "F2BC49BC4FFB9A48",
|
216
|
+
# fingerprint_key = "D1488588D2DEDF73E62F07A1F2BC49BC4FFB9A48",
|
217
|
+
# insertions = 9,
|
218
|
+
# lines = [
|
219
|
+
# "Added version release notes"
|
220
|
+
# ],
|
221
|
+
# notes = "",
|
222
|
+
# raw = "Added version release notes\n",
|
223
|
+
# sha = "49e033d7020068630fd3823a29c2eb8a1ef01770",
|
224
|
+
# signature = "Good",
|
225
|
+
# subject = "Added version release notes",
|
226
|
+
# trailers = []
|
227
|
+
# >
|
212
228
|
----
|
213
229
|
|
214
230
|
You get a {struct_link} with the following attributes:
|
215
231
|
|
216
|
-
* `author_date_relative`: Stores the relative date of when the commit was made.
|
217
232
|
* `author_email`: Stores the author email.
|
218
233
|
* `author_name`: Stores the author name.
|
234
|
+
* `authored_at`: Stores local time of when the commit was made.
|
235
|
+
* `author_relative_at`: Stores the relative time of when the commit was made.
|
219
236
|
* `body`: Stores the commit body which excludes the subject and leading space.
|
220
237
|
* `body_lines`: Stores each line of the body in an array.
|
221
238
|
* `body_paragraphs`: Stores each paragraph of the body as an array (i.e. broken by double new lines).
|
222
|
-
* `
|
239
|
+
* `committed_at`: Stores local time of when the commit was updated.
|
240
|
+
* `committed_relative_at`: Stores the relative time of when the commit was updated.
|
241
|
+
* `committer_email`: Stores the committer email.
|
242
|
+
* `committer_name`: Stores the committer name.
|
243
|
+
* `deletions`: Stores number of deleted lines.
|
244
|
+
* `encoding`: Stored encoding. Blank if UTF-8 andf filled if otherwise.
|
245
|
+
* `files_changed`: Stores number of files changed.
|
246
|
+
* `fingerprint`: Stores the fingerprint used when creating a secure commit.
|
247
|
+
* `fingerprint_key`: Stores the fingerprint key used when creating a secure commit.
|
248
|
+
* `insertions`: Stores the number inserted lines.
|
249
|
+
* `lines`: Stores each line of the commit message as an array.
|
250
|
+
* `notes`: Stores commit note (if any.
|
251
|
+
* `raw`: Stores the raw commit message (subject + message).
|
223
252
|
* `sha`: Stores the commit SHA.
|
253
|
+
* `signature`: Stores the signature type and level of security.
|
224
254
|
* `subject`: Stores the commit subject.
|
225
255
|
* `trailers`: Stores any commit trailers as an array of `Gitt::Models::Trailer` records.
|
226
|
-
* `trailers_index`: Stores the starting index of trailers within the commit message.
|
227
256
|
|
228
257
|
==== Tag
|
229
258
|
|
230
|
-
An instance of `Gitt::Models::Tag` is what is answered back to when using `Gitt
|
259
|
+
An instance of `Gitt::Models::Tag` is what is answered back to when using `Gitt` via the `#tags` method, for example. Here's an example:
|
231
260
|
|
232
261
|
[source,ruby]
|
233
262
|
----
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
263
|
+
#<Struct:Gitt::Models::Tag:0x000314c0
|
264
|
+
author_email = "demo@example.io",
|
265
|
+
author_name = "Brooke Kuhlmann",
|
266
|
+
authored_at = "1671892451",
|
267
|
+
authored_relative_at = "1 year, 6 months ago",
|
268
|
+
body = "Example.\n\n-----BEGIN PGP SIGNATURE-----\n\niQIzBAABCAAdFiEE0UiFiNLe33PmLweh8rxJvE/Nii2FB9wo6oc\nhVJ+beT6vnmZHKsvrqkpb1BAE10/pS8RkXjjaBmYaUIBYmG6RQ/+yUvyNjldWLuO\nBkYyUawSBT94V/ve/oYxTdylCkWj1TGYG+iP4NNnhz64rMikckY=\n=ptac\n-----END PGP SIGNATURE-----\n",
|
269
|
+
committed_at = "1671997684",
|
270
|
+
committed_relative_at = "1 year, 6 months ago",
|
271
|
+
committer_email = "demo@example.io",
|
272
|
+
committer_name = "Brooke Kuhlmann",
|
273
|
+
sha = "662f32b2846c7bd4f153560478f035197f5279d5",
|
274
|
+
signature = "-----BEGIN PGP SIGNATURE-----\n\niQIzBAABCAAdFiEE0UiFiNLe33PmLweh8rxJvE/Nii2FB9wo6oc\nhVJ+beT6vnmZHKsvrqkpb1BAE10/pS8RkXjjaBmYaUIBYmG6RQ/+yUvyNjldWLuO\nBkYyUawSBT94V/ve/oYxTdylCkWj1TGYG+iP4NNnhz64rMikckY=\n=ptac\n-----END PGP SIGNATURE-----\n",
|
275
|
+
subject = "Version 1.0.0",
|
276
|
+
version = "1.0.0"
|
277
|
+
>
|
247
278
|
----
|
248
279
|
|
249
280
|
You get a {struct_link} with the following attributes:
|
@@ -253,11 +284,12 @@ You get a {struct_link} with the following attributes:
|
|
253
284
|
* `authored_at`: Stores author creation date.
|
254
285
|
* `authored_relative_at`: Stores author creation date relative to current time.
|
255
286
|
* `body`: Stores body of tag which can be sentences, multiple paragraphs, and/or signature information.
|
256
|
-
* `committer_email`: Stores committer email.
|
257
|
-
* `committer_name`: Store committer name.
|
258
287
|
* `committed_at`: Stores committer creation date.
|
259
288
|
* `committed_relative_at`: Stores committer creation date relative to current time.
|
289
|
+
* `committer_email`: Stores committer email.
|
290
|
+
* `committer_name`: Store committer name.
|
260
291
|
* `sha`: Stores the commit SHA for which this tag labels
|
292
|
+
* `signature`: Stores the signature when the tag was securely created.
|
261
293
|
* `subject`: Stores the subject.
|
262
294
|
* `version`: Stores the version.
|
263
295
|
|
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.7.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/gitt"
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = "~> 3.3"
|
26
26
|
spec.add_dependency "core", "~> 1.0"
|
27
27
|
spec.add_dependency "dry-monads", "~> 1.6"
|
28
|
-
spec.add_dependency "refinements", "~> 12.
|
28
|
+
spec.add_dependency "refinements", "~> 12.7"
|
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
data/lib/gitt/commands/tag.rb
CHANGED
@@ -15,12 +15,13 @@ module Gitt
|
|
15
15
|
author_name: "%(*authorname)",
|
16
16
|
authored_at: "%(*authordate:raw)",
|
17
17
|
authored_relative_at: "%(*authordate:relative)",
|
18
|
+
body: "%(body)",
|
18
19
|
committed_at: "%(*committerdate:raw)",
|
19
20
|
committed_relative_at: "%(*committerdate:relative)",
|
20
21
|
committer_email: "%(*committeremail)",
|
21
22
|
committer_name: "%(*committername)",
|
22
|
-
body: "%(body)",
|
23
23
|
sha: "%(objectname)",
|
24
|
+
signature: "%(contents:signature)",
|
24
25
|
subject: "%(subject)",
|
25
26
|
version: "%(refname)"
|
26
27
|
}.freeze
|
@@ -37,7 +38,7 @@ module Gitt
|
|
37
38
|
return Failure "Unable to create Git tag without version." unless version
|
38
39
|
return Failure "Tag exists: #{version}." if exist? version
|
39
40
|
|
40
|
-
Tempfile.open "
|
41
|
+
Tempfile.open "gitt" do |file|
|
41
42
|
file.write body
|
42
43
|
write version, file.tap(&:rewind), *flags
|
43
44
|
end
|
data/lib/gitt/models/commit.rb
CHANGED
data/lib/gitt/models/tag.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: 3.
|
4
|
+
version: 3.7.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: 2024-07-
|
38
|
+
date: 2024-07-20 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: '12.
|
74
|
+
version: '12.7'
|
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.7'
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: zeitwerk
|
84
84
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
- !ruby/object:Gem::Version
|
162
162
|
version: '0'
|
163
163
|
requirements: []
|
164
|
-
rubygems_version: 3.5.
|
164
|
+
rubygems_version: 3.5.16
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: A monadic Object API for the Git CLI.
|
metadata.gz.sig
CHANGED
Binary file
|