pennyworth 15.1.1 → 15.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +4 -4
- data/lib/pennyworth/cli/actions/standard_gems.rb +10 -6
- 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
@@ -78,7 +78,7 @@ with others.
|
|
78
78
|
|
79
79
|
From the command line, type `pennyworth` to view usage:
|
80
80
|
|
81
|
-
image:https://alchemists.io/images/projects/pennyworth/screenshots/usage.png[Usage,width=
|
81
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/usage.png[Usage,width=668,height=499,role=focal_point]
|
82
82
|
|
83
83
|
While the command line options are nice, the real power comes from using Pennyworth in conjunction
|
84
84
|
with link:https://www.alfredapp.com/help/workflows/inputs/script-filter/json[Alfred Script Filters].
|
@@ -222,7 +222,7 @@ to all workflows depending on what kind of item is currently selected within the
|
|
222
222
|
|
223
223
|
==== Alchemists
|
224
224
|
|
225
|
-
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]
|
226
226
|
|
227
227
|
Provides quick access to link:https://alchemists.io[Alchemists] resources.
|
228
228
|
|
@@ -232,7 +232,7 @@ Provides quick access to link:https://alchemists.io[Alchemists] resources.
|
|
232
232
|
|
233
233
|
==== Dry RB
|
234
234
|
|
235
|
-
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]
|
236
236
|
|
237
237
|
Provides quick access to link:https://dry-rb.org[Dry RB] resources.
|
238
238
|
|
@@ -317,7 +317,7 @@ Provides biographical calculations and information.
|
|
317
317
|
|
318
318
|
===== Browsers
|
319
319
|
|
320
|
-
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]
|
321
321
|
|
322
322
|
Provides quick access to browser resources.
|
323
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
|
@@ -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� ܢ
|