spek 0.4.0 → 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: a0d110b06f870184e5a72b35e8228a3a00438cc500945d89ef76f04d92b8df37
4
- data.tar.gz: c7c1db38a1a5a47b08755fbdc0c1a40893d6f0ce0ae6ccf9eb731a9da228a923
3
+ metadata.gz: a59f4cfdfd1255f7a671095a3bbb2eff1d39681fb802586c3f059cabec936db3
4
+ data.tar.gz: b14464d502b3cbb53ebeef4068be12f3229805bdd6271c68c993a5b796fb5884
5
5
  SHA512:
6
- metadata.gz: c9355a3853bda314f7f420e3281ecd5623fd34444e99b3b1043947ff60894b0a6232d43bb94d6328e233106687b9739ae13532f061bda5da0c92bad26f76bd99
7
- data.tar.gz: 50c84bda737737e77ebfc4f246ea505824294e37b7adfa415892cae3876ea23901ae87973479f6cb69b6df1eef68d2758fbf6e8e2bdf2720ce1ba5c39e2cf27c
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.4.0"
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"
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: 0.4.0
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-07-17 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
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
132
  requirements: []
133
- rubygems_version: 3.3.18
133
+ rubygems_version: 3.3.19
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: Enhances gem specifications with additional information and tooling.
metadata.gz.sig CHANGED
Binary file