pennyworth 15.4.1 → 16.1.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 +22 -2
- data/lib/pennyworth/cli/actions/{encodings.rb → encoding.rb} +2 -2
- data/lib/pennyworth/cli/actions/{ruby_gems.rb → gem.rb} +3 -3
- data/lib/pennyworth/cli/actions/{http_statuses.rb → http_status.rb} +2 -2
- data/lib/pennyworth/cli/actions/{standard_errors.rb → standard_error.rb} +2 -2
- data/lib/pennyworth/cli/actions/{standard_gems.rb → standard_gem.rb} +2 -2
- data/lib/pennyworth/cli/actions/system/{errors.rb → error.rb} +2 -2
- data/lib/pennyworth/cli/actions/system/{signals.rb → signal.rb} +2 -2
- data/lib/pennyworth/cli/shell.rb +7 -7
- data/lib/pennyworth/loaders/{encodings.rb → encoding.rb} +5 -5
- data/lib/pennyworth/loaders/gem.rb +21 -0
- data/lib/pennyworth/loaders/git_hub.rb +21 -0
- data/lib/pennyworth/loaders/{http_statuses.rb → http_status.rb} +2 -2
- data/lib/pennyworth/loaders/{standard_errors.rb → standard_error.rb} +3 -3
- data/lib/pennyworth/loaders/standard_gem.rb +23 -0
- data/lib/pennyworth/loaders/system/{errors.rb → error.rb} +2 -2
- data/lib/pennyworth/loaders/system/{signals.rb → signal.rb} +3 -3
- data/lib/pennyworth/loaders/text.rb +2 -2
- data/lib/pennyworth/presenters/gem.rb +3 -3
- data/lib/pennyworth/presenters/http_status.rb +2 -2
- data/lib/pennyworth/presenters/repository.rb +2 -2
- data/lib/pennyworth/presenters/standard_error.rb +2 -2
- data/lib/pennyworth/presenters/standard_gem.rb +3 -3
- data/lib/pennyworth/processor.rb +8 -10
- data/lib/pennyworth/serializers/encoding.rb +1 -1
- data/pennyworth.gemspec +11 -11
- data.tar.gz.sig +0 -0
- metadata +37 -41
- metadata.gz.sig +0 -0
- data/lib/pennyworth/integrations/git_hub/client.rb +0 -23
- data/lib/pennyworth/integrations/ruby_gems/client.rb +0 -23
- data/lib/pennyworth/integrations/standard_gems/client.rb +0 -25
- data/lib/pennyworth/loaders/projects.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08047459b77417133d9b93d7c6a4422ce9c9173b94cb8c86d0717ef8a057992a'
|
4
|
+
data.tar.gz: 614800c1e0cb29ce6dd829baf7b41fc82ebbaf7f2bc4c81db177282f9c96f516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de82df190b2b62a6abe6bab1edea47493cde4af2208d9e0c74cbe8e528bfb8d52e98293bff7393022166e193106a9d57660f7641c3f350e8bf39e5dd3d6fe35e
|
7
|
+
data.tar.gz: 7dd616c1100ed48f94d2a968f876de7fd3d40df84fc9b0b7181f666861bfbd6f9e3ef681a432f1579ca96d22819d425dd71de7c72523d4da239ee847fb7ae2cf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -34,7 +34,7 @@ video::https://alchemists.io/videos/projects/pennyworth/demo.mp4[poster=https://
|
|
34
34
|
|
35
35
|
While using a {ruby_version_managers_link} is not a hard requirement, it is strongly encouraged since a version manager will give you the freedom to toggle between different Ruby versions since this gem has strict Ruby version requirements (especially in regards to using a modern version of Ruby).
|
36
36
|
|
37
|
-
All of the workflows, scripts, examples for this gem use {bash_link} syntax. That said, if you are comfortable with translating Bash syntax to your shell syntax of choice, you can make this gem work in different shells too. That is beyond the scope of this document, though, so leave that exercise
|
37
|
+
All of the workflows, scripts, examples for this gem use {bash_link} syntax. That said, if you are comfortable with translating Bash syntax to your shell syntax of choice, you can make this gem work in different shells too. That is beyond the scope of this document, though, so leave that exercise to you.
|
38
38
|
|
39
39
|
== Setup
|
40
40
|
|
@@ -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=667,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].
|
@@ -445,6 +445,16 @@ Provides quick access to the link:https://htmx.org[HTMX] JavaScript library.
|
|
445
445
|
double click to install.
|
446
446
|
2. Click on _Configure Workflow_ to view documentation.
|
447
447
|
|
448
|
+
===== Icon
|
449
|
+
|
450
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/icon.png[Icon workflow screenshot.,width=706,height=631,role=focal_point]
|
451
|
+
|
452
|
+
Provides quick access to icon resources.
|
453
|
+
|
454
|
+
1. link:https://alchemists.io/public/alfred/workflows/icon.alfredworkflow[Download] and
|
455
|
+
double click to install.
|
456
|
+
2. Click on _Configure Workflow_ to view documentation.
|
457
|
+
|
448
458
|
===== Internet Protocol (IP)
|
449
459
|
|
450
460
|
image:https://alchemists.io/images/projects/pennyworth/screenshots/ip.png[IP workflow screenshot.,width=706,height=415,role=focal_point]
|
@@ -553,6 +563,16 @@ Provides quick access to SSL resources for the security conscious.
|
|
553
563
|
1. link:https://alchemists.io/public/alfred/workflows/ssl.alfredworkflow[Download] and double click to install.
|
554
564
|
2. Click on _Configure Workflow_ to view documentation.
|
555
565
|
|
566
|
+
===== Tana
|
567
|
+
|
568
|
+
image:https://alchemists.io/images/projects/pennyworth/screenshots/tana.png[Tana workflow screenshot.,width=706,height=631,role=focal_point]
|
569
|
+
|
570
|
+
Provides quick access to link:https://tana.inc[Tana] resources.
|
571
|
+
|
572
|
+
1. link:https://alchemists.io/public/alfred/workflows/tana.alfredworkflow[Download] and
|
573
|
+
double click to install.
|
574
|
+
2. Click on _Configure Workflow_ to view documentation.
|
575
|
+
|
556
576
|
===== Terraform
|
557
577
|
|
558
578
|
image:https://alchemists.io/images/projects/pennyworth/screenshots/terraform.png[Terraform workflow screenshot.,width=706,height=632,role=focal_point]
|
@@ -5,8 +5,8 @@ require "sod"
|
|
5
5
|
module Pennyworth
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
|
-
# Handles the
|
9
|
-
class
|
8
|
+
# Handles the encoding action.
|
9
|
+
class Encoding < Sod::Action
|
10
10
|
include Import[:kernel]
|
11
11
|
|
12
12
|
description "Render Alfred encodings script filter."
|
@@ -5,13 +5,13 @@ require "sod"
|
|
5
5
|
module Pennyworth
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
|
-
# Handles the
|
9
|
-
class
|
8
|
+
# Handles the RubyGem action.
|
9
|
+
class Gem < Sod::Action
|
10
10
|
include Import[:kernel]
|
11
11
|
|
12
12
|
description "Render Alfred RubyGems script filter."
|
13
13
|
|
14
|
-
on "--
|
14
|
+
on "--gems", argument: "[HANDLE]"
|
15
15
|
|
16
16
|
default { Container[:configuration].ruby_gems_owner }
|
17
17
|
|
@@ -5,8 +5,8 @@ require "sod"
|
|
5
5
|
module Pennyworth
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
|
-
# Handles the HTTP
|
9
|
-
class
|
8
|
+
# Handles the HTTP status action.
|
9
|
+
class HTTPStatus < Sod::Action
|
10
10
|
include Import[:kernel]
|
11
11
|
|
12
12
|
description "Render Alfred HTTP statuses script filter."
|
@@ -5,8 +5,8 @@ require "sod"
|
|
5
5
|
module Pennyworth
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
|
-
# Handles the system
|
9
|
-
class
|
8
|
+
# Handles the system error action.
|
9
|
+
class StandardError < Sod::Action
|
10
10
|
include Import[:kernel]
|
11
11
|
|
12
12
|
description "Render Alfred standard errors script filter."
|
@@ -6,8 +6,8 @@ module Pennyworth
|
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
8
|
module System
|
9
|
-
# Handles the system
|
10
|
-
class
|
9
|
+
# Handles the system error action.
|
10
|
+
class Error < Sod::Action
|
11
11
|
include Import[:kernel]
|
12
12
|
|
13
13
|
description "Render Alfred system errors script filter."
|
@@ -6,8 +6,8 @@ module Pennyworth
|
|
6
6
|
module CLI
|
7
7
|
module Actions
|
8
8
|
module System
|
9
|
-
# Handles the signal action.
|
10
|
-
class
|
9
|
+
# Handles the system signal action.
|
10
|
+
class Signal < Sod::Action
|
11
11
|
include Import[:kernel]
|
12
12
|
|
13
13
|
description "Render Alfred system signals script filter."
|
data/lib/pennyworth/cli/shell.rb
CHANGED
@@ -31,13 +31,13 @@ module Pennyworth
|
|
31
31
|
on Actions::GitHub::User
|
32
32
|
end
|
33
33
|
|
34
|
-
on Actions::
|
35
|
-
on Actions::
|
36
|
-
on Actions::
|
37
|
-
on Actions::
|
38
|
-
on Actions::
|
39
|
-
on Actions::System::
|
40
|
-
on Actions::System::
|
34
|
+
on Actions::Encoding
|
35
|
+
on Actions::HTTPStatus
|
36
|
+
on Actions::Gem
|
37
|
+
on Actions::StandardGem
|
38
|
+
on Actions::StandardError
|
39
|
+
on Actions::System::Error
|
40
|
+
on Actions::System::Signal
|
41
41
|
on Actions::Text
|
42
42
|
on(Sod::Prefabs::Actions::Version, context:)
|
43
43
|
on Sod::Prefabs::Actions::Help, self
|
@@ -1,19 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/array"
|
4
4
|
|
5
5
|
module Pennyworth
|
6
6
|
module Loaders
|
7
7
|
# Loads an array of encoding records.
|
8
|
-
class
|
9
|
-
using Refinements::
|
8
|
+
class Encoding
|
9
|
+
using Refinements::Array
|
10
10
|
|
11
|
-
def initialize encoding: Encoding, model: Models::Encoding
|
11
|
+
def initialize encoding: ::Encoding, model: Models::Encoding
|
12
12
|
@encoding = encoding
|
13
13
|
@model = model
|
14
14
|
end
|
15
15
|
|
16
|
-
def call
|
16
|
+
def call(*)
|
17
17
|
encoding.aliases
|
18
18
|
.map { |_second, first| first }
|
19
19
|
.uniq
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "core"
|
4
|
+
|
5
|
+
module Pennyworth
|
6
|
+
module Loaders
|
7
|
+
# Loads an array gems from the RubyGems API.
|
8
|
+
class Gem
|
9
|
+
include Import[:configuration, :http]
|
10
|
+
|
11
|
+
def call endpoint
|
12
|
+
http.get("#{configuration.ruby_gems_api_url}/#{endpoint}")
|
13
|
+
.then do |response|
|
14
|
+
return JSON response.body.to_s, symbolize_names: true if response.status.success?
|
15
|
+
|
16
|
+
Core::EMPTY_HASH
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "core"
|
4
|
+
require "ghub"
|
5
|
+
|
6
|
+
module Pennyworth
|
7
|
+
module Loaders
|
8
|
+
# Loads an array projects from the GitHub API.
|
9
|
+
class GitHub
|
10
|
+
def initialize endpoint: Ghub::Endpoints::Repositories::Root.new
|
11
|
+
@endpoint = endpoint
|
12
|
+
end
|
13
|
+
|
14
|
+
def call(path) = endpoint.index(*path.split("/")).value_or(Core::EMPTY_ARRAY).map(&:to_h)
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
attr_reader :endpoint
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -5,7 +5,7 @@ require "rack"
|
|
5
5
|
module Pennyworth
|
6
6
|
module Loaders
|
7
7
|
# Loads an array of HTTP status records.
|
8
|
-
class
|
8
|
+
class HTTPStatus
|
9
9
|
include Import[:configuration]
|
10
10
|
|
11
11
|
def initialize(codes: Rack::Utils::HTTP_STATUS_CODES, model: Models::HTTPStatus, **)
|
@@ -14,7 +14,7 @@ module Pennyworth
|
|
14
14
|
@model = model
|
15
15
|
end
|
16
16
|
|
17
|
-
def call
|
17
|
+
def call(*)
|
18
18
|
codes.map { |(code, label)| model[code:, label:, url: "#{url}/#{code}"] }
|
19
19
|
end
|
20
20
|
|
@@ -3,13 +3,13 @@
|
|
3
3
|
module Pennyworth
|
4
4
|
module Loaders
|
5
5
|
# Loads an array of standard error records.
|
6
|
-
class
|
7
|
-
def initialize root: StandardError, model: Models::StandardError
|
6
|
+
class StandardError
|
7
|
+
def initialize root: ::StandardError, model: Models::StandardError
|
8
8
|
@root = root
|
9
9
|
@model = model
|
10
10
|
end
|
11
11
|
|
12
|
-
def call
|
12
|
+
def call(*)
|
13
13
|
ObjectSpace.each_object(Class)
|
14
14
|
.select { |klass| klass < root }
|
15
15
|
.sort_by(&:name)
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "core"
|
4
|
+
|
5
|
+
module Pennyworth
|
6
|
+
module Loaders
|
7
|
+
# Loads an array gems from the Standard Gems API.
|
8
|
+
class StandardGem
|
9
|
+
include Import[:configuration, :http]
|
10
|
+
|
11
|
+
def call endpoint
|
12
|
+
http.get("#{configuration.standard_gems_api_url}/#{endpoint}")
|
13
|
+
.then do |response|
|
14
|
+
response.status.success? ? records(response.body.to_s) : Core::EMPTY_HASH
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def records(body) = JSON(body, symbolize_names: true).fetch :gems, Core::EMPTY_ARRAY
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -4,13 +4,13 @@ module Pennyworth
|
|
4
4
|
module Loaders
|
5
5
|
module System
|
6
6
|
# Loads an array of system error records.
|
7
|
-
class
|
7
|
+
class Error
|
8
8
|
def initialize errno: Errno, model: Models::System::Error
|
9
9
|
@errno = errno
|
10
10
|
@model = model
|
11
11
|
end
|
12
12
|
|
13
|
-
def call
|
13
|
+
def call(*)
|
14
14
|
errno.constants
|
15
15
|
.map { |name| errno.const_get name }
|
16
16
|
.uniq
|
@@ -4,13 +4,13 @@ module Pennyworth
|
|
4
4
|
module Loaders
|
5
5
|
module System
|
6
6
|
# Loads an array of signal records.
|
7
|
-
class
|
8
|
-
def initialize list: Signal.list, model: Models::System::Signal
|
7
|
+
class Signal
|
8
|
+
def initialize list: ::Signal.list, model: Models::System::Signal
|
9
9
|
@list = list
|
10
10
|
@model = model
|
11
11
|
end
|
12
12
|
|
13
|
-
def call(
|
13
|
+
def call(*) = list.map { |name, number| model[number:, name:] }
|
14
14
|
|
15
15
|
private
|
16
16
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/string"
|
4
4
|
|
5
5
|
module Pennyworth
|
6
6
|
module Loaders
|
7
7
|
# Loads an array of text records.
|
8
8
|
class Text
|
9
|
-
using Refinements::
|
9
|
+
using Refinements::String
|
10
10
|
|
11
11
|
TRANSFORMS = %w[camelcase capitalize downcase size snakecase titleize upcase].freeze
|
12
12
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/string"
|
4
4
|
|
5
5
|
module Pennyworth
|
6
6
|
module Presenters
|
7
7
|
# Renders RubyGems records into a compatible format for use in Alfred script filters.
|
8
8
|
class Gem
|
9
|
-
using Refinements::
|
10
|
-
using Refinements::
|
9
|
+
using Refinements::Array
|
10
|
+
using Refinements::String
|
11
11
|
|
12
12
|
def initialize record, inflector: Inflector.new
|
13
13
|
@record = record
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "forwardable"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/string"
|
5
5
|
|
6
6
|
module Pennyworth
|
7
7
|
module Presenters
|
@@ -9,7 +9,7 @@ module Pennyworth
|
|
9
9
|
class HTTPStatus
|
10
10
|
extend Forwardable
|
11
11
|
|
12
|
-
using Refinements::
|
12
|
+
using Refinements::String
|
13
13
|
|
14
14
|
delegate %i[code label url] => :record
|
15
15
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/string"
|
4
4
|
|
5
5
|
module Pennyworth
|
6
6
|
module Presenters
|
7
7
|
# Renders a GitHub repository record into a compatible format for use in Alfred script filters.
|
8
8
|
class Repository
|
9
|
-
using Refinements::
|
9
|
+
using Refinements::String
|
10
10
|
|
11
11
|
def initialize record, inflector: Inflector.new
|
12
12
|
@record = record
|
@@ -1,12 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "refinements/
|
3
|
+
require "refinements/array"
|
4
4
|
|
5
5
|
module Pennyworth
|
6
6
|
module Presenters
|
7
7
|
# Renders a standard error into a compatible format for use in Alfred script filters.
|
8
8
|
class StandardError
|
9
|
-
using Refinements::
|
9
|
+
using Refinements::Array
|
10
10
|
|
11
11
|
def initialize record
|
12
12
|
@record = record
|
@@ -1,14 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "core"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/string"
|
5
5
|
|
6
6
|
module Pennyworth
|
7
7
|
module Presenters
|
8
8
|
# Renders Standard Gem records into a compatible format for use in Alfred script filters.
|
9
9
|
class StandardGem
|
10
|
-
using Refinements::
|
11
|
-
using Refinements::
|
10
|
+
using Refinements::Array
|
11
|
+
using Refinements::String
|
12
12
|
|
13
13
|
def initialize record, inflector: Inflector.new
|
14
14
|
@record = record
|
data/lib/pennyworth/processor.rb
CHANGED
@@ -4,49 +4,47 @@ module Pennyworth
|
|
4
4
|
# Processes all steps required to render an Alfred Script Filter response.
|
5
5
|
class Processor
|
6
6
|
def self.for_encodings
|
7
|
-
new loader: Loaders::
|
7
|
+
new loader: Loaders::Encoding.new,
|
8
8
|
presenter: Presenters::Encoding,
|
9
9
|
serializer: Serializers::Encoding
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.for_gems
|
13
|
-
new loader: Loaders::
|
14
|
-
presenter: Presenters::Gem,
|
15
|
-
serializer: Serializers::Project
|
13
|
+
new loader: Loaders::Gem.new, presenter: Presenters::Gem, serializer: Serializers::Project
|
16
14
|
end
|
17
15
|
|
18
16
|
def self.for_http_statuses
|
19
|
-
new loader: Loaders::
|
17
|
+
new loader: Loaders::HTTPStatus.new,
|
20
18
|
presenter: Presenters::HTTPStatus,
|
21
19
|
serializer: Serializers::HTTPStatus
|
22
20
|
end
|
23
21
|
|
24
22
|
def self.for_projects
|
25
|
-
new loader: Loaders::
|
23
|
+
new loader: Loaders::GitHub.new,
|
26
24
|
presenter: Presenters::Repository,
|
27
25
|
serializer: Serializers::Project
|
28
26
|
end
|
29
27
|
|
30
28
|
def self.for_standard_gems
|
31
|
-
new loader: Loaders::
|
29
|
+
new loader: Loaders::StandardGem.new,
|
32
30
|
presenter: Presenters::StandardGem,
|
33
31
|
serializer: Serializers::Project
|
34
32
|
end
|
35
33
|
|
36
34
|
def self.for_standard_errors
|
37
|
-
new loader: Loaders::
|
35
|
+
new loader: Loaders::StandardError.new,
|
38
36
|
presenter: Presenters::StandardError,
|
39
37
|
serializer: Serializers::StandardError
|
40
38
|
end
|
41
39
|
|
42
40
|
def self.for_system_errors
|
43
|
-
new loader: Loaders::System::
|
41
|
+
new loader: Loaders::System::Error.new,
|
44
42
|
presenter: Presenters::System::Error,
|
45
43
|
serializer: Serializers::System::Error
|
46
44
|
end
|
47
45
|
|
48
46
|
def self.for_system_signals
|
49
|
-
new loader: Loaders::System::
|
47
|
+
new loader: Loaders::System::Signal.new,
|
50
48
|
presenter: Presenters::System::Signal,
|
51
49
|
serializer: Serializers::System::Signal
|
52
50
|
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 = "
|
5
|
+
spec.version = "16.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/pennyworth"
|
@@ -22,19 +22,19 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version =
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
27
|
-
spec.add_dependency "core", "~>
|
25
|
+
spec.required_ruby_version = "~> 3.3"
|
26
|
+
spec.add_dependency "cogger", "~> 0.15"
|
27
|
+
spec.add_dependency "core", "~> 1.0"
|
28
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
29
|
-
spec.add_dependency "etcher", "~> 0
|
30
|
-
spec.add_dependency "ghub", "~> 0.
|
29
|
+
spec.add_dependency "etcher", "~> 1.0"
|
30
|
+
spec.add_dependency "ghub", "~> 0.9"
|
31
31
|
spec.add_dependency "http", "~> 5.1"
|
32
|
-
spec.add_dependency "infusible", "~>
|
32
|
+
spec.add_dependency "infusible", "~> 3.0"
|
33
33
|
spec.add_dependency "rack", "~> 3.0"
|
34
|
-
spec.add_dependency "refinements", "~>
|
35
|
-
spec.add_dependency "runcom", "~>
|
36
|
-
spec.add_dependency "sod", "~> 0.
|
37
|
-
spec.add_dependency "spek", "~>
|
34
|
+
spec.add_dependency "refinements", "~> 12.0"
|
35
|
+
spec.add_dependency "runcom", "~> 11.0"
|
36
|
+
spec.add_dependency "sod", "~> 0.4"
|
37
|
+
spec.add_dependency "spek", "~> 3.0"
|
38
38
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
39
39
|
|
40
40
|
spec.bindir = "exe"
|
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:
|
4
|
+
version: 16.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:
|
38
|
+
date: 2024-02-10 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.
|
46
|
+
version: '0.15'
|
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.
|
53
|
+
version: '0.15'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: core
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: '1.0'
|
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:
|
67
|
+
version: '1.0'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: dry-container
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,28 +85,28 @@ dependencies:
|
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0
|
88
|
+
version: '1.0'
|
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: '0
|
95
|
+
version: '1.0'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: ghub
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0.
|
102
|
+
version: '0.9'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0.
|
109
|
+
version: '0.9'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: http
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '3.0'
|
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: '
|
137
|
+
version: '3.0'
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: rack
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -155,56 +155,56 @@ dependencies:
|
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
158
|
+
version: '12.0'
|
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: '
|
165
|
+
version: '12.0'
|
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: '
|
172
|
+
version: '11.0'
|
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: '
|
179
|
+
version: '11.0'
|
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.
|
186
|
+
version: '0.4'
|
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.
|
193
|
+
version: '0.4'
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
195
|
name: spek
|
196
196
|
requirement: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
198
|
- - "~>"
|
199
199
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
200
|
+
version: '3.0'
|
201
201
|
type: :runtime
|
202
202
|
prerelease: false
|
203
203
|
version_requirements: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: '
|
207
|
+
version: '3.0'
|
208
208
|
- !ruby/object:Gem::Dependency
|
209
209
|
name: zeitwerk
|
210
210
|
requirement: !ruby/object:Gem::Requirement
|
@@ -233,15 +233,15 @@ files:
|
|
233
233
|
- README.adoc
|
234
234
|
- exe/pennyworth
|
235
235
|
- lib/pennyworth.rb
|
236
|
-
- lib/pennyworth/cli/actions/
|
236
|
+
- lib/pennyworth/cli/actions/encoding.rb
|
237
|
+
- lib/pennyworth/cli/actions/gem.rb
|
237
238
|
- lib/pennyworth/cli/actions/git_hub/organization.rb
|
238
239
|
- lib/pennyworth/cli/actions/git_hub/user.rb
|
239
|
-
- lib/pennyworth/cli/actions/
|
240
|
-
- lib/pennyworth/cli/actions/
|
241
|
-
- lib/pennyworth/cli/actions/
|
242
|
-
- lib/pennyworth/cli/actions/
|
243
|
-
- lib/pennyworth/cli/actions/system/
|
244
|
-
- lib/pennyworth/cli/actions/system/signals.rb
|
240
|
+
- lib/pennyworth/cli/actions/http_status.rb
|
241
|
+
- lib/pennyworth/cli/actions/standard_error.rb
|
242
|
+
- lib/pennyworth/cli/actions/standard_gem.rb
|
243
|
+
- lib/pennyworth/cli/actions/system/error.rb
|
244
|
+
- lib/pennyworth/cli/actions/system/signal.rb
|
245
245
|
- lib/pennyworth/cli/actions/text.rb
|
246
246
|
- lib/pennyworth/cli/shell.rb
|
247
247
|
- lib/pennyworth/configuration/contract.rb
|
@@ -250,15 +250,14 @@ files:
|
|
250
250
|
- lib/pennyworth/container.rb
|
251
251
|
- lib/pennyworth/import.rb
|
252
252
|
- lib/pennyworth/inflector.rb
|
253
|
-
- lib/pennyworth/
|
254
|
-
- lib/pennyworth/
|
255
|
-
- lib/pennyworth/
|
256
|
-
- lib/pennyworth/loaders/
|
257
|
-
- lib/pennyworth/loaders/
|
258
|
-
- lib/pennyworth/loaders/
|
259
|
-
- lib/pennyworth/loaders/
|
260
|
-
- lib/pennyworth/loaders/system/
|
261
|
-
- lib/pennyworth/loaders/system/signals.rb
|
253
|
+
- lib/pennyworth/loaders/encoding.rb
|
254
|
+
- lib/pennyworth/loaders/gem.rb
|
255
|
+
- lib/pennyworth/loaders/git_hub.rb
|
256
|
+
- lib/pennyworth/loaders/http_status.rb
|
257
|
+
- lib/pennyworth/loaders/standard_error.rb
|
258
|
+
- lib/pennyworth/loaders/standard_gem.rb
|
259
|
+
- lib/pennyworth/loaders/system/error.rb
|
260
|
+
- lib/pennyworth/loaders/system/signal.rb
|
262
261
|
- lib/pennyworth/loaders/text.rb
|
263
262
|
- lib/pennyworth/models/encoding.rb
|
264
263
|
- lib/pennyworth/models/http_status.rb
|
@@ -301,10 +300,7 @@ require_paths:
|
|
301
300
|
- lib
|
302
301
|
required_ruby_version: !ruby/object:Gem::Requirement
|
303
302
|
requirements:
|
304
|
-
- - "
|
305
|
-
- !ruby/object:Gem::Version
|
306
|
-
version: '3.2'
|
307
|
-
- - "<="
|
303
|
+
- - "~>"
|
308
304
|
- !ruby/object:Gem::Version
|
309
305
|
version: '3.3'
|
310
306
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -313,7 +309,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
313
309
|
- !ruby/object:Gem::Version
|
314
310
|
version: '0'
|
315
311
|
requirements: []
|
316
|
-
rubygems_version: 3.
|
312
|
+
rubygems_version: 3.5.6
|
317
313
|
signing_key:
|
318
314
|
specification_version: 4
|
319
315
|
summary: A command line interface for augmenting Alfred workflows.
|
metadata.gz.sig
CHANGED
Binary file
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "core"
|
4
|
-
require "ghub"
|
5
|
-
|
6
|
-
module Pennyworth
|
7
|
-
module Integrations
|
8
|
-
module GitHub
|
9
|
-
# Provides low-level access to the GitHub API.
|
10
|
-
class Client
|
11
|
-
def initialize endpoint: Ghub::Endpoints::Repositories::Root.new
|
12
|
-
@endpoint = endpoint
|
13
|
-
end
|
14
|
-
|
15
|
-
def get(path) = endpoint.index(*path.split("/")).value_or(Core::EMPTY_ARRAY).map(&:to_h)
|
16
|
-
|
17
|
-
private
|
18
|
-
|
19
|
-
attr_reader :endpoint
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "core"
|
4
|
-
|
5
|
-
module Pennyworth
|
6
|
-
module Integrations
|
7
|
-
module RubyGems
|
8
|
-
# Provides low-level API access to the RubyGems API.
|
9
|
-
class Client
|
10
|
-
include Import[:configuration, :http]
|
11
|
-
|
12
|
-
def get endpoint
|
13
|
-
http.get("#{configuration.ruby_gems_api_url}/#{endpoint}")
|
14
|
-
.then do |response|
|
15
|
-
return JSON response.body.to_s, symbolize_names: true if response.status.success?
|
16
|
-
|
17
|
-
Core::EMPTY_HASH
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "core"
|
4
|
-
|
5
|
-
module Pennyworth
|
6
|
-
module Integrations
|
7
|
-
module StandardGems
|
8
|
-
# Provides low-level API access to the Standard Gems API.
|
9
|
-
class Client
|
10
|
-
include Import[:configuration, :http]
|
11
|
-
|
12
|
-
def get endpoint
|
13
|
-
http.get("#{configuration.standard_gems_api_url}/#{endpoint}")
|
14
|
-
.then do |response|
|
15
|
-
response.status.success? ? records(response.body.to_s) : Core::EMPTY_HASH
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def records(body) = JSON(body, symbolize_names: true).fetch :gems, Core::EMPTY_ARRAY
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Pennyworth
|
4
|
-
module Loaders
|
5
|
-
# Loads projects from API requests for further processing.
|
6
|
-
class Projects
|
7
|
-
def self.for_git_hub = new(client: Integrations::GitHub::Client.new)
|
8
|
-
|
9
|
-
def self.for_ruby_gems = new(client: Integrations::RubyGems::Client.new)
|
10
|
-
|
11
|
-
def self.for_standard_gems = new(client: Integrations::StandardGems::Client.new)
|
12
|
-
|
13
|
-
def initialize client:
|
14
|
-
@client = client
|
15
|
-
end
|
16
|
-
|
17
|
-
def call(endpoint) = client.get(endpoint)
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
attr_reader :client
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|