gitt 1.1.0 → 1.1.2

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: 89432cb99090adf3338c1f9226c01a018afaaa08df54d4d84929bb20f6b0ea1d
4
- data.tar.gz: 93d61f586d6d5df881c55b47a814b21fd5ca63ade7c182a8269bf5dd9f975d2d
3
+ metadata.gz: d6db467cc857d649e08395a7c9b1c21ae3e6cb642f29b3da28c59e2f22897d20
4
+ data.tar.gz: 4d1e7a21157c389c0890cc73a854d13115d0d9e1508098ad30dc9077b2ca2465
5
5
  SHA512:
6
- metadata.gz: 9c40e0cc1712b995d90aaeff4302a08d13ba02e7e297f61ec522e648e31b2f26b68f03e5cd9fede300553d5ab22cf2c0d3319b26bf55071b253647410a9aeee9
7
- data.tar.gz: abc1e6a2f5b6b88740807e180c9675897b24b21e9469d9ef49441b66944d359c9f28be0c476f3393901620715564464088ad8e66cfd7bfe3b1cf19b2f07c19bd
6
+ metadata.gz: c64c55d0370c4087f440a216b5d5f43fbc30e2530e7629db23423f9555104cdde3f61fdb6377d7679dd4e28d80747245f2172253520666ce1a46621984e9115a
7
+ data.tar.gz: 722fe4f60211868b47ee89cb4ee3306c397114e2f10571f901411f04f21e886ff47adffa89141f3c1b2ec0a0b1855887eac72a13e104c2ee0d277f725b0894de
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -3,17 +3,18 @@
3
3
  :figure-caption!:
4
4
 
5
5
  :git_link: link:https://git-scm.com[Git]
6
- :struct_link: link:https://www.alchemists.io/articles/ruby_structs[Struct]
6
+ :rspec_link: link:https://rspec.info[RSpec]
7
+ :struct_link: link:https://alchemists.io/articles/ruby_structs[Struct]
7
8
 
8
9
  = Gitt
9
10
 
10
11
  Provides a monadic Object API to the {git_link} CLI. This project is also an extraction of work originally implemented within the following projects:
11
12
 
12
- * link:https://www.alchemists.io/projects/git-lint[Git Lint]
13
- * link:https://www.alchemists.io/projects/milestoner[Milestoner]
14
- * link:https://www.alchemists.io/projects/rubysmith[Rubysmith]
13
+ * link:https://alchemists.io/projects/git-lint[Git Lint]
14
+ * link:https://alchemists.io/projects/milestoner[Milestoner]
15
+ * link:https://alchemists.io/projects/rubysmith[Rubysmith]
15
16
 
16
- If you are looking for alternatives within this space, you might find the following gems of benefit too:
17
+ This project doesn't try to encompass the vast feature set natively provided by {git_link} but only exposes the most used features, limited as this may be. Over time, more of the {git_link} feature set will be implemented but it'll most likely happen slowly and organically. If you are looking for alternatives to this gem, then you might find the following of interest:
17
18
 
18
19
  * link:https://github.com/ruby-git/ruby-git[Ruby Git]
19
20
  * link:https://github.com/libgit2/rugged[Rugged]
@@ -22,8 +23,9 @@ toc::[]
22
23
 
23
24
  == Features
24
25
 
25
- * Wraps all Git commands with additional enhancements to improve your working experience.
26
- * Answers link:https://dry-rb.org/gems/dry-monads[monads] so you can pipe commands together for more powerful and complex workflows.
26
+ * Wraps a subset of native {git_link} commands with additional enhancements to improve your working experience.
27
+ * Answers link:https://dry-rb.org/gems/dry-monads[monads] you can pipe together -- or link:https://alchemists.io/projects/transactable[transact] -- for more powerful and complex workflows.
28
+ * Provides _optional_ {rspec_link} shared contexts that speed up the testing of your own Git related implementations.
27
29
 
28
30
  == Requirements
