pennyworth 16.7.0 → 17.1.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: 9926f88371e920093c0165635480e9b201a98e010e8af7a58c34037c2ebb7015
4
- data.tar.gz: b778795f301591221af78584baa5b3a34ffd629f17972420a26c1c1ec3204a17
3
+ metadata.gz: f2cb053bcea31f69beb8d1e3ad9fc4690a09cb908a89e0fe73ee0527c03dc6a8
4
+ data.tar.gz: de8cfff1c798a651b642bd4063a7147ff0ec1d4e12c432193a23c1305c299cf3
5
5
  SHA512:
6
- metadata.gz: 29aef0b7148e53082f713fa96f549644f543e7d869d362fb0ddaa4d6fdfb065025acd2f322913854eb4dc57fd5ec8e18386efa207643d66cf03d620bdd30c86a
7
- data.tar.gz: 733f9ceb479a84f0c9eb2a9957456a02ef1d7c7b7c3e46920faf18f539614523ded70403be1c77a85187d85e248fa229c56f868bd3ae568ac3fffccfb1151c9c
6
+ metadata.gz: 795c9d602785d2367b4e789a1c4bc70bcdcdb9fe207d12c0dea576b7a21345244e9eddfb87b23cc2993a9e8d9c9f96f3b84e84aab528ae4c8998fc07bb72a0ec
7
+ data.tar.gz: 76f61737e393ee145d8161488b0a08d96430ae93fa7f546bf9b35db2188995544c6cafd4c6cf006ddc223a2d7e474da96123834c477d0a3ecb0a2927662a746f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the encoding action.
9
9
  class Encoding < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  description "Render Alfred encodings script filter."
13
13
 
@@ -18,7 +18,7 @@ module Pennyworth
18
18
  @processor = processor
19
19
  end
20
20
 
21
- def call(*) = kernel.puts processor.call.to_json
21
+ def call(*) = io.puts processor.call.to_json
22
22
 
23
23
  private
24
24
 
@@ -7,13 +7,13 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the RubyGem action.
9
9
  class Gem < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  description "Render Alfred RubyGems script filter."
13
13
 
14
14
  on "--gems", argument: "[HANDLE]"
15
15
 
16
- default { Container[:configuration].ruby_gems_owner }
16
+ default { Container[:settings].ruby_gems_owner }
17
17
 
18
18
  def initialize(processor: Processor.for_gems, **)
19
19
  super(**)
@@ -22,7 +22,7 @@ module Pennyworth
22
22
 
23
23
  def call handle = nil
24
24
  endpoint = "owners/#{handle || default}/gems.json"
25
- kernel.puts processor.call(endpoint).to_json
25
+ io.puts processor.call(endpoint).to_json
26
26
  end
27
27
 
28
28
  private
@@ -8,20 +8,20 @@ module Pennyworth
8
8
  module GitHub
9
9
  # Handles the GitHub user action.
10
10
  class Organization < Sod::Action
11
- include Import[:kernel]
11
+ include Import[:io]
12
12
 
13
13
  description "Specify organization."
14
14
 
15
15
  on %w[-o --organization], argument: "[HANDLE]"
16
16
 
17
- default { Container[:configuration].git_hub_organization }
17
+ default { Container[:settings].git_hub_organization }
18
18
 
19
19
  def initialize(processor: Processor.for_projects, **)
20
20
  super(**)
21
21
  @processor = processor
22
22
  end
23
23
 
24
- def call(handle = nil) = kernel.puts processor.call("orgs/#{handle || default}").to_json
24
+ def call(handle = nil) = io.puts processor.call("orgs/#{handle || default}").to_json
25
25
 
26
26
  private
27
27
 
@@ -8,20 +8,20 @@ module Pennyworth
8
8
  module GitHub
9
9
  # Handles the GitHub user action.
10
10
  class User < Sod::Action
11
- include Import[:kernel]
11
+ include Import[:io]
12
12
 
13
13
  description "Specify user."
14
14
 
15
15
  on %w[-u --user], argument: "[HANDLE]"
16
16
 
17
- default { Container[:configuration].git_hub_user }
17
+ default { Container[:settings].git_hub_user }
18
18
 
19
19
  def initialize(processor: Processor.for_projects, **)
20
20
  super(**)
21
21
  @processor = processor
22
22
  end
23
23
 
24
- def call(handle = nil) = kernel.puts processor.call("users/#{handle || default}").to_json
24
+ def call(handle = nil) = io.puts processor.call("users/#{handle || default}").to_json
25
25
 
26
26
  private
27
27
 
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the HTTP status action.
9
9
  class HTTPStatus < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  description "Render Alfred HTTP statuses script filter."
13
13
 
@@ -18,7 +18,7 @@ module Pennyworth
18
18
  @processor = processor
19
19
  end
20
20
 
