pennyworth 14.2.1 → 15.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +42 -85
  4. data/lib/pennyworth/cli/actions/encodings.rb +9 -3
  5. data/lib/pennyworth/cli/actions/git_hub/organization.rb +33 -0
  6. data/lib/pennyworth/cli/actions/git_hub/user.rb +31 -0
  7. data/lib/pennyworth/cli/actions/http_statuses.rb +9 -3
  8. data/lib/pennyworth/cli/actions/ruby_gems.rb +11 -6
  9. data/lib/pennyworth/cli/actions/standard_errors.rb +9 -3
  10. data/lib/pennyworth/cli/actions/system/errors.rb +9 -3
  11. data/lib/pennyworth/cli/actions/system/signals.rb +9 -3
  12. data/lib/pennyworth/cli/actions/text.rb +9 -3
  13. data/lib/pennyworth/cli/shell.rb +33 -40
  14. data/lib/pennyworth/configuration/contract.rb +20 -0
  15. data/lib/pennyworth/configuration/defaults.yml +8 -38
  16. data/lib/pennyworth/configuration/{content.rb → model.rb} +3 -15
  17. data/lib/pennyworth/container.rb +15 -3
  18. data/lib/pennyworth/inflector.rb +1 -1
  19. data/lib/pennyworth/models/http_status.rb +0 -1
  20. data/lib/pennyworth/models/standard_error.rb +0 -1
  21. data/pennyworth.gemspec +10 -9
  22. data.tar.gz.sig +0 -0
  23. metadata +39 -31
  24. metadata.gz.sig +0 -0
  25. data/lib/pennyworth/cli/actions/config.rb +0 -33
  26. data/lib/pennyworth/cli/actions/container.rb +0 -26
  27. data/lib/pennyworth/cli/actions/git_hub.rb +0 -27
  28. data/lib/pennyworth/cli/actions/import.rb +0 -11
  29. data/lib/pennyworth/cli/parser.rb +0 -34
  30. data/lib/pennyworth/cli/parsers/core.rb +0 -110
  31. data/lib/pennyworth/cli/parsers/git_hub.rb +0 -53
  32. data/lib/pennyworth/cli/parsers/ruby_gems.rb +0 -38
  33. data/lib/pennyworth/configuration/loader.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4ad975113036f7190110342ba57762ac8d5b8074352128e741166e6d5d2d965d
4
- data.tar.gz: 178a7dea64fc0e9c26dfdb19eb236ec71bc95c9486e9cdfdcc2b6adab87b6d88
3
+ metadata.gz: b840f925f9e01b769b2e9a157856d29bc2ca4b286117a7f91ddfb13167161782
4
+ data.tar.gz: 2c8bb041add320dfb7ab0518ea9b990b9bcca7617326deaf0efe61577beb291e
5
5
  SHA512:
6
- metadata.gz: bc9e845281ee478829b352c59a58861a040d5b2afc1a01932682bdf6afeb6f05ca7304872f09c6abae00e162f61eb60ffa14c549c0b96fe22bf1f2d3526afabe
7
- data.tar.gz: 2f686c128f9b3b35d1e132ea56b09b1a803543edd37c8a29fc5084e5879ad34f2f3b3186fefcdd73845b64024d7834b7f389aec26b03f425ebadd4326dfb735c
6
+ metadata.gz: 74cf171bfb42d77023abb9f4ecd96163db6c4fa2a0cbfca754ea35852ccfacb760475d5fb6a357729f4490060e3b42f6598ac2011e7c08ea45159bfaae0634f0
7
+ data.tar.gz: 315ca46e22acd1e8e175301fd325eebfd812b1e92e23c9ada51eed108bbf70af939e590ed7348433c3423916b1ea9e2169f21ee2d9c34de2c39fdc7de5f27c12
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -38,7 +38,16 @@ All of the workflows, scripts, examples for this gem use {bash_link} syntax. Tha
38
38
 
39
39
  == Setup
40
40
 
41
- To install, run:
41
+ To install _with_ security, run:
42
+
43
+ [source,bash]
44
+ ----
45
+ # 💡 Skip this line if you already have the public certificate installed.
46
+ gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
47
+ gem install pennyworth --trust-policy HighSecurity
48
+ ----
49
+
50
+ To install _without_ security, run:
42
51
 
43
52
  [source,bash]
44
53
  ----
@@ -70,51 +79,27 @@ with others.
70
79
  From the command line, type `pennyworth` to view usage:
71
80
 
72
81
  ....
73
- Pennyworth - A command line interface that augments Alfred workflows.
74
-
75
- USAGE:
76
- -c, --config ACTION Manage gem configuration. Actions: edit || view.
77
- --encodings Render Alfred encodings script filter.
78
- --git_hub Render Alfred GitHub repositories script filter.
79
- -h, --help Show this message.
80
- --http_statuses Render Alfred HTTP statuses script filter.
81
- --ruby_gems Render Alfred RubyGems script filter.
82
- --standard_errors Render Alfred standard errors script filter.
83
- --system_errors Render Alfred system errors script filter.
84
- --system_signals Render Alfred system signals script filter.
85
- --text CONTENT Render Alfred text script filter.
86
- -v, --version Show gem version.
87
-
88
- GITHUB OPTIONS:
89
- --organization [HANDLE] Set organization. Default: "".
90
- --user [HANDLE] Set user. Default: "".
91
-
92
- RUBYGEMS OPTIONS:
93
- --owner [HANDLE] Set owner. Default: "".
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
+ --standard_errors Render Alfred standard errors script filter.
91
+ --system_errors Render Alfred system errors script filter.
92
+ --system_signals Render Alfred system signals script filter.
93
+ --text CONTENT Render Alfred text script filter.
94
+ -v, --version Show version.
95
+ -h, --help [COMMAND] Show this message.
96
+
97
+ COMMANDS
98
+ config Manage configuration.
99
+ Path is dynamic per current directory.
100
+ git_hub Render Alfred GitHub repositories script filter.
94
101
  ....
95
102
 
96
- The following demonstrates how to use Pennyworth from the CLI or within an Alfred Script Filter:
97
-
98
- [source,bash]
99
- ----
100
- pennyworth --config edit
101
- pennyworth --config view
102
-
103
- pennyworth --encodings
104
-
105
- pennyworth --git_hub --organization alchemists
106
- pennyworth --git_hub --user bkuhlmann
107
-
108
- pennyworth --http_statuses
109
- pennyworth --ruby_gems --owner bkuhlmann
110
- pennyworth --standard_errors
111
- pennyworth --system_errors
112
- pennyworth --system_signals
113
-
114
- pennyworth --text demo
115
- pennyworth --text "An Example"
116
- ----
117
-
118
103
  While the command line options are nice, the real power comes from using Pennyworth in conjunction
119
104
  with link:https://www.alfredapp.com/help/workflows/inputs/script-filter/json[Alfred Script Filters].
120
105
  Without having Alfred wired up to consume the CLI output, you'll only get a JSON in your console. To
@@ -135,14 +120,12 @@ The default configuration is as follows:
135
120
 
136
121
  [source,yaml]
137
122
  ----
138
- :alfred:
139
- :preferences:
140
- :inflections:
123
+ alfred:
124
+ preferences:
125
+ inflections:
141
126
  - "Bkuhlmann": "bkuhlmann"
142
127
  - "Dry Auto Inject": "Dry AutoInject"
143
128
  - "Dry Cli": "Dry CLI"
144
- - "Flacsmith": "FLACsmith"
145
- - "Git Plus": "Git+"
146
129
  - "Http Fake": "HTTP Fake"
147
130
  - "Mac Os Config": "macOS Configuration"
148
131
  - "Mac Os": "MacOS"
@@ -151,40 +134,17 @@ The default configuration is as follows:
151
134
  - "Rubocop Ast": "Rubocop AST"
152
135
  - "Rubocop Md": "Rubocop Markdown"
153
136
  - "Rubocop Rspec": "Rubocop RSpec"
154
- - "Tty Box": "TTY Box"
155
- - "Tty Color": "TTY Color"
156
- - "Tty Command": "TTY Command"
157
- - "Tty Config": "TTY Config"
158
- - "Tty Cursor": "TTY Cursor"
159
- - "Tty Editor": "TTY Editor"
160
- - "Tty File": "TTY File"
161
- - "Tty Font": "TTY Font"
162
- - "Tty Link": "TTY Link"
163
- - "Tty Logger": "TTY Logger"
164
- - "Tty Markdown": "TTY Markdown"
165
- - "Tty Option": "TTY Option"
166
- - "Tty Pager": "TTY Pager"
167
- - "Tty Pie": "TTY Pie"
168
- - "Tty Platform": "TTY Platform"
169
- - "Tty Progressbar": "TTY ProgressBar"
170
- - "Tty Prompt": "TTY Prompt"
171
- - "Tty Reader": "TTY Reader"
172
- - "Tty Screen": "TTY Screen"
173
- - "Tty Spinner": "TTY Spinner"
174
- - "Tty Table": "TTY Table"
175
- - "Tty Tree": "TTY Tree"
176
- - "Tty Which": "TTY Which"
177
137
  - "Xdg": "XDG"
178
- :git_hub:
179
- :api_url: "https://api.github.com"
180
- :organization:
181
- :user:
182
- :http:
183
- :statuses:
184
- :url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
185
- :ruby_gems:
186
- :api_url: "https://rubygems.org/api/v1"
187
- :owner:
138
+ git_hub:
139
+ api_url: "https://api.github.com"
140
+ organization:
141
+ user:
142
+ http:
143
+ statuses:
144
+ url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
145
+ ruby_gems:
146
+ api_url: "https://rubygems.org/api/v1"
147
+ owner:
188
148
  ----
189
149
 
190
150
  Feel free to take this default configuration, modify, and save as your own custom
@@ -579,9 +539,6 @@ Provides general text manipulation utilities beyond the Pennyworth powered _text
579
539
 
580
540
  === Troubleshooting
581
541
 
582
- * link:https://github.com/ruby/psych[Psych] 4.0.0 has a
583
- link:https://github.com/ruby/psych/issues/490[bug] which prevents loading of YAML configurations
584
- that use symbols as keys. If you get caught by this, please upgrade to Psych 4.0.1 for the fix.
585
542
  * When your Alfred Workflow yields no output, you might want to open the
586
543
  link:https://www.alfredapp.com/help/workflows/utilities/debug[Alfred Debugger], rerun your
587
544
  workflow, and check for errors. You can also jump to the CLI and run Pennyworth directly.
@@ -1,18 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  # Handles the encodings action.
7
- class Encodings
8
- include Pennyworth::Import[:logger]
9
+ class Encodings < Sod::Action
10
+ include Import[:kernel]
11
+
12
+ description "Render Alfred encodings script filter."
13
+
14
+ on "--encodings"
9
15
 
10
16
  def initialize(processor: Processor.for_encodings, **)
11
17
  super(**)
12
18
  @processor = processor
13
19
  end
14
20
 
15
- def call = processor.call.to_json.then { |json| logger.info { json } }
21
+ def call(*) = kernel.puts processor.call.to_json
16
22
 
17
23
  private
18
24
 
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Pennyworth
6
+ module CLI
7
+ module Actions
8
+ module GitHub
9
+ # Handles the GitHub user action.
10
+ class Organization < Sod::Action
11
+ include Import[:kernel]
12
+
13
+ description "Specify organization."
14
+
15
+ on %w[-o --organization],
16
+ argument: "[HANDLE]",
17
+ default: Container[:configuration].git_hub_organization
18
+
19
+ def initialize(processor: Processor.for_projects, **)
20
+ super(**)
21
+ @processor = processor
22
+ end
23
+
24
+ def call(handle = default) = kernel.puts processor.call("orgs/#{handle}").to_json
25
+
26
+ private
27
+
28
+ attr_reader :processor
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Pennyworth
6
+ module CLI
7
+ module Actions
8
+ module GitHub
9
+ # Handles the GitHub user action.
10
+ class User < Sod::Action
11
+ include Import[:kernel]
12
+
13
+ description "Specify user."
14
+
15
+ on %w[-u --user], argument: "[HANDLE]", default: Container[:configuration].git_hub_user
16
+
17
+ def initialize(processor: Processor.for_projects, **)
18
+ super(**)
19
+ @processor = processor
20
+ end
21
+
22
+ def call(handle = default) = kernel.puts processor.call("users/#{handle}").to_json
23
+
24
+ private
25
+
26
+ attr_reader :processor
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,18 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  # Handles the HTTP statuses action.
7
- class HTTPStatuses
8
- include Pennyworth::Import[:logger]
9
+ class HTTPStatuses < Sod::Action
10
+ include Import[:kernel]
11
+
12
+ description "Render Alfred HTTP statuses script filter."
13
+
14
+ on "--http_statuses"
9
15
 
10
16
  def initialize(processor: Processor.for_http_statuses, **)
11
17
  super(**)
12
18
  @processor = processor
13
19
  end
14
20
 
15
- def call = processor.call.to_json.then { |json| logger.info { json } }
21
+ def call(*) = kernel.puts processor.call.to_json
16
22
 
17
23
  private
18
24
 
@@ -1,21 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  # Handles the RubyGems action.
7
- class RubyGems
8
- include Pennyworth::Import[:logger]
9
+ class RubyGems < Sod::Action
10
+ include Import[:kernel]
11
+
12
+ description "Render Alfred RubyGems script filter."
13
+
14
+ on "--ruby_gems", argument: "[HANDLE]", default: Container[:configuration].ruby_gems_owner
9
15
 
10
16
  def initialize(processor: Processor.for_gems, **)
11
17
  super(**)
12
18
  @processor = processor
13
19
  end
14
20
 
15
- def call endpoint
16
- processor.call(endpoint)
17
- .to_json
18
- .then { |json| logger.info { json } }
21
+ def call handle = default
22
+ endpoint = "owners/#{handle}/gems.json"
23
+ kernel.puts processor.call(endpoint).to_json
19
24
  end
20
25
 
21
26
  private
@@ -1,18 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  # Handles the system errors action.
7
- class StandardErrors
8
- include Pennyworth::Import[:logger]
9
+ class StandardErrors < Sod::Action
10
+ include Import[:kernel]
11
+
12
+ description "Render Alfred standard errors script filter."
13
+
14
+ on "--standard_errors"
9
15
 
10
16
  def initialize(processor: Processor.for_standard_errors, **)
11
17
  super(**)
12
18
  @processor = processor
13
19
  end
14
20
 
15
- def call = processor.call.to_json.then { |json| logger.info { json } }
21
+ def call(*) = kernel.puts processor.call.to_json
16
22
 
17
23
  private
18
24
 
@@ -1,19 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  module System
7
9
  # Handles the system errors action.
8
- class Errors
9
- include Pennyworth::Import[:logger]
10
+ class Errors < Sod::Action
11
+ include Import[:kernel]
12
+
13
+ description "Render Alfred system errors script filter."
14
+
15
+ on "--system_errors"
10
16
 
11
17
  def initialize(processor: Processor.for_system_errors, **)
12
18
  super(**)
13
19
  @processor = processor
14
20
  end
15
21
 
16
- def call = processor.call.to_json.then { |json| logger.info { json } }
22
+ def call(*) = kernel.puts processor.call.to_json
17
23
 
18
24
  private
19
25
 
@@ -1,19 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  module System
7
9
  # Handles the signal action.
8
- class Signals
9
- include Pennyworth::Import[:logger]
10
+ class Signals < Sod::Action
11
+ include Import[:kernel]
12
+
13
+ description "Render Alfred system signals script filter."
14
+
15
+ on "--system_signals"
10
16
 
11
17
  def initialize(processor: Processor.for_system_signals, **)
12
18
  super(**)
13
19
  @processor = processor
14
20
  end
15
21
 
16
- def call = processor.call.to_json.then { |json| logger.info { json } }
22
+ def call(*) = kernel.puts processor.call.to_json
17
23
 
18
24
  private
19
25
 
@@ -1,18 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "sod"
4
+
3
5
  module Pennyworth
4
6
  module CLI
5
7
  module Actions
6
8
  # Handles the text action.
7
- class Text
8
- include Pennyworth::Import[:logger]
9
+ class Text < Sod::Action
10
+ include Import[:kernel]
11
+
12
+ description "Render Alfred text script filter."
13
+
14
+ on "--text", argument: "CONTENT"
9
15
 
10
16
  def initialize(processor: Processor.for_text, **)
11
17
  super(**)
12
18
  @processor = processor
13
19
  end
14
20
 
15
- def call(content) = processor.call(content).to_json.then { |json| logger.info { json } }
21
+ def call(content) = kernel.puts processor.call(content).to_json
16
22
 
17
23
  private
18
24
 
@@ -1,58 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "core"
3
+ require "sod"
4
4
 
5
5
  module Pennyworth
6
6
  module CLI
7
7
  # The main Command Line Interface (CLI) object.
8
8
  class Shell
9
- include Actions::Import[
10
- :config,
11
- :encodings,
12
- :git_hub,
13
- :http_statuses,
14
- :ruby_gems,
15
- :standard_errors,
16
- :system_errors,
17
- :system_signals,
18
- :text,
19
- :specification,
20
- :logger
21
- ]
22
-
23
- def initialize(parser: Parser.new, **)
9
+ include Import[:defaults_path, :xdg_config, :specification]
10
+
11
+ def initialize(context: Sod::Context, dsl: Sod, **)
24
12
  super(**)
25
- @parser = parser
13
+ @context = context
14
+ @dsl = dsl
26
15
  end
27
16
 
28
- def call arguments = Core::EMPTY_ARRAY
29
- act_on parser.call(arguments)
30
- rescue OptionParser::ParseError, KeyError => error
31
- logger.error { error.message }
32
- end
17
+ def call(...) = cli.call(...)
33
18
 
34
19
  private
35
20
 
36
- attr_reader :parser
37
-
38
- def act_on configuration
39
- case configuration
40
- in action_config: Symbol => action then config.call action
41
- in action_encodings: true then encodings.call
42
- in action_git_hub: :organization
43
- git_hub.call "orgs/#{configuration.git_hub_organization}"
44
- in action_git_hub: :user then git_hub.call "users/#{configuration.git_hub_user}"
45
- in action_http_statuses: true then http_statuses.call
46
- in action_ruby_gems: true
47
- ruby_gems.call "owners/#{configuration.ruby_gems_owner}/gems.json"
48
- in action_standard_errors: true then standard_errors.call
49
- in action_system_errors: true then system_errors.call
50
- in action_system_signals: true then system_signals.call
51
- in action_text: String => content then text.call content
52
- in action_version: true then logger.info { specification.labeled_version }
53
- else logger.any { parser.to_s }
21
+ attr_reader :context, :dsl
22
+
23
+ def cli
24
+ context = build_context
25
+
26
+ dsl.new :sublime_text_kit, banner: specification.banner do
27
+ on(Sod::Prefabs::Commands::Config, context:)
28
+
29
+ on "git_hub", "Render Alfred GitHub repositories script filter." do
30
+ on Actions::GitHub::Organization
31
+ on Actions::GitHub::User
32
+ end
33
+
34
+ on Actions::Encodings
35
+ on Actions::HTTPStatuses
36
+ on Actions::RubyGems
37
+ on Actions::StandardErrors
38
+ on Actions::System::Errors
39
+ on Actions::System::Signals
40
+ on Actions::Text
41
+ on(Sod::Prefabs::Actions::Version, context:)
42
+ on Sod::Prefabs::Actions::Help, self
54
43
  end
55
44
  end
45
+
46
+ def build_context
47
+ context[defaults_path:, xdg_config:, version_label: specification.labeled_version]
48
+ end
56
49
  end
57
50
  end
58
51
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dry/schema"
4
+
5
+ Dry::Schema.load_extensions :monads
6
+
7
+ module Pennyworth
8
+ module Configuration
9
+ Contract = Dry::Schema.Params do
10
+ optional(:alfred_preferences).filled :string
11
+ required(:inflections).array :hash
12
+ required(:git_hub_api_url).filled :string
13
+ optional(:git_hub_organization).filled :string
14
+ optional(:git_hub_user).filled :string
15
+ required(:http_statuses_url).filled :string
16
+ required(:ruby_gems_api_url).filled :string
17
+ optional(:ruby_gems_owner).filled :string
18
+ end
19
+ end
20
+ end
@@ -1,11 +1,7 @@
1
- :alfred:
2
- :preferences:
3
- :inflections:
1
+ inflections:
4
2
  - "Bkuhlmann": "bkuhlmann"
5
3
  - "Dry Auto Inject": "Dry AutoInject"
6
4
  - "Dry Cli": "Dry CLI"
7
- - "Flacsmith": "FLACsmith"
8
- - "Git Plus": "Git+"
9
5
  - "Http Fake": "HTTP Fake"
10
6
  - "Mac Os Config": "macOS Configuration"
11
7
  - "Mac Os": "MacOS"
@@ -14,37 +10,11 @@
14
10
  - "Rubocop Ast": "Rubocop AST"
15
11
  - "Rubocop Md": "Rubocop Markdown"
16
12
  - "Rubocop Rspec": "Rubocop RSpec"
17
- - "Tty Box": "TTY Box"
18
- - "Tty Color": "TTY Color"
19
- - "Tty Command": "TTY Command"
20
- - "Tty Config": "TTY Config"
21
- - "Tty Cursor": "TTY Cursor"
22
- - "Tty Editor": "TTY Editor"
23
- - "Tty File": "TTY File"
24
- - "Tty Font": "TTY Font"
25
- - "Tty Link": "TTY Link"
26
- - "Tty Logger": "TTY Logger"
27
- - "Tty Markdown": "TTY Markdown"
28
- - "Tty Option": "TTY Option"
29
- - "Tty Pager": "TTY Pager"
30
- - "Tty Pie": "TTY Pie"
31
- - "Tty Platform": "TTY Platform"
32
- - "Tty Progressbar": "TTY ProgressBar"
33
- - "Tty Prompt": "TTY Prompt"
34
- - "Tty Reader": "TTY Reader"
35
- - "Tty Screen": "TTY Screen"
36
- - "Tty Spinner": "TTY Spinner"
37
- - "Tty Table": "TTY Table"
38
- - "Tty Tree": "TTY Tree"
39
- - "Tty Which": "TTY Which"
40
13
  - "Xdg": "XDG"
41
- :git_hub:
42
- :api_url: "https://api.github.com"
43
- :organization:
44
- :user:
45
- :http:
46
- :statuses:
47
- :url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
48
- :ruby_gems:
49
- :api_url: "https://rubygems.org/api/v1"
50
- :owner:
14
+ git_hub:
15
+ api_url: "https://api.github.com"
16
+ http:
17
+ statuses:
18
+ url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
19
+ ruby_gems:
20
+ api_url: "https://rubygems.org/api/v1"
@@ -3,18 +3,7 @@
3
3
  module Pennyworth
4
4
  module Configuration
5
5
  # Defines configuration content as the primary source of truth for use throughout the gem.
6
- Content = Struct.new(
7
- :action_encodings,
8
- :action_git_hub,
9
- :action_http_statuses,
10
- :action_ruby_gems,
11
- :action_standard_errors,
12
- :action_system_errors,
13
- :action_system_signals,
14
- :action_text,
15
- :action_config,
16
- :action_version,
17
- :action_help,
6
+ Model = Struct.new(
18
7
  :alfred_preferences,
19
8
  :inflections,
20
9
  :git_hub_api_url,
@@ -22,10 +11,9 @@ module Pennyworth
22
11
  :git_hub_user,
23
12
  :http_statuses_url,
24
13
  :ruby_gems_api_url,
25
- :ruby_gems_owner,
26
- keyword_init: true
14
+ :ruby_gems_owner
27
15
  ) do
28
- def initialize *arguments
16
+ def initialize(**)
29
17
  super
30
18
  freeze
31
19
  end