29
31
 
@@ -61,7 +63,7 @@ git.set # Equivalent to `get config set`.
61
63
  git.tag # Equivalent to `git tag <arguments>`.
62
64
  git.tag? # Answers if local or remote tag exists.
63
65
  git.tag_create # Create a new tag.
64
- git.tag_last # Anwswers last tag created.
66
+ git.tag_last # Answers last tag created.
65
67
  git.tag_local? # Answers if local tag exists?
66
68
  git.tag_parse # Parses and answers a tag record.
67
69
  git.tag_remote? # Answers if remote tag exists?
@@ -73,7 +75,7 @@ git.uncommitted # Parses a file and answers an unsaved commit message.
73
75
  === Commands
74
76
 
75
77
  Should you want to use individual commands instead of interacting with the `Repository` object, you
76
- can leverage any of the objects in the `Commands` namespace which -- at a minimum -- use the link:https://www.alchemists.io/articles/interactor_pattern[Command Pattern]. Here are the _select_ commands which are enhanced further:
78
+ can leverage any of the objects in the `Commands` namespace which -- at a minimum -- use the link:https://alchemists.io/articles/interactor_pattern[Command Pattern]. Here are the _select_ commands which are enhanced further:
77
79
 
78
80
  ==== link:https://git-scm.com/docs/git-branch[Branch]
79
81
 
@@ -254,6 +256,65 @@ The attributes break down as follows:
254
256
  * `space`: Answers either a space or an empty string with the former being invalid.
255
257
  * `value`: Answers the value associated with the key.
256
258
 