21
- def call(*) = kernel.puts processor.call.to_json
21
+ def call(*) = io.puts processor.call.to_json
22
22
 
23
23
  private
24
24
 
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the system error action.
9
9
  class StandardError < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  description "Render Alfred standard errors script filter."
13
13
 
@@ -18,7 +18,7 @@ module Pennyworth
18
18
  @processor = processor
19
19
  end
20
20
 
21
- def call(*) = kernel.puts processor.call.to_json
21
+ def call(*) = io.puts processor.call.to_json
22
22
 
23
23
  private
24
24
 
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the Standard Gem action.
9
9
  class StandardGem < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  ENDPOINTS = {
13
13
  "all" => "stdgems.json",
@@ -25,7 +25,7 @@ module Pennyworth
25
25
  @endpoints = endpoints
26
26
  end
27
27
 
28
- def call(kind = nil) = kernel.puts processor.call(endpoints.fetch(kind || default)).to_json
28
+ def call(kind = nil) = io.puts processor.call(endpoints.fetch(kind || default)).to_json
29
29
 
30
30
  private
31
31
 
@@ -8,7 +8,7 @@ module Pennyworth
8
8
  module System
9
9
  # Handles the system error action.
10
10
  class Error < Sod::Action
11
- include Import[:kernel]
11
+ include Import[:io]
12
12
 
13
13
  description "Render Alfred system errors script filter."
14
14
 
@@ -19,7 +19,7 @@ module Pennyworth
19
19
  @processor = processor
20
20
  end
21
21
 
22
- def call(*) = kernel.puts processor.call.to_json
22
+ def call(*) = io.puts processor.call.to_json
23
23
 
24
24
  private
25
25
 
@@ -8,7 +8,7 @@ module Pennyworth
8
8
  module System
9
9
  # Handles the system signal action.
10
10
  class Signal < Sod::Action
11
- include Import[:kernel]
11
+ include Import[:io]
12
12
 
13
13
  description "Render Alfred system signals script filter."
14
14
 
@@ -19,7 +19,7 @@ module Pennyworth
19
19
  @processor = processor
20
20
  end
21
21
 
22
- def call(*) = kernel.puts processor.call.to_json
22
+ def call(*) = io.puts processor.call.to_json
23
23
 
24
24
  private
25
25
 
@@ -7,7 +7,7 @@ module Pennyworth
7
7
  module Actions
8
8
  # Handles the text action.
9
9
  class Text < Sod::Action
10
- include Import[:kernel]
10
+ include Import[:io]
11
11
 
12
12
  description "Render Alfred text script filter."
13
13
 
@@ -18,7 +18,7 @@ module Pennyworth
18
18
  @processor = processor
19
19
  end
20
20
 
21
- def call(content) = kernel.puts processor.call(content).to_json
21
+ def call(content) = io.puts processor.call(content).to_json
22
22
 
23
23
  private
24
24
 
@@ -12,21 +12,18 @@ module Pennyworth
12
12
  module Container
13
13
  extend Containable
14
14
 
15
- register :configuration do
16
- self[:defaults].add_loader(:yaml, self[:xdg_config].active)
17
- .then { |registry| Etcher.call registry }
18
- end
19
-
20
- register :defaults do
15
+ register :registry do
21
16
  Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
22
17
  .add_loader(:yaml, self[:defaults_path])
18
+ .add_loader(:yaml, self[:xdg_config].active)
23
19
  end
24
20
 
21
+ register(:settings) { Etcher.call(self[:registry]).dup }
25
22
  register(:specification) { Spek::Loader.call "#{__dir__}/../../pennyworth.gemspec" }
26
23
  register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
27
24
  register(:xdg_config) { Runcom::Config.new "pennyworth/configuration.yml" }
28
- register(:logger) { Cogger.new id: :pennyworth }
29
25
  register :http, HTTP
30
- register :kernel, Kernel
26
+ register(:logger) { Cogger.new id: :pennyworth }
27
+ register :io, STDOUT
31
28
  end
32
29
  end
@@ -3,7 +3,7 @@
3
3
  module Pennyworth
4
4
  # Overrides any string to desired form if matched, otherwise answers the original string.
5
5
  class Inflector
6
- DEFAULTS = Array(Container[:configuration].inflections).reduce({}, :merge)
6
+ DEFAULTS = Array(Container[:settings].inflections).reduce({}, :merge)
7
7
 
8
8
  def initialize overrides = DEFAULTS
9
9
  @overrides = overrides
@@ -6,10 +6,10 @@ module Pennyworth
6
6
  module Loaders
7
7
  # Loads an array gems from the RubyGems API.
8
8
  class Gem
9
- include Import[:configuration, :http]
9
+ include Import[:settings, :http]
10
10
 
11
11
  def call endpoint
12
- http.get("#{configuration.ruby_gems_api_url}/#{endpoint}")
12
+ http.get("#{settings.ruby_gems_api_url}/#{endpoint}")
13
13
  .then do |response|
14
14
  return JSON response.body.to_s, symbolize_names: true if response.status.success?
15
15
 
@@ -6,7 +6,7 @@ module Pennyworth
6
6
  module Loaders
7
7
  # Loads an array of HTTP status records.
8
8
  class HTTPStatus
9
- include Import[:configuration]
9
+ include Import[:settings]
10
10
 
11
11
  def initialize(codes: Rack::Utils::HTTP_STATUS_CODES, model: Models::HTTPStatus, **)
12
12
  super(**)
@@ -22,7 +22,7 @@ module Pennyworth
22
22
 
23
23
  attr_reader :codes, :model
24
24
 
25
- def url = configuration.http_statuses_url
25
+ def url = settings.http_statuses_url
26
26
  end
27
27
  end
28
28
  end
@@ -6,10 +6,10 @@ module Pennyworth
6
6
  module Loaders
7
7
  # Loads an array gems from the Standard Gems API.
8
8
  class StandardGem
9
- include Import[:configuration, :http]
9
+ include Import[:settings, :http]
10
10
 
11
11
  def call endpoint
12
- http.get("#{configuration.standard_gems_api_url}/#{endpoint}")
12
+ http.get("#{settings.standard_gems_api_url}/#{endpoint}")
13
13
  .then do |response|
14
14
  response.status.success? ? records(response.body.to_s) : Core::EMPTY_HASH
15
15
  end
data/pennyworth.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "pennyworth"
5
- spec.version = "16.7.0"
5
+ spec.version = "17.1.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/pennyworth"
@@ -23,17 +23,17 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.3"
26
- spec.add_dependency "cogger", "~> 0.15"
27
- spec.add_dependency "containable", "~> 0.0"
26
+ spec.add_dependency "cogger", "~> 0.21"
27
+ spec.add_dependency "containable", "~> 0.2"
28
28
  spec.add_dependency "core", "~> 1.0"
29
- spec.add_dependency "etcher", "~> 1.6"
29
+ spec.add_dependency "etcher", "~> 2.1"
30
30
  spec.add_dependency "ghub", "~> 0.11"
31
31
  spec.add_dependency "http", "~> 5.1"
32
- spec.add_dependency "infusible", "~> 3.5"
32
+ spec.add_dependency "infusible", "~> 3.8"
33
33
  spec.add_dependency "rack", "~> 3.0"
34
- spec.add_dependency "refinements", "~> 12.1"
35
- spec.add_dependency "runcom", "~> 11.0"
36
- spec.add_dependency "sod", "~> 0.8"
34
+ spec.add_dependency "refinements", "~> 12.7"
35
+ spec.add_dependency "runcom", "~> 11.5"
36
+ spec.add_dependency "sod", "~> 0.12"
37
37
  spec.add_dependency "spek", "~> 3.0"
38
38
  spec.add_dependency "zeitwerk", "~> 2.6"
39
39
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pennyworth
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.7.0
4
+ version: 17.1.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-05-31 00:00:00.000000000 Z
38
+ date: 2024-07-15 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,28 +43,28 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.15'
46
+ version: '0.21'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.15'
53
+ version: '0.21'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: containable
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.0'
60
+ version: '0.2'
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: '0.0'
67
+ version: '0.2'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: core
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -85,14 +85,14 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '1.6'
88
+ version: '2.1'
89
89
  type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.6'
95
+ version: '2.1'
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: ghub
98
98
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3.5'
130
+ version: '3.8'
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '3.5'
137
+ version: '3.8'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: rack
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -155,42 +155,42 @@ dependencies:
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '12.1'
158
+ version: '12.7'
159
159
  type: :runtime
160
160
  prerelease: false
161
161
  version_requirements: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: '12.1'
165
+ version: '12.7'
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: runcom
168
168
  requirement: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '11.0'
172
+ version: '11.5'
173
173
  type: :runtime
174
174
  prerelease: false
175
175
  version_requirements: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '11.0'
179
+ version: '11.5'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: sod
182
182
  requirement: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '0.8'
186
+ version: '0.12'
187
187
  type: :runtime
188
188
  prerelease: false
189
189
  version_requirements: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: '0.8'
193
+ version: '0.12'
194
194
  - !ruby/object:Gem::Dependency
195
195
  name: spek
196
196
  requirement: !ruby/object:Gem::Requirement
@@ -309,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  - !ruby/object:Gem::Version
310
310
  version: '0'
311
311
  requirements: []
312
- rubygems_version: 3.5.11
312
+ rubygems_version: 3.5.15
313
313
  signing_key:
314
314
  specification_version: 4
315
315
  summary: A command line interface for augmented Alfred workflows.
metadata.gz.sig CHANGED
Binary file