spek 0.2.2 → 0.5.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: bf104e7afeb701f9090aa52435079748bfdb807a207a8320b2480fb20742e7ef
4
- data.tar.gz: 4f3d9eb8f54d99edfc8a362340f1c2e100d384ef2e270974959477d849b6f8f9
3
+ metadata.gz: a59f4cfdfd1255f7a671095a3bbb2eff1d39681fb802586c3f059cabec936db3
4
+ data.tar.gz: b14464d502b3cbb53ebeef4068be12f3229805bdd6271c68c993a5b796fb5884
5
5
  SHA512:
6
- metadata.gz: 7d231d1f7e55b6dd204468cb5b61f43be1aa249b07ff83cfcc875ff25acd84b194dd1aa15fe397ce5ef1dce04f76c40c325d9f0ed4f9d66c7b2c221dad14f77a
7
- data.tar.gz: f1bb2a75e87bfb50d4f0b50617df9e36ed6c1c4e513f3e2fe4b486524b362481945d75f790ac33b59cff90b77717a8706804a08a5730e362f2b432f75a778b96
6
+ metadata.gz: 39ae980b23e097d1573c5e4b69921e890cf168b182c051435e174c02c50328cb3d6c6020b71ceaf37c2228ccecd863c184454b1833b32a01aae3e6b720dd5ba6
7
+ data.tar.gz: cccc4abfd901e446a0dbd13e962e28a40b4066d16c4c461c8141fd4d7e3efb8eef1beeb2367597ec19bd4318a2c29827bda5d025855d948cca389d5822f42069
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/spek/finder.rb CHANGED
@@ -10,7 +10,7 @@ module Spek
10
10
  @presenter = presenter
11
11
  end
12
12
 
13
- def call(name) = client.find_all_by_name(name).map { |record| presenter.new record }
13
+ def call(name) = client.find_all_by_name(name).map { |record| presenter.with_default record }
14
14
 
15
15
  private
16
16
 
data/lib/spek/loader.rb CHANGED
@@ -10,7 +10,7 @@ module Spek
10
10
  @presenter = presenter
11
11
  end
12
12
 
13
- def call(path) = client.load(path.to_s).then { |record| presenter.new record }
13
+ def call(path) = client.load(path.to_s).then { |record| presenter.with_default record }
14
14
 
15
15
  private
16
16
 
@@ -31,14 +31,18 @@ module Spek
31
31
  summary
32
32
  ] => :record
33
33
 
34
+ def self.with_default record = nil, model: Gem::Specification
35
+ record && record.is_a?(model) ? new(record) : new(model.new)
36
+ end
37
+
34
38
  def initialize record
35
39
  @record = record
36
40
  end
37
41
 
38
- def allowed_push_key = metadata.fetch "allowed_push_key", "rubygems_api_key"
39
-
40
42
  def allowed_push_host = metadata.fetch "allowed_push_host", ::Gem::DEFAULT_HOST
41
43
 
44
+ def allowed_push_key = metadata.fetch "allowed_push_key", "rubygems_api_key"
45
+
42
46
  def authors = Array record.author
43
47
 
44
48
  def certificate_chain = Array(record.cert_chain).map { |path| Pathname path.to_s }
@@ -57,13 +61,13 @@ module Spek
57
61
 
58
62
  def labeled_summary(delimiter: " - ") = [label, summary].compress.join delimiter
59
63
 
60
- def labeled_version = "#{label} #{version}"
64
+ def labeled_version = [label, version].compress.join " "
61
65
 
62
- def named_version = "#{name} #{version}"
66
+ def named_version = [name, version].compress.join " "
63
67
 
64
- def package_path = Pathname("tmp").join package_name
68
+ def package_name = %(#{[name, version].compress.join "-"}.gem)
65
69
 
66
- def package_name = "#{name}-#{version}.gem"
70
+ def package_path = Pathname("tmp").join package_name
67
71
 
68
72
  def rubygems_mfa? = metadata.fetch("rubygems_mfa_required", "false").to_bool
69
73
 
data/spek.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "spek"
5
- spec.version = "0.2.2"
5
+ spec.version = "0.5.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/spek"
@@ -13,6 +13,7 @@ Gem::Specification.new do |spec|
13
13
  "bug_tracker_uri" => "https://github.com/bkuhlmann/spek/issues",
14
14
  "changelog_uri" => "https://www.alchemists.io/projects/spek/versions",
15
15
  "documentation_uri" => "https://www.alchemists.io/projects/spek",
16
+ "funding_uri" => "https://github.com/sponsors/bkuhlmann",
16
17
  "label" => "Spek",
17
18
  "rubygems_mfa_required" => "true",
18
19
  "source_code_uri" => "https://github.com/bkuhlmann/spek"
@@ -23,8 +24,8 @@ Gem::Specification.new do |spec|
23
24
 
24
25
  spec.required_ruby_version = "~> 3.1"
25
26
  spec.add_dependency "dry-monads", "~> 1.4"
26
- spec.add_dependency "refinements", "~> 9.2"
27
- spec.add_dependency "versionaire", "~> 10.1"
27
+ spec.add_dependency "refinements", "~> 9.6"
28
+ spec.add_dependency "versionaire", "~> 10.5"
28
29
  spec.add_dependency "zeitwerk", "~> 2.5"
29
30
 
30
31
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �y��S`iB.�鋝8�/��$}�����P^̴��^VD��9��T�Ѕ��|`//�LCo���d�׊+[ҽwK=AuJ�n ( ���{
2
- 2lr�&���
1
+ |�Rk3f�|�n�b����^�,I����d^�$[��~�b敿��G��K �ףH1���� ��,�l�d|���@�Pt�Z�yّ�a"�Ț�E��p�S� 릥�[�&���z~U�>�P1㿥 �?����r�,+�0�P�����./�+.��-���.I�`]�Ru �B��ǣ�Ãx�c�Ip;{9��{Zwp�+�AFA��޹�R��H
2
+ _�B}��@��@�x�H�VɱE���pZ_
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: 0.2.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
29
  RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-04-23 00:00:00.000000000 Z
31
+ date: 2022-08-01 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-monads
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '9.2'
53
+ version: '9.6'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '9.2'
60
+ version: '9.6'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: versionaire
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '10.1'
67
+ version: '10.5'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '10.1'
74
+ version: '10.5'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: zeitwerk
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -111,6 +111,7 @@ metadata:
111
111
  bug_tracker_uri: https://github.com/bkuhlmann/spek/issues
112
112
  changelog_uri: https://www.alchemists.io/projects/spek/versions
113
113
  documentation_uri: https://www.alchemists.io/projects/spek
114
+ funding_uri: https://github.com/sponsors/bkuhlmann
114
115
  label: Spek
115
116
  rubygems_mfa_required: 'true'
116
117
  source_code_uri: https://github.com/bkuhlmann/spek
@@ -129,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
130
  - !ruby/object:Gem::Version
130
131
  version: '0'
131
132
  requirements: []
132
- rubygems_version: 3.3.12
133
+ rubygems_version: 3.3.19
133
134
  signing_key:
134
135
  specification_version: 4
135
136
  summary: Enhances gem specifications with additional information and tooling.
metadata.gz.sig CHANGED
Binary file