259
+ === RSpec
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.
262
+
263
+ ==== Git Commit
264
+
265
+ Provides a default `git_commit` record of `Gitt::Commits::Model` with minimal information for testing purposes and can be used as follows:
266
+
267
+ [source,ruby]
268
+ ----
269
+ require "gitt/shared_contexts/git_commit"
270
+
271
+ describe Demo do
272
+ include_context "with Git commit"
273
+ end
274
+ ----
275
+
276
+ ==== Git Repository
277
+
278
+ Provides a simple Git repository with a single commit for testing purposes. This repository is set up and torn down _around_ each spec. The repository is built within your project's `tmp` directory and provides a `git_repo_dir` pathname you can interact with. Here's how to use it:
279
+
280
+ [source,ruby]
281
+ ----
282
+ require "gitt/shared_contexts/git_repo"
283
+ require "refinemenets/pathnames"
284
+
285
+ describe Demo do
286
+ include_context "with Git repository"
287
+
288
+ using Refinements::Pathnames
289
+
290
+ it "is a demo" do
291
+ git_repo_dir.change_dir { # Your expectation goes here. }
292
+ end
293
+ end
294
+ ----
295
+
296
+ ==== Temporary Directory
297
+
298
+ Provides a temporary directory (i.e. `tmp/rspec`) for creating directories and or files you want set up and torn down _around_ each spec. Access to the `temp_dir` pathname is also provided for you. Here's how to use it:
299
+
300
+ [source,ruby]
301
+ ----
302
+ require "gitt/shared_contexts/temp_dir"
303
+ require "refinemenets/pathnames"
304
+
305
+ describe Demo do
306
+ include_context "with temporary directory"
307
+
308
+ using Refinements::Pathnames
309
+
310
+ it "is a demo" do
311
+ temp_dir.change_dir { # Your expectation goes here. }
312
+ end
313
+ end
314
+ ----
315
+
316
+ 💡 The Git Repository shared context -- mentioned above -- includes this shared context by default so you don't have to manually include this shared context when using the Git Repository shared context.
317
+
257
318
  == Development
258
319
 
259
320
  To contribute, run:
@@ -278,22 +339,22 @@ To test, run:
278
339
 
279
340
  [source,bash]
280
341
  ----
281
- bundle exec rake
342
+ bin/rake
282
343
  ----
283
344
 
284
- == link:https://www.alchemists.io/policies/license[License]
345
+ == link:https://alchemists.io/policies/license[License]
285
346
 
286
- == link:https://www.alchemists.io/policies/security[Security]
347
+ == link:https://alchemists.io/policies/security[Security]
287
348
 
288
- == link:https://www.alchemists.io/policies/code_of_conduct[Code of Conduct]
349
+ == link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
289
350
 
290
- == link:https://www.alchemists.io/policies/contributions[Contributions]
351
+ == link:https://alchemists.io/policies/contributions[Contributions]
291
352
 
292
- == link:https://www.alchemists.io/projects/gitt/versions[Versions]
353
+ == link:https://alchemists.io/projects/gitt/versions[Versions]
293
354
 
294
- == link:https://www.alchemists.io/community[Community]
355
+ == link:https://alchemists.io/community[Community]
295
356
 
296
357
  == Credits
297
358
 
298
- * Built with link:https://www.alchemists.io/projects/gemsmith[Gemsmith].
299
- * Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
359
+ * Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
360
+ * Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
data/gitt.gemspec CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "gitt"
5
- spec.version = "1.1.0"
5
+ spec.version = "1.1.2"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
- spec.homepage = "https://www.alchemists.io/projects/gitt"
8
+ spec.homepage = "https://alchemists.io/projects/gitt"
9
9
  spec.summary = "Provides a monadic Object API wrapper around the Git CLI."
10
10
  spec.license = "Hippocratic-2.1"
11
11
 
12
12
  spec.metadata = {
13
13
  "bug_tracker_uri" => "https://github.com/bkuhlmann/gitt/issues",
14
- "changelog_uri" => "https://www.alchemists.io/projects/gitt/versions",
15
- "documentation_uri" => "https://www.alchemists.io/projects/gitt",
14
+ "changelog_uri" => "https://alchemists.io/projects/gitt/versions",
15
+ "documentation_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",
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: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,25 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBBTANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMjAzMTkxNzI0MzJaFw0yMzAzMTkx
15
- NzI0MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
- IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
- xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
- brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
19
- 9z0A8KcGhz67SdcoQiD7qiCjL/2NTeWHOzkpPrdGlt088+VerEEGf5I13QCvaftP
20
- D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb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9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
+ gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
30
37
  -----END CERTIFICATE-----
31
- date: 2023-01-07 00:00:00.000000000 Z
38
+ date: 2023-03-22 00:00:00.000000000 Z
32
39
  dependencies:
33
40
  - !ruby/object:Gem::Dependency
34
41
  name: core
@@ -125,13 +132,13 @@ files:
125
132
  - lib/gitt/shared_contexts/git_repo.rb
126
133
  - lib/gitt/shared_contexts/temp_dir.rb
127
134
  - lib/gitt/shell.rb
128
- homepage: https://www.alchemists.io/projects/gitt
135
+ homepage: https://alchemists.io/projects/gitt
129
136
  licenses:
130
137
  - Hippocratic-2.1
131
138
  metadata:
132
139
  bug_tracker_uri: https://github.com/bkuhlmann/gitt/issues
133
- changelog_uri: https://www.alchemists.io/projects/gitt/versions
134
- documentation_uri: https://www.alchemists.io/projects/gitt
140
+ changelog_uri: https://alchemists.io/projects/gitt/versions
141
+ documentation_uri: https://alchemists.io/projects/gitt
135
142
  funding_uri: https://github.com/sponsors/bkuhlmann
136
143
  label: Gitt
137
144
  rubygems_mfa_required: 'true'
@@ -151,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
158
  - !ruby/object:Gem::Version
152
159
  version: '0'
153
160
  requirements: []
154
- rubygems_version: 3.4.2
161
+ rubygems_version: 3.4.9
155
162
  signing_key:
156
163
  specification_version: 4
157
164
  summary: Provides a monadic Object API wrapper around the Git CLI.
metadata.gz.sig CHANGED
Binary file