gitt 3.5.0 → 3.6.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: 10109921053ef53c8865eac269ab03709ff3d04a309df4424812b1d21fa0264a
4
- data.tar.gz: 98ee929f656a98a0ff42d2baa7e2f195d91f4a283675ae9aa8225fc4d11453e5
3
+ metadata.gz: 10c0a2508e0246a09377b0964f6cd839932090c7c1079773f653a18411b79b86
4
+ data.tar.gz: 43c3cfb91b3083424254794bdca13cf9971a07a8463b73fa8142b4a80c86ab95
5
5
  SHA512:
6
- metadata.gz: 8d20d960474f171061be96e2b3a64a3a84ea1ffc0e83eac1f7b5f2cf74633aa4869be6bdae9fae10175d3577a09bb6a536ed6aab4e75d910716c4da2408cecca
7
- data.tar.gz: b57f2c27d7bb8d42b835c374ac604f9d8561c903e6ac8d6cf9c3bab13c1769e73371e5a485b063246f877055d2e459a7e2d01f796329cb6c873c9344b841d1e9
6
+ metadata.gz: 9cfa2bf0a28272d3538f30890abfb3e57e3734b53f9c5dedbdedc98954424e0cc375ff67b1b9814617ac70c5b86d75a3f0706d5aee66f45c868bf53d158718ea
7
+ data.tar.gz: 9b7cea5e367c368108cda7ed705d0e020520b71da9f85b6139238853b06c30bb80a5a79d4aba8ed033a4c66f331cb14781d5ffb960d40c35d0738d43ac0ec40f
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::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:
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
- # #<struct Gitt::Models::Commit
201
- # author_date_relative="2 days ago",
202
- # author_email="demo@example.com",
203
- # author_name="Demo User",
204
- # body="Necessary to explain recent changes.\n",
205
- # body_lines=["Necessary to explain recent changes."],
206
- # body_paragraphs=["Necessary to explain recent changes."],
207
- # message="Updated documentation with new functionality\n\nNecessary to explain recent changes.\n",
208
- # sha="5e21a9866827bf5c68bd445ea01b3837a3936b45",
209
- # subject="Updated documentation with new functionality",
210
- # trailers=[],
211
- # trailers_index=nil>
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
- * `message`: Stores the entire, raw, commit message (i.e. subject and body).
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::Repository` via the `#tag_parse` method. Here's an example:
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
- # #<struct Gitt::Models::Tag
235
- # author_email="demo@example.com",
236
- # author_name="Brooke Kuhlmann",
237
- # authored_at="1671892451",
238
- # authored_relative_at="1 year ago",
239
- # body="A demo body.",
240
- # committed_at="1671997684",
241
- # committed_relative_at="1 year ago",
242
- # committer_email="demo@example.com",
243
- # committer_name="Brooke Kuhlmann",
244
- # sha="662f32b2846c7bd4f153560478f035197f5279d5",
245
- # subject="Version 1.0.0",
246
- # version="1.0.0">
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.0"
5
+ spec.version = "3.6.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/gitt"
@@ -23,6 +23,8 @@ module Gitt
23
23
  raw: "%B",
24
24
  sha: "%H",
25
25
  signature: "%G?",
26
+ fingerprint: "%GK",
27
+ fingerprint_key: "%GF",
26
28
  subject: "%s",
27
29
  trailers: "%(trailers)"
28
30
  }.freeze
@@ -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 "git_plus" do |file|
41
+ Tempfile.open "gitt" do |file|
41
42
  file.write body
42
43
  write version, file.tap(&:rewind), *flags
43
44
  end
@@ -20,6 +20,8 @@ module Gitt
20
20
  :deletions,
21
21
  :encoding,
22
22
  :files_changed,
23
+ :fingerprint,
24
+ :fingerprint_key,
23
25
  :insertions,
24
26
  :lines,
25
27
  :notes,
@@ -14,6 +14,7 @@ module Gitt
14
14
  :committer_email,
15
15
  :committer_name,
16
16
  :sha,
17
+ :signature,
17
18
  :subject,
18
19
  :version
19
20
  ) do
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.5.0
4
+ version: 3.6.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-01 00:00:00.000000000 Z
38
+ date: 2024-07-04 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: core
metadata.gz.sig CHANGED
Binary file