spek 1.0.2 → 2.0.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: 32c1608bf5bd19319dbc3955dfe12187bb3f1f912d3cee1197aaceaae2b381e2
4
- data.tar.gz: e6766e3b085ea8a7169fa162a930f8ebd8ecdcbfe868dd3292913ad33b412586
3
+ metadata.gz: 1aa43e8a7085314f90997acf699b27f24cff95772285e87e6b484cf59f2c4cbc
4
+ data.tar.gz: 7e0e1c1c942cf0ebf8b9fbd6b78ae31a73fd633d8e780bc15b312c9afda847bb
5
5
  SHA512:
6
- metadata.gz: a105a71f4e62a5a25afd4ee76a51b0a769b4876945bbcb25b5e1a235a92c7ceb961934d22f2137a76f6bc0fe7b2faf303cf11544592f9de63c4298b12b5c9fe9
7
- data.tar.gz: 4eba2c2e76295181f98a21a80e2d3527ad4d80542e307eec1d5dd1e327deee33987beb37ed53b3fd3e11c84eb2c9a5ef7e6367bca562ae16ba090913bd6e8063
6
+ metadata.gz: 5c625c4de261c901379f7bc9b3e69c7d0ace9ca898ca10caa0874c4faccaddb6ba5b59b72f007701d1af5b98c1acbd01d66f52309e46bb92cde4693bafda2065
7
+ data.tar.gz: ef85c2e5fa4d4e7df8a2478ae7047b60e01a38573d4d2a6ebedc3f974b483965334b936a91f4b373cd9a895b76f83979724a3b99278a96a4bacd5e3ccb5668a7
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- M0�=DR�c0Y��%�%�!p[γ�oGM���_c?����l����*��T!3�Ȫᢪ��nW|�HO�k���^�A��#DR�I�袹�����m
2
- re�}f�;g ��D��x�Ѿٿ�*P�@@7Y2���`�� �-[�`��� I%�w�u��*[����oTtg���̗�-_>Ŝ��d���Jjc^U��Ts �p�f�1=Fd9�w!7����
1
+ �ޅ�^�^�ޑs(Dc��;��WǏ���x����S7
2
+ 9~�%��!�{o������3,���@uHG�������T��M�C౬���-��Uƫ-�%zٺv���`Dq�d+\h�MW�ñ��+���Xj� أ/�QŢ��3�v�}9sbQ3��H�`��9L�w�59�>\��l��w} 5�a ���A ?��u���2E�?'�� �� F8s"Ȃ��ع��>�1iK�.5f��]�̿}r�����m��#��IY����H����*��O3��/�m�j1���O�1T�S����
data/README.adoc CHANGED
@@ -40,20 +40,58 @@ gem if you need working example.
40
40
 
41
41
  === Presenter
42
42
 
43
- This object wraps a `Gem::Specification` for presentation, provides semantic versioning, direct
44
- access to metadata information, pathnames, and other enriched information. You can obtain an
45
- instance via the following code:
43
+ This object wraps the `Gem::Specification` for presentation purposes, provides semantic versioning, direct access to metadata information, pathnames, and other enriched information. You can obtain an
44
+ instance using the following code, for example:
46
45
 
47
46
  [source,ruby]
48
47
  ----
49
48
  specification = Gem::Specification.new do |spec|
50
- spec.name = "test"
49
+ spec.name = "demo"
51
50
  spec.version = "0.0.0"
52
- spec.authors = "Jill Smith"
53
- spec.summary = "A test summary."
51
+ spec.authors = ["Jill Smith"]
52
+ spec.email = ["demo@alchemists.io"]
53
+ spec.homepage = "https://alchemists.io/projects/demo"
54
+ spec.summary = "A demo summary."
55
+ spec.license = "Hippocratic-2.1"
56
+
57
+ spec.signing_key = Gem.default_key_path
58
+ spec.cert_chain = [Gem.default_cert_path]
59
+
60
+ spec.metadata = {
61
+ "bug_tracker_uri" => "https://github.com/bkuhlmann/demo/issues",
62
+ "changelog_uri" => "https://alchemists.io/projects/demo/versions",
63
+ "documentation_uri" => "https://alchemists.io/projects/demo",
64
+ "funding_uri" => "https://github.com/sponsors/bkuhlmann",
65
+ "label" => "Demo",
66
+ "rubygems_mfa_required" => "true",
67
+ "source_code_uri" => "https://github.com/bkuhlmann/demo"
68
+ }
54
69
  end
55
70
 
56
71
  presenter = Spek::Presenter.new specification
72
+
73
+ presenter.allowed_push_host # "https://rubygems.org"
74
+ presenter.allowed_push_key # "rubygems_api_key"
75
+ presenter.authors # ["Jill Smith"]
76
+ presenter.banner # "Demo 0.0.0: A demo summary."
77
+ presenter.certificate_chain # [#<Pathname:~/.gem/gem-public_cert.pem>]
78
+ presenter.documentation_url # "https://alchemists.io/projects/demo"
79
+ presenter.emails # ["demo@alchemists.io"]
80
+ presenter.funding_url # "https://github.com/sponsors/bkuhlmann"
81
+ presenter.homepage_url # "https://alchemists.io/projects/demo"
82
+ presenter.issues_url # "https://github.com/bkuhlmann/demo/issues"
83
+ presenter.label # "Demo"
84
+ presenter.labeled_summary # "Demo: A demo summary."
85
+ presenter.labeled_version # "Demo 0.0.0"
86
+ presenter.named_version # "demo 0.0.0"
87
+ presenter.package_name # "demo-0.0.0.gem"
88
+ presenter.package_path # #<Pathname:tmp/demo-0.0.0.gem>
89
+ presenter.rubygems_mfa? # true
90
+ presenter.signing_key # #<Pathname:~/.gem/gem-private_key.pem>
91
+ presenter.source_path # #<Pathname:~/.cache/.../3.2.0/gems/demo-0.0.0>
92
+ presenter.source_url # "https://github.com/bkuhlmann/demo"
93
+ presenter.version # #<struct Versionaire::Version major=0, minor=0, patch=0>
94
+ presenter.versions_url # "https://alchemists.io/projects/demo/versions"
57
95
  ----
58
96
 
59
97
  The presenter is a read-only object so you'll only have access to _getter_ methods which are mostly
@@ -99,7 +137,7 @@ end
99
137
  ----
100
138
 
101
139
  The picker always answers a link:https://dry-rb.org/gems/dry-monads[monad] so you can quickly
102
- pattern match for further action.
140
+ link:https://alchemists.io/articles/ruby_pattern_matching[pattern match] for further action.
103
141
 
104
142
  === Versioner
105
143
 
@@ -45,6 +45,8 @@ module Spek
45
45
 
46
46
  def authors = Array record.author
47
47
 
48
+ def banner(delimiter: ": ") = [labeled_version, summary].tap(&:compress!).join delimiter
49
+
48
50
  def certificate_chain = Array(record.cert_chain).map { |path| Pathname path.to_s }
49
51
 
50
52
  def documentation_url = metadata.fetch "documentation_uri", ""
@@ -59,13 +61,13 @@ module Spek
59
61
 
60
62
  def label = metadata.fetch "label", "Undefined"
61
63
 
62
- def labeled_summary(delimiter: " - ") = [label, summary].compress.join delimiter
64
+ def labeled_summary(delimiter: ": ") = [label, summary].tap(&:compress!).join delimiter
63
65
 
64
- def labeled_version = [label, version].compress.join " "
66
+ def labeled_version = [label, version].tap(&:compress!).join " "
65
67
 
66
- def named_version = [name, version].compress.join " "
68
+ def named_version = [name, version].tap(&:compress!).join " "
67
69
 
68
- def package_name = %(#{[name, version].compress.join "-"}.gem)
70
+ def package_name = %(#{[name, version].tap(&:compress!).join "-"}.gem)
69
71
 
70
72
  def package_path = Pathname("tmp").join package_name
71
73
 
data/spek.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "spek"
5
- spec.version = "1.0.2"
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/spek"
9
- spec.summary = "Enhances gem specifications with additional information and tooling."
9
+ spec.summary = "An enhanced gem specification wrapper."
10
10
  spec.license = "Hippocratic-2.1"
11
11
 
12
12
  spec.metadata = {
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = "~> 3.2"
26
26
  spec.add_dependency "dry-monads", "~> 1.6"
27
- spec.add_dependency "refinements", "~> 10.0"
28
- spec.add_dependency "versionaire", "~> 11.0"
27
+ spec.add_dependency "refinements", "~> 11.0"
28
+ spec.add_dependency "versionaire", "~> 12.0"
29
29
  spec.add_dependency "zeitwerk", "~> 2.6"
30
30
 
31
31
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spek
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
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-03-22 00:00:00.000000000 Z
38
+ date: 2023-06-13 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: dry-monads
@@ -57,28 +57,28 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '10.0'
60
+ version: '11.0'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '10.0'
67
+ version: '11.0'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: versionaire
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '11.0'
74
+ version: '12.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: '11.0'
81
+ version: '12.0'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: zeitwerk
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -137,8 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.4.9
140
+ rubygems_version: 3.4.14
141
141
  signing_key:
142
142
  specification_version: 4
143
- summary: Enhances gem specifications with additional information and tooling.
143
+ summary: An enhanced gem specification wrapper.
144
144
  test_files: []
metadata.gz.sig CHANGED
Binary file