pennyworth 15.1.0 → 15.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +5 -29
- data/lib/pennyworth/cli/actions/standard_gems.rb +10 -6
- data/lib/pennyworth/cli/shell.rb +1 -1
- data/lib/pennyworth/integrations/standard_gems/client.rb +2 -33
- data/lib/pennyworth/presenters/standard_gem.rb +7 -3
- data/pennyworth.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ff1de819087544b1d4a9bdff56e119b93844ee9cc60ac7f726a48b9a1f14eb2
|
4
|
+
data.tar.gz: e8c6f643fa3fbadda887dbc9c63908c9d6c57cef05abcab9aa52be5cfce65cd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff89a69387d37dc83e016c17bb18ef198bcf99cc41656eddf99ce71ea1a60d2d9c54f023c173c265ec8c7d6849c434aa12af07a7e35ba42bd42a5b174eefeaae
|
7
|
+
data.tar.gz: 7ccd9996c4b2c274e921ed77d4c4cef5425bd5347712e5857ebe606566a605177f5c3129d1bbd9926300e038bb24299a485793ea1be1a8a3cbea36c09e838dd1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -22,7 +22,7 @@ toc::[]
|
|
22
22
|
|
23
23
|
== Screencast
|
24
24
|
|
25
|
-
video::https://alchemists.io/videos/projects/pennyworth/demo.mp4[poster=https://alchemists.io/images/projects/pennyworth/demo.png,width=706,height=
|
25
|
+
video::https://alchemists.io/videos/projects/pennyworth/demo.mp4[poster=https://alchemists.io/images/projects/pennyworth/demo.png,width=706,height=631,role=focal_point]
|
26
26
|
|
27
27
|
== Requirements
|
28
28
|
|
@@ -78,31 +78,7 @@ with others.
|
|
78
78
|
|
79
79
|
From the command line, type `pennyworth` to view usage:
|
80
80
|
|
81
|
-
|
82
|
-
USAGE
|
83
|
-
sublime_text_kit [OPTIONS]
|
84
|
-
sublime_text_kit COMMAND [OPTIONS]
|
85
|
-
|
86
|
-
OPTIONS
|
87
|
-
--encodings Render Alfred encodings script filter.
|
88
|
-
--http_statuses Render Alfred HTTP statuses script filter.
|
89
|
-
--ruby_gems [HANDLE] Render Alfred RubyGems script filter.
|
90
|
-
Default: bkuhlmann.
|
91
|
-
--standard_gems [KIND] Render Alfred Standard Gems script filter.
|
92
|
-
Use: all, default, or bundled.
|
93
|
-
Default: all.
|
94
|
-
--standard_errors Render Alfred standard errors script filter.
|
95
|
-
--system_errors Render Alfred system errors script filter.
|
96
|
-
--system_signals Render Alfred system signals script filter.
|
97
|
-
--text CONTENT Render Alfred text script filter.
|
98
|
-
-v, --version Show version.
|
99
|
-
-h, --help [COMMAND] Show this message.
|
100
|
-
|
101
|
-
COMMANDS
|
102
|
-
config Manage configuration.
|
103
|
-
Path is dynamic per current directory.
|
104
|
-
git_hub Render Alfred GitHub repositories script filter.
|
105
|
-
....
|
81
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/usage.png[Usage,width=668,height=499,role=focal_point]
|
106
82
|
|
107
83
|
While the command line options are nice, the real power comes from using Pennyworth in conjunction
|
108
84
|
with link:https://www.alfredapp.com/help/workflows/inputs/script-filter/json[Alfred Script Filters].
|
@@ -246,7 +222,7 @@ to all workflows depending on what kind of item is currently selected within the
|
|
246
222
|
|
247
223
|
==== Alchemists
|
248
224
|
|
249
|
-
image:https://alchemists.io/images/projects/pennyworth/screenshots/alchemists-projects.png[Alchemists Projects,width=706,height=
|
225
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/alchemists-projects.png[Alchemists Projects,width=706,height=631,role=focal_point]
|
250
226
|
|
251
227
|
Provides quick access to link:https://alchemists.io[Alchemists] resources.
|
252
228
|
|
@@ -256,7 +232,7 @@ Provides quick access to link:https://alchemists.io[Alchemists] resources.
|
|
256
232
|
|
257
233
|
==== Dry RB
|
258
234
|
|
259
|
-
image:https://alchemists.io/images/projects/pennyworth/screenshots/dry
|
235
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/dry.png[Dry Gems,width=706,height=631,role=focal_point]
|
260
236
|
|
261
237
|
Provides quick access to link:https://dry-rb.org[Dry RB] resources.
|
262
238
|
|
@@ -341,7 +317,7 @@ Provides biographical calculations and information.
|
|
341
317
|
|
342
318
|
===== Browsers
|
343
319
|
|
344
|
-
image:https://alchemists.io/images/projects/pennyworth/screenshots/browsers.png[Browsers workflow screenshot.,width=706,height=
|
320
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/browsers.png[Browsers workflow screenshot.,width=706,height=307,role=focal_point]
|
345
321
|
|
346
322
|
Provides quick access to browser resources.
|
347
323
|
|
@@ -9,23 +9,27 @@ module Pennyworth
|
|
9
9
|
class StandardGems < Sod::Action
|
10
10
|
include Import[:kernel]
|
11
11
|
|
12
|
+
ENDPOINTS = {
|
13
|
+
"all" => "stdgems.json",
|
14
|
+
"default" => "default_gems.json",
|
15
|
+
"bundled" => "bundled_gems.json"
|
16
|
+
}.freeze
|
17
|
+
|
12
18
|
description "Render Alfred Standard Gems script filter."
|
13
19
|
|
14
20
|
on "--standard_gems", argument: "[KIND]", allow: %w[all default bundled], default: "all"
|
15
21
|
|
16
|
-
def initialize(processor: Processor.for_standard_gems, **)
|
22
|
+
def initialize(processor: Processor.for_standard_gems, endpoints: ENDPOINTS, **)
|
17
23
|
super(**)
|
18
24
|
@processor = processor
|
25
|
+
@endpoints = endpoints
|
19
26
|
end
|
20
27
|
|
21
|
-
def call
|
22
|
-
endpoint = "#{kind || default}_gems.json"
|
23
|
-
kernel.puts processor.call(endpoint).to_json
|
24
|
-
end
|
28
|
+
def call(kind = nil) = kernel.puts processor.call(endpoints.fetch(kind || default)).to_json
|
25
29
|
|
26
30
|
private
|
27
31
|
|
28
|
-
attr_reader :processor
|
32
|
+
attr_reader :processor, :endpoints
|
29
33
|
end
|
30
34
|
end
|
31
35
|
end
|
data/lib/pennyworth/cli/shell.rb
CHANGED
@@ -23,7 +23,7 @@ module Pennyworth
|
|
23
23
|
def cli
|
24
24
|
context = build_context
|
25
25
|
|
26
|
-
dsl.new :
|
26
|
+
dsl.new :pennyworth, banner: specification.banner do
|
27
27
|
on(Sod::Prefabs::Commands::Config, context:)
|
28
28
|
|
29
29
|
on "git_hub", "Render Alfred GitHub repositories script filter." do
|
@@ -9,46 +9,15 @@ module Pennyworth
|
|
9
9
|
class Client
|
10
10
|
include Import[:configuration, :http]
|
11
11
|
|
12
|
-
# Order matters.
|
13
|
-
ENDPOINTS = %w[bundled_gems.json default_gems.json].freeze
|
14
|
-
|
15
|
-
def initialize(endpoints: ENDPOINTS, **)
|
16
|
-
@endpoints = endpoints
|
17
|
-
super(**)
|
18
|
-
end
|
19
|
-
|
20
12
|
def get endpoint
|
21
|
-
if endpoints.include? endpoint then load_category endpoint
|
22
|
-
elsif endpoint == "all_gems.json" then all
|
23
|
-
else Core::EMPTY_ARRAY
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
attr_reader :endpoints
|
30
|
-
|
31
|
-
# :reek:FeatureEnvy
|
32
|
-
# :reek:DuplicateMethodCall
|
33
|
-
def all
|
34
|
-
load_all.sort_by! { |element| element[:gem] }
|
35
|
-
.uniq! { |element| element[:gem] }
|
36
|
-
.then { |collection| collection || Core::EMPTY_ARRAY }
|
37
|
-
end
|
38
|
-
|
39
|
-
def load_all
|
40
|
-
endpoints.reduce [] do |collection, endpoint|
|
41
|
-
collection.append(*load_category(endpoint))
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def load_category endpoint
|
46
13
|
http.get("#{configuration.standard_gems_api_url}/#{endpoint}")
|
47
14
|
.then do |response|
|
48
15
|
response.status.success? ? records(response.body.to_s) : Core::EMPTY_HASH
|
49
16
|
end
|
50
17
|
end
|
51
18
|
|
19
|
+
private
|
20
|
+
|
52
21
|
def records(body) = JSON(body, symbolize_names: true).fetch :gems, Core::EMPTY_ARRAY
|
53
22
|
end
|
54
23
|
end
|
@@ -21,11 +21,15 @@ module Pennyworth
|
|
21
21
|
|
22
22
|
def subtitle = record.fetch :description
|
23
23
|
|
24
|
-
|
24
|
+
# :reek:FeatureEnvy
|
25
|
+
def version
|
26
|
+
versions = record.fetch :versions, Core::EMPTY_HASH
|
27
|
+
(versions[:bundled] || versions[:default] || versions).values.first
|
28
|
+
end
|
25
29
|
|
26
|
-
def site_url = record.fetch(:sourceRepository)
|
30
|
+
def site_url = record.fetch(:sourceRepository, Core::EMPTY_STRING)
|
27
31
|
|
28
|
-
def source_url = record.fetch(:sourceRepository)
|
32
|
+
def source_url = record.fetch(:sourceRepository, Core::EMPTY_STRING)
|
29
33
|
|
30
34
|
def issues_url = "https://github.com/ruby/#{id}/issues"
|
31
35
|
|
data/pennyworth.gemspec
CHANGED
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: 15.
|
4
|
+
version: 15.2.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-
|
38
|
+
date: 2023-08-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -310,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
310
310
|
- !ruby/object:Gem::Version
|
311
311
|
version: '0'
|
312
312
|
requirements: []
|
313
|
-
rubygems_version: 3.4.
|
313
|
+
rubygems_version: 3.4.18
|
314
314
|
signing_key:
|
315
315
|
specification_version: 4
|
316
316
|
summary: A command line interface for augmenting Alfred workflows.
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
3b�_�XX!>����F���S�+a.?�H�L�.����� �y8Z�y���+Io|A����Қ�֍i�����Ʌɻ���Y��ܡ*W��8K.�H��[�p�9������(�U���4T�n��
|
2
|
+
�Uy$F�E?
|
3
|
+
|
4
|
+
��R���w��}x�E���!Q�9D�Are$%3����};�*�3x�;e��v
|
5
|
+
iE�{���4l�#C�� :�!0�w7�����2�e�'>��Y�]������ K�}� g�{ ����5�,Vy�z@���U�ă����~8��4}6���z����$�� �˩�P�,��2j� ܢ
|