pennyworth 10.0.1 → 11.1.1

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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/README.adoc +352 -31
  5. data/bin/pennyworth +1 -3
  6. data/lib/pennyworth.rb +11 -2
  7. data/lib/pennyworth/cli/actions/config.rb +35 -0
  8. data/lib/pennyworth/cli/actions/encodings.rb +23 -0
  9. data/lib/pennyworth/cli/actions/git_hub.rb +27 -0
  10. data/lib/pennyworth/cli/actions/http_statuses.rb +23 -0
  11. data/lib/pennyworth/cli/actions/ruby_gems.rb +27 -0
  12. data/lib/pennyworth/cli/actions/system/errors.rb +25 -0
  13. data/lib/pennyworth/cli/actions/system/signals.rb +25 -0
  14. data/lib/pennyworth/cli/actions/text.rb +23 -0
  15. data/lib/pennyworth/cli/configuration/content.rb +28 -0
  16. data/lib/pennyworth/cli/configuration/defaults.yml +25 -0
  17. data/lib/pennyworth/cli/configuration/loader.rb +37 -0
  18. data/lib/pennyworth/cli/parsers.rb +11 -0
  19. data/lib/pennyworth/cli/parsers/assembler.rb +32 -0
  20. data/lib/pennyworth/cli/parsers/core.rb +100 -0
  21. data/lib/pennyworth/cli/parsers/git_hub.rb +51 -0
  22. data/lib/pennyworth/cli/parsers/ruby_gems.rb +35 -0
  23. data/lib/pennyworth/cli/shell.rb +81 -0
  24. data/lib/pennyworth/container.rb +40 -0
  25. data/lib/pennyworth/identity.rb +2 -1
  26. data/lib/pennyworth/inflector.rb +18 -0
  27. data/lib/pennyworth/integrations/git_hub/client.rb +59 -0
  28. data/lib/pennyworth/integrations/git_hub/response.rb +33 -0
  29. data/lib/pennyworth/integrations/ruby_gems/client.rb +29 -0
  30. data/lib/pennyworth/loaders/encodings.rb +31 -0
  31. data/lib/pennyworth/loaders/http_statuses.rb +28 -0
  32. data/lib/pennyworth/loaders/projects.rb +22 -0
  33. data/lib/pennyworth/loaders/system/errors.rb +33 -0
  34. data/lib/pennyworth/loaders/system/signals.rb +21 -0
  35. data/lib/pennyworth/loaders/text.rb +27 -0
  36. data/lib/pennyworth/models/encoding.rb +8 -0
  37. data/lib/pennyworth/models/http_status.rb +8 -0
  38. data/lib/pennyworth/models/system/error.rb +10 -0
  39. data/lib/pennyworth/models/system/signal.rb +10 -0
  40. data/lib/pennyworth/models/text.rb +8 -0
  41. data/lib/pennyworth/presenters/encoding.rb +22 -0
  42. data/lib/pennyworth/presenters/gem.rb +48 -0
  43. data/lib/pennyworth/presenters/http_status.rb +41 -0
  44. data/lib/pennyworth/presenters/repository.rb +35 -0
  45. data/lib/pennyworth/presenters/system/error.rb +28 -0
  46. data/lib/pennyworth/presenters/system/signal.rb +22 -0
  47. data/lib/pennyworth/presenters/text.rb +25 -0
  48. data/lib/pennyworth/processor.rb +68 -0
  49. data/lib/pennyworth/serializers/encoding.rb +33 -0
  50. data/lib/pennyworth/serializers/http_status.rb +41 -0
  51. data/lib/pennyworth/serializers/project.rb +52 -0
  52. data/lib/pennyworth/serializers/system/error.rb +46 -0
  53. data/lib/pennyworth/serializers/system/signal.rb +40 -0
  54. data/lib/pennyworth/serializers/text.rb +31 -0
  55. metadata +110 -19
  56. metadata.gz.sig +0 -0
  57. data/lib/pennyworth/cli.rb +0 -140
  58. data/lib/pennyworth/templates/workflows/user.workflow.B59B22A2-1880-4765-9358-412791BE9202/icon.png +0 -0
  59. data/lib/pennyworth/templates/workflows/user.workflow.B59B22A2-1880-4765-9358-412791BE9202/info.plist +0 -159
  60. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/icon.png +0 -0
  61. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/info.plist +0 -272
  62. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-camelcase.png +0 -0
  63. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-capitalize.png +0 -0
  64. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-lowercase.png +0 -0
  65. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-size.png +0 -0
  66. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-snakecase.png +0 -0
  67. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-titleize.png +0 -0
  68. data/lib/pennyworth/templates/workflows/user.workflow.C431E56A-0EC2-47EE-94D5-D67D9FE323BE/string-uppercase.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15ea95d43142092bd39219110734448c8195e9c19e44741e20a859574b1176af
4
- data.tar.gz: 31128461200bdf505cfa3233c33c9dc8c5f2db9628668fb3beae1d882173f155
3
+ metadata.gz: f1574b8827a7bb980b015f437660f41afde18a6ba2bb2fd77d753a12507ac5d5
4
+ data.tar.gz: 4555faaf0aa2690c1933543646742485d75176e458effc3d59fa26f2cbdf7e3a
5
5
  SHA512:
6
- metadata.gz: 05554404a9de561023d12d93dae5c61a6b9b305766f25e3a091130e0a6171ef96a5ead3cfe7a9935b826bb992cf6755eaa5ece2eb55bf07f13896224b5783338
7
- data.tar.gz: 7b701ad8c5f34f7c0203b79ae889567bb80b38c1809023f5a8311d55db0631705162570e7e9c5110af0fb4703893fab526f720117e25af422961c095b8eb4ab7
6
+ metadata.gz: 8183d56017c6c60d79ca305c5ba34bc9046aae3ea104736fe4d6c64b6261c65a5b116eb6e6447f461446cc96acd2d5b8104f3479e0b8606afba36607bd6046fb
7
+ data.tar.gz: a422eb1ec32f66864aa55316a1952995086d1d6e74aaaabaf53e93f1821e0a0006dd0bbf29643846cc9dcea3a77394e54d84309edc16b7e9d552a28a62f6a637
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -2,6 +2,8 @@
2
2
  :toclevels: 5
3
3
  :figure-caption!:
4
4
 
5
+ :frum_link: link:https://github.com/tako8ki/frum[Frum]
6
+
5
7
  = Pennyworth
6
8
 
7
9
  [link=http://badge.fury.io/rb/pennyworth]
@@ -11,25 +13,28 @@ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchem
11
13
  [link=https://circleci.com/gh/bkuhlmann/pennyworth]
12
14
  image::https://circleci.com/gh/bkuhlmann/pennyworth.svg?style=svg[Circle CI Status]
13
15
 
14
- A command line interface that enhances Alfred with Ruby support.
16
+ A command line interface that augments link:https://www.alfredapp.com[Alfred] workflows.
15
17
 
16
18
  toc::[]
17
19
 
18
20
  == Features
19
21
 
20
- * Adds Ruby support to Alfred.
21
- * Adds Alfred Workflow:
22
+ * Adds Ruby support to link:https://www.alfredapp.com[Alfred].
23
+ * Supports building advanced link:https://www.alfredapp.com/help/workflows[Workflows] for personal
24
+ augmentation.
25
+
26
+ == Screencast
22
27
 
23
- image:https://www.alchemists.io/images/projects/pennyworth/screenshots/alfred_workflow.png[Alfred
24
- Workflow]
28
+ video::https://www.alchemists.io/videos/projects/pennyworth/demo.mp4[poster=https://www.alchemists.io/images/projects/pennyworth/demo.png,width=700,height=636,role=focal_point]
25
29
 
26
30
  == Requirements
27
31
 
28
- . https://www.apple.com/macos[macOS]
29
- . https://www.alfredapp.com[Alfred]
30
- . https://www.alfredapp.com/purchase[Alfred Powerpack]
31
- . https://github.com/postmodern/chruby[chruby]
32
- . https://www.ruby-lang.org[Ruby]
32
+ . link:https://www.apple.com/macos[macOS]
33
+ . link:https://www.gnu.org/software/bash[Bash]
34
+ . link:https://www.alfredapp.com[Alfred]
35
+ . link:https://www.alfredapp.com/purchase[Alfred Powerpack]
36
+ . {frum_link}
37
+ . link:https://www.ruby-lang.org[Ruby]
33
38
 
34
39
  == Setup
35
40
 
@@ -40,36 +45,76 @@ To install, run:
40
45
  gem install pennyworth
41
46
  ----
42
47
 
48
+ When using the `--git_hub` CLI option, you'll want to supply your GitHub login and
49
+ link:https://github.com/settings/tokens[Personal Access Token] with at least _read_ access via the
50
+ following environment variables:
51
+
52
+ [source,bash]
53
+ ----
54
+ GITHUB_API_LOGIN=
55
+ GITHUB_API_TOKEN=
56
+ ----
57
+
58
+ You can configure these environment variables via link:https://direnv.net[direnv] if using the CLI
59
+ or through the link:https://www.alfredapp.com/help/workflows/advanced/variables/#environment[Alfred
60
+ Workflow Environment].
61
+
62
+ ⚠️ When using Alfred Workflow environment variables, please ensure you check the _Don't Export_
63
+ option for these variables so you don't expose your credentials when exporting/sharing workflows
64
+ with others.
65
+
43
66
  == Usage
44
67
 
45
68
  === Command Line Interface (CLI)
46
69
 
47
- From the command line, type: pennyworth
70
+ From the command line, type `pennyworth` to view usage:
48
71
 
49
72
  ....
50
- pennyworth -c, [--config] # Manage gem configuration.
51
- pennyworth -h, [--help=COMMAND] # Show this message or get help for a command.
52
- pennyworth -i, [--install] # Install Alfred Workflows.
53
- pennyworth -s, [--string=VALUE] # Manipulate strings.
54
- pennyworth -v, [--version] # Show gem version.
73
+ USAGE:
74
+ -c, --config ACTION Manage gem configuration. Actions: edit || view.
75
+ --encodings Render Alfred encodings script filter.
76
+ --git_hub Render Alfred GitHub repositories script filter.
77
+ -h, --help Show this message.
78
+ --http_statuses Render Alfred HTTP statuses script filter.
79
+ --ruby_gems Render Alfred RubyGems script filter.
80
+ --system_errors Render Alfred system errors script filter.
81
+ --system_signals Render Alfred system signals script filter.
82
+ --text CONTENT Render Alfred text script filter.
83
+ -v, --version Show gem version.
84
+
85
+ GITHUB OPTIONS:
86
+ --organization [HANDLE] Set organization. Default: "".
87
+ --user [HANDLE] Set user. Default: "".
88
+
89
+ RUBYGEMS OPTIONS:
90
+ --owner [HANDLE] Set owner. Default: "".
55
91
  ....
56
92
 
57
- For string options, type: pennyworth help string
93
+ The following demonstrates how to use Pennyworth from the CLI or within an Alfred Script Filter:
58
94
 
59
- ....
60
- -d, [--downcase], [--no-downcase] # Downcase string.
61
- -u, [--upcase], [--no-upcase] # Upcase string.
62
- -t, [--titleize], [--no-titleize] # Capitalize each word and delimit with space or forward slash.
63
- -c, [--camelcase], [--no-camelcase] # Capitalize each word and delimit with nothing or double colon.
64
- -s, [--snakecase], [--no-snakecase] # Downcase each word and delimit with underscore or forward slash.
65
- -s, [--size], [--no-size] # Calculate string size.
66
- ....
95
+ [source,bash]
96
+ ----
97
+ pennyworth --config edit
98
+ pennyworth --config view
67
99
 
68
- While the command line options are nice, the real power comes from running the following command:
69
- `pennyworth -i`. This command installs the Alfred Workflows to support this gem. You can use the
70
- Alfred commands provided by each workflow instead of the CLI. Check each workflows documentation for
71
- details by opening Alfred preferences and clicking on the _Workflows_ tab. Each workflow associated
72
- with this gem is prefixed with _Pennyworth_.
100
+ pennyworth --encodings
101
+
102
+ pennyworth --git_hub --organization alchemists
103
+ pennyworth --git_hub --user bkuhlmann
104
+
105
+ pennyworth --http_statuses
106
+ pennyworth --ruby_gems --owner bkuhlmann
107
+ pennyworth --system_errors
108
+ pennyworth --system_signals
109
+
110
+ pennyworth --text demo
111
+ pennyworth --text "An Example"
112
+ ----
113
+
114
+ While the command line options are nice, the real power comes from using Pennyworth in conjunction
115
+ with link:https://www.alfredapp.com/help/workflows/inputs/script-filter/json[Alfred Script Filters].
116
+ Without having Alfred wired up to consume the CLI output, you'll only get a JSON in your console. To
117
+ explain better, continue reading or skip ahead to the _Workflows_ section.
73
118
 
74
119
  === Customization
75
120
 
@@ -86,12 +131,288 @@ The default configuration is as follows:
86
131
 
87
132
  [source,yaml]
88
133
  ----
89
- :alfred_settings_root: "/Users/bkuhlmann/Dropbox/Cache/Alfred/Alfred.alfredpreferences"
134
+ :alfred:
135
+ :preferences:
136
+ :inflections:
137
+ - "Bkuhlmann": "bkuhlmann"
138
+ - "Dry Auto Inject": "Dry AutoInject"
139
+ - "Dry Cli": "Dry CLI"
140
+ - "Flacsmith": "FLACsmith"
141
+ - "Git Plus": "Git+"
142
+ - "Mac Os Config": "macOS Configuration"
143
+ - "Mac Os": "MacOS"
144
+ - "Prawn Plus": "Prawn+"
145
+ - "Rubocop Ast": "Rubocop AST"
146
+ - "Rubocop Md": "Rubocop Markdown"
147
+ - "Rubocop Rspec": "Rubocop RSpec"
148
+ - "Xdg": "XDG"
149
+ :git_hub:
150
+ :api_url: "https://api.github.com"
151
+ :organization:
152
+ :user:
153
+ :http:
154
+ :statuses:
155
+ :url: "https://httpstatuses.com"
156
+ :ruby_gems:
157
+ :api_url: "https://rubygems.org/api/v1"
158
+ :owner:
90
159
  ----
91
160
 
92
161
  Feel free to take this default configuration, modify, and save as your own custom
93
162
  `configuration.yml`.
94
163
 
164
+ === Themes
165
+
166
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/alchemists-theme.png[Alchemists Theme,width=634,height=121,role=focal_point]
167
+
168
+ The above is shared as the link:https://www.alfredapp.com/extras/theme/FSz9kjN1wX[Alchemists Alfred
169
+ Theme] which can be
170
+ link:alfred://theme/?t=eyJhbGZyZWR0aGVtZSI6eyJyZXN1bHQiOnsidGV4dFNwYWNpbmciOjEwLCJzdWJ0ZXh0Ijp7InNpemUiOjEyLCJjb2xvclNlbGVjdGVkIjoiI0Q2RDZENkZGIiwiZm9udCI6IkhlbHZldGljYSIsImNvbG9yIjoiI0Q2RDZENkZGIn0sInNob3J0Y3V0Ijp7InNpemUiOjE2LCJjb2xvclNlbGVjdGVkIjoiI0ZGRkZGRkZGIiwiZm9udCI6IkhlbHZldGljYSIsImNvbG9yIjoiI0ZFRkNGRkZGIn0sImJhY2tncm91bmRTZWxlY3RlZCI6IiNBMDI2MThGRiIsInRleHQiOnsic2l6ZSI6MTYsImNvbG9yU2VsZWN0ZWQiOiIjRkZGRkZGRkYiLCJmb250IjoiSGVsdmV0aWNhIiwiY29sb3IiOiIjRTFERURFRkYifSwiaWNvblBhZGRpbmdIb3Jpem9udGFsIjo1LCJyb3VuZG5lc3MiOjAsInBhZGRpbmdWZXJ0aWNhbCI6NiwiaWNvblNpemUiOjQwfSwic2VhcmNoIjp7ImJhY2tncm91bmRTZWxlY3RlZCI6IiNCMkQ3RkZGRiIsInBhZGRpbmdIb3Jpem9udGFsIjo4LCJzcGFjaW5nIjoxMCwidGV4dCI6eyJzaXplIjozNiwiY29sb3JTZWxlY3RlZCI6IiMwMDAwMDBGRiIsImZvbnQiOiJIZWx2ZXRpY2EiLCJjb2xvciI6IiNGRkZGRkZGRiJ9LCJiYWNrZ3JvdW5kIjoiIzEyMTIxMkZGIiwicm91bmRuZXNzIjowLCJwYWRkaW5nVmVydGljYWwiOjJ9LCJ3aW5kb3ciOnsiY29sb3IiOiIjNzAwQTAwRkYiLCJwYWRkaW5nSG9yaXpvbnRhbCI6MTAsIndpZHRoIjo2MjAsImJvcmRlclBhZGRpbmciOjEwLCJib3JkZXJDb2xvciI6IiMwMDAwMDAzRiIsImJsdXIiOjAsInJvdW5kbmVzcyI6MTIsInBhZGRpbmdWZXJ0aWNhbCI6MTB9LCJjcmVkaXQiOiJCcm9va2UgS3VobG1hbm4iLCJzZXBhcmF0b3IiOnsiY29sb3IiOiIjMDAwMDAwNjYiLCJ0aGlja25lc3MiOjJ9LCJzY3JvbGxiYXIiOnsiY29sb3IiOiIjMDAwMDAwNjYiLCJ0aGlja25lc3MiOjJ9LCJuYW1lIjoiQWxjaGVtaXN0cyJ9fQ==[installed
171
+ directly].
172
+
173
+ === Workflows
174
+
175
+ Not all workflows require Pennyworth to run properly. For the workflows that _do_ require Pennyworth
176
+ support, the following assumptions are made:
177
+
178
+ 1. Your link:https://www.alchemists.io/projects/dotfiles[Dotfiles] are configured to use
179
+ link:https://www.gnu.org/software/bash[Bash] and load your environment appropriately. Bash is not
180
+ a hard requirement, though. You can use _any shell_ you are comfortable with as long as you teach
181
+ Alfred to load your development environment before running the Alfred Workflow.
182
+ 2. You have the latest version of Alfred, Ruby, and Pennyworth installed.
183
+ 3. You are using a Ruby version manager, like {frum_link}, which ensures Ruby is on your load path.
184
+
185
+ With the above requirements in mind, the following sections document how to download and install all
186
+ Pennyworth workflows that are compatible with Alfred. Should you want to tweak any of these
187
+ workflows, you'd only need to edit an existing workflow or build your own with these settings:
188
+
189
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/script_filter.png[Script Filter,width=776,height=635,role=focal_point]
190
+
191
+ Before diving into each workflow, I want to highlight that the following capabilities are available
192
+ to all workflows depending on what kind of item is currently selected within the Alfred UI:
193
+
194
+ * `SHIFT` or `COMMAND + y` will launch
195
+ link:https://www.alfredapp.com/help/features/previews[Quicklook] for any URL based workflow.
196
+ * `ENTER` or `COMMAND + c` will copy selections to clipboard (depends on context, though).
197
+ * `COMMAND + l` will launch link:https://www.alfredapp.com/help/features/large-type[Large Type] of
198
+ current selection.
199
+ * `ENTER` Will either copy selection to clipboard or launch URL in default web browser.
200
+
201
+ ==== Alchemists
202
+
203
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/alchemists-projects.png[Alchemists Projects,width=706,height=632,role=focal_point]
204
+
205
+ The official link:https://www.alchemists.io[Alchemists] workflow for site navigation.
206
+
207
+ 1. link:https://www.alchemists.io/public/aflred/workflows/alchemists.alfredworkflow[Download] and
208
+ double click to install.
209
+ 2. Type `ax` to activate.
210
+
211
+ 💡 Use `ENTER` to view site, `CONTROL` to view changes, `OPTION` to view source, or `COMMAND` to
212
+ view issues.
213
+
214
+ ==== Dry RB
215
+
216
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/dry-gems.png[Dry Gems,width=706,height=632,role=focal_point]
217
+
218
+ A link:https://dry-rb.org[Dry RB] workflow for navigating all of the Dry RB site.
219
+
220
+ 1. link:https://www.alchemists.io/public/aflred/workflows/dry.alfredworkflow[Download] and double
221
+ click to install.
222
+ 2. Type `dry` to activate.
223
+
224
+ 💡 Use `ENTER` to visit site, `CONTROL` to view changes, `OPTION` to view source, or `COMMAND` to
225
+ view issues.
226
+
227
+ ==== Rubocop
228
+
229
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/rubocop-projects.png[Rubocop Projects,width=706,height=632,role=focal_point]
230
+
231
+ A link:https://docs.rubocop.org/rubocop[Rubocop] workflow for quick access to documentation,
232
+ learning about project changes, viewing source code, etc.
233
+
234
+ 1. link:https://www.alchemists.io/public/aflred/workflows/rubocop.alfredworkflow[Download] and
235
+ double click to install.
236
+ 2. Type `cop` to activate.
237
+
238
+ 💡 Use `ENTER` to view site, `CONTROL` to view changes, `OPTION` to view source, or `COMMAND` to
239
+ view issues.
240
+
241
+ ==== Ruby
242
+
243
+ This workflow is feature packed and only requires a
244
+ link:https://www.alchemists.io/public/aflred/workflows/ruby.alfredworkflow[single download]. Once
245
+ downloaded, double click to install, and then continue reading to learn all of the
246
+ capabilities this single workflow provides.
247
+
248
+ ===== Bytes
249
+
250
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-bytes.png[Bytes,width=706,height=200,role=focal_point]
251
+
252
+ This keyword allows you to generate random bytes.
253
+
254
+ Type `bytes` to activate and `ENTER` generate. You can supply an optional number for specific
255
+ length.
256
+
257
+ ===== Encodings
258
+
259
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-encodings.png[Encodings,width=706,height=632,role=focal_point]
260
+
261
+ This keyword allows you to quickly search for various encodings and/or their associated aliases to
262
+ use in your own code.
263
+
264
+ Type `encodings` to activate. Use `ENTER` to copy label or `OPTION` to copy associated aliases to
265
+ clipboard.
266
+
267
+ ===== Hex
268
+
269
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-hex.png[Hex,width=706,height=200,role=focal_point]
270
+
271
+ This keyword allows you to generate a random hex string.
272
+
273
+ Type `hex` to activate and `ENTER` generate. You can supply an optional number for specific length.
274
+
275
+ ===== HTTP Statuses
276
+
277
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-http_statuses.png[HTTP Statuses,width=706,height=632,role=focal_point]
278
+
279
+ This keyword allows you to look up statuses by code with quick access to the associated symbol for
280
+ use in your own code. Includes associated documentation for sharing or learning more. All HTTP
281
+ statuses are sourced from `Rack::Utils::HTTP_STATUS_CODES` which is why
282
+ link:https://rubygems.org/gems/rack[Rack] is a dependency of this gem and also why some codes might
283
+ not be present like these
284
+ link:https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#Unofficial_codes[unofficial codes].
285
+
286
+ Type `https` to activate. Use `ENTER` to copy symbol, `CONTROL` to copy code, `OPTION` to copy
287
+ label, or `COMMAND` to view documentation.
288
+
289
+ ===== Links
290
+
291
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-links.png[Links,width=706,height=632,role=focal_point]
292
+
293
+ This keyword allows you to navigate to additional Ruby related information and resources.
294
+
295
+ Type `rb` plus `SPACE` to activate, then fuzzy type to filter the list to what you are looking for,
296
+ and hit `ENTER` to visit the link in your default browser.
297
+
298
+ ===== Number
299
+
300
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-number.png[Number,width=706,height=200,role=focal_point]
301
+
302
+ This keyword allows you to generate a random number.
303
+
304
+ Type `number` to activate and `ENTER` generate. You can supply an optional number for specific
305
+ length.
306
+
307
+ ===== Repeat
308
+
309
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-repeat.png[Repeat,width=706,height=200,role=focal_point]
310
+
311
+ This keyword allows you to generate a repeating sequence of the same character(s).
312
+
313
+ Type `repeat` to activate and `ENTER` generate. You must supply the character(s) you want to repeat
314
+ followed by a number indicating how many times you want the character(s) to repeat.
315
+
316
+ ===== System Errors
317
+
318
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-system_errors.png[System Errors,width=706,height=632,role=focal_point]
319
+
320
+ This keyword allows you to search low-level system errors. Depending on which operating system you
321
+ are on, these errors will differ. Error IDs are provided for fuzzy searching since they are what
322
+ you'll most likely see in your stack dumps. The associated constant can be copied to clipboard for
323
+ use in your Ruby code.
324
+
325
+ Type `syserr` to activate. Use `ENTER` to copy constant, `CONTROL` to copy ID, `OPTION` to copy
326
+ description, or `COMMAND` to copy ID, name, and description.
327
+
328
+ ===== System Signals
329
+
330
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-system_signals.png[System Signals,width=706,height=632,role=focal_point]
331
+
332
+ This keyword is for searching and acquiring the system signal you want to `trap` in your Ruby code.
333
+
334
+ Type `signals` to activate. Use `ENTER` to copy name, `OPTION` to copy ID, or `COMMAND` to copy ID
335
+ and name.
336
+
337
+ ===== Text
338
+
339
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-text.png[Text,width=706,height=632,role=focal_point]
340
+
341
+ This keyword is for is for basic text manipulation. Supply a string, phrase, or sentence and let
342
+ Pennyworth calculate all transformations and information you might need.
343
+
344
+ Type `text` to activate plus andy string or phrase to transform. Use `ENTER` to copy text to
345
+ clipboard.
346
+
347
+ ===== UUID
348
+
349
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-uuid.png[UUID,width=706,height=200,role=focal_point]
350
+
351
+ This keyword allows you to generate a random Universally Unique IDentifier (UUID).
352
+
353
+ Type `uuid` to activate and `ENTER` generate.
354
+
355
+ ===== Version
356
+
357
+ image:https://www.alchemists.io/images/projects/pennyworth/screenshots/ruby-version.png[Version,width=706,height=254,role=focal_point]
358
+
359
+ This keyword allows you obtain Ruby version information.
360
+
361
+ Type `version` to activate and `ENTER` generate. Optionally, you can press `OPTION` when selected to
362
+ answer the Ruby version used by Alfred since Alfred defaults to using whatever version is supplied
363
+ by macOS.
364
+
365
+ ==== Other
366
+
367
+ The following workflows don't require Pennyworth support but are provided for convenience in case
368
+ they are of interest/aid to your own productivity. Click each link to download and then double click
369
+ to install:
370
+
371
+ * link:https://www.alchemists.io/public/aflred/workflows/acronyms.alfredworkflow[Acronyms] - Expands
372
+ acronyms into full explanations so you can think and type in terms of an acronym but appear as if
373
+ you typed out the full definition each time.
374
+ * https://www.alchemists.io/public/aflred/workflows/alpine.alfredworkflow[Alpine] - Provides
375
+ link:https://www.alpinelinux.org[Alpine Linux] resources.
376
+ * link:https://www.alchemists.io/public/aflred/workflows/applications.alfredworkflow[Applications] -
377
+ Launches development environment but can be tweaked for your preferences. Using Alfred in this
378
+ manner ensures your machine boots or restarts quickly and gives you more control over what is
379
+ launched.
380
+ * link:https://www.alchemists.io/public/aflred/workflows/browsers.alfredworkflow[Browsers] -
381
+ Provides browser related utilities.
382
+ * link:https://www.alchemists.io/public/aflred/workflows/bundler.alfredworkflow[Bundler] - Provides
383
+ quick access to link:https://bundler.io[Bundler] related resources.
384
+ * link:https://www.alchemists.io/public/aflred/workflows/hanami.alfredworkflow[Hanami] - Provides
385
+ link:https://hanamirb.org[Hanami] resources.
386
+ * link:https://www.alchemists.io/public/aflred/workflows/chlli.alfredworkflow[chi.li] - Shortens
387
+ URLs using link:https://chl.li[chl.li].
388
+ * link:https://www.alchemists.io/public/aflred/workflows/docker.alfredworkflow[Docker] - Provides
389
+ link:https://www.docker.com[Docker] resources.
390
+ * link:https://www.alchemists.io/public/aflred/workflows/mac_os.alfredworkflow[macOS] - Provides
391
+ macOS utilities.
392
+ * link:https://www.alchemists.io/public/aflred/workflows/terraform.alfredworkflow[Terraform] -
393
+ Provides link:https://www.terraform.io[Terraform] resources.
394
+ * link:https://www.alchemists.io/public/aflred/workflows/text.alfredworkflow[Text] - Provides
395
+ general text manipulation utilities beyond the Pennyworth powered _text_ keyword (mentioned
396
+ earlier).
397
+
398
+ == Architecture
399
+
400
+ The following documents the workfow used to process all actions from Alfred.
401
+
402
+ image::https://www.alchemists.io/images/projects/pennyworth/doc/architecture.svg[Architecture Diagram]
403
+
404
+ == Troubleshooting
405
+
406
+ * link:https://github.com/ruby/psych[Psych] 4.0.0 has a
407
+ link:https://github.com/ruby/psych/issues/490[bug] which prevents loading of YAML configurations
408
+ that use symbols as keys. If you get caught by this, please upgrade to Psych 4.0.1 for the fix.
409
+ * When your Alfred Workflow yields no output, you might want to open the
410
+ link:https://www.alfredapp.com/help/workflows/utilities/debug[Alfred Debugger], rerun your
411
+ workflow, and check for errors. You can also jump to the CLI and run Pennyworth directly.
412
+ * If you get GitHub authorization errors, make sure you have defined the appropriate credentials
413
+ (mentioned earlier) for both within your shell where you are running Pennyworth or within the
414
+ Alfred Workflow environment.
415
+
95
416
  == Development
96
417
 
97
418
  To contribute, run:
data/bin/pennyworth CHANGED
@@ -2,8 +2,6 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "pennyworth"
5
- require "pennyworth/cli"
6
- require "pennyworth/identity"
7
5
 
8
6
  Process.setproctitle Pennyworth::Identity::VERSION_LABEL
9
- Pennyworth::CLI.start
7
+ Pennyworth::CLI::Shell.new.call ARGV