pennyworth 17.4.1 → 17.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e145f2b67767dfb8c5d062c72afc8cb5ab8778d4e51622c4f78d654df96a8d0
4
- data.tar.gz: cd34eb5c7fa9f3e8cca5f8d608fec04faeedece9549b2e24702b5cb1aabde7af
3
+ metadata.gz: 57f72591d386652cb83fa3f62752efeb51aa84572efc272c003522a0391f19f8
4
+ data.tar.gz: d2daeb58a7c16a181a5e57607d91610cb0ef9c0afe2acfbed6431c77ef5f9928
5
5
  SHA512:
6
- metadata.gz: 81352f6b2797fb4c0bb1a59200a5b80e2fdea7a8550a367afeed1feeec3445479be33d9bb5e3866e5181a87860d31a92854558c35436e37cd1d79eb3fd95b989
7
- data.tar.gz: 4a6ccfe6684c736c7d64b54be544bba1183bb5ce728975b6857f47e9ca0e7378ca9c9ab13039b708d102cd3584847f3b3f9904a3142f05804040f0d2b66726f8
6
+ metadata.gz: 4d92cf6fe764fde7201e5017031b532e84510856200d266cc911213da9a241f7c4bb7264ca95352197a102b815e72984b6a2657cdd9326ddda167faaac1db0f1
7
+ data.tar.gz: 6a38899be0b025d3786781b00d1e7b44d8d23e5dd33b5e8f545c7e2cecdcdc22794d7380c6fc09afa2f6c38dcd39b18004765be773d3b1c6961684518662b77f
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  :alfred_link: link:https://www.alfredapp.com[Alfred]
6
6
  :bash_link: link:https://www.gnu.org/software/bash[Bash]
7
+ :htmx_link: link:https://htmx.org[htmx]
7
8
  :ruby_link: link:https://www.ruby-lang.org[Ruby]
9
+ :ruby_string_format_link: link:https://docs.ruby-lang.org/en/master/format_specifications_rdoc.html[String Format]
8
10
  :ruby_version_managers_link: link:https://alchemists.io/articles/ruby_version_managers[Ruby Version Manager]
9
11
 
10
12
  = Pennyworth
@@ -181,8 +183,10 @@ http:
181
183
  statuses:
182
184
  url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
183
185
  htmx:
184
- examples_uri: "https://htmx.org/examples"
185
- references_uri: "https://htmx.org/reference"
186
+ examples_uri: "%<htmx_site_uri>s/examples"
187
+ extensions_uri: "%<htmx_site_uri>s/extensions"
188
+ references_uri: "%<htmx_site_uri>s/reference"
189
+ site_uri: "https://htmx.org"
186
190
  ruby_gems:
187
191
  api_url: "https://rubygems.org/api/v1"
188
192
  standard_gems:
@@ -192,6 +196,8 @@ standard_gems:
192
196
  Feel free to take this default configuration, modify, and save as your own custom
193
197
  `configuration.yml`.
194
198
 
199
+ For {htmx_link}, the Ruby {ruby_string_format_link} specification is used which means you can define the `site_uri` once and have it automatically resolved in all URIs that reference it. Otherwise, you can use literal URIs if desired.
200
+
195
201
  === Themes
196
202
 
197
203
  image:https://alchemists.io/images/projects/pennyworth/screenshots/alchemists-theme.png[Alchemists Theme,width=706,height=632,role=focal_point]
@@ -258,7 +264,7 @@ Provides quick access to link:https://dry-rb.org[Dry RB] resources.
258
264
 
259
265
  image:https://alchemists.io/images/projects/pennyworth/screenshots/htmx.png[htmx workflow screenshot.,width=706,height=631,role=focal_point]
260
266
 
261
- Provides quick access to the link:https://htmx.org[htmx] JavaScript library.
267
+ Provides quick access to the {htmx_link} JavaScript library.
262
268
 
263
269
  1. link:https://alchemists.io/public/alfred/workflows/htmx.alfredworkflow[Download] and
264
270
  double click to install.
@@ -648,7 +654,7 @@ bin/console
648
654
 
649
655
  The following documents the workflow used to process all actions from Alfred.
650
656
 
651
- image::https://alchemists.io/images/projects/pennyworth/doc/architecture.svg[Architecture Diagram]
657
+ image::https://alchemists.io/images/projects/pennyworth/doc/architecture.png[Architecture Diagram,width=1265,height=2377,role=focal_point]
652
658
 
653
659
  == Tests
654
660
 
@@ -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 HTMX
9
+ # Handles extension documentation action.
10
+ class Extension < Sod::Action
11
+ include Import[:settings, :io]
12
+
13
+ description "Render Alfred extensions script filter."
14
+
15
+ on "--extensions"
16
+
17
+ def initialize(processor: Processor.for_htmx, **)
18
+ @processor = processor
19
+ super(**)
20
+ end
21
+
22
+ def call(*) = io.puts processor.call(settings.htmx_extensions_uri).to_json
23
+
24
+ private
25
+
26
+ attr_reader :processor
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -33,6 +33,7 @@ module Pennyworth
33
33
 
34
34
  on "htmx", "Render htmx script filters" do
35
35
  on Actions::HTMX::Example
36
+ on Actions::HTMX::Extension
36
37
  on Actions::HTMX::Reference
37
38
  end
38
39
 
@@ -14,7 +14,9 @@ module Pennyworth
14
14
  optional(:git_hub_user).filled :string
15
15
  required(:http_statuses_url).filled :string
16
16
  required(:htmx_examples_uri).filled :string
17
+ required(:htmx_extensions_uri).filled :string
17
18
  required(:htmx_references_uri).filled :string
19
+ required(:htmx_site_uri).filled :string
18
20
  required(:ruby_gems_api_url).filled :string
19
21
  optional(:ruby_gems_owner).filled :string
20
22
  required(:standard_gems_api_url).filled :string
@@ -77,8 +77,10 @@ http:
77
77
  statuses:
78
78
  url: "https://developer.mozilla.org/docs/Web/HTTP/Status"
79
79
  htmx:
80
- examples_uri: "https://htmx.org/examples"
81
- references_uri: "https://htmx.org/reference"
80
+ examples_uri: "%<htmx_site_uri>s/examples"
81
+ extensions_uri: "%<htmx_site_uri>s/extensions"
82
+ references_uri: "%<htmx_site_uri>s/reference"
83
+ site_uri: "https://htmx.org"
82
84
  ruby_gems:
83
85
  api_url: "https://rubygems.org/api/v1"
84
86
  standard_gems:
@@ -10,7 +10,9 @@ module Pennyworth
10
10
  :git_hub_user,
11
11
  :http_statuses_url,
12
12
  :htmx_examples_uri,
13
+ :htmx_extensions_uri,
13
14
  :htmx_references_uri,
15
+ :htmx_site_uri,
14
16
  :ruby_gems_api_url,
15
17
  :ruby_gems_owner,
16
18
  :standard_gems_api_url
@@ -16,6 +16,9 @@ module Pennyworth
16
16
  Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
17
17
  .add_loader(:yaml, self[:defaults_path])
18
18
  .add_loader(:yaml, self[:xdg_config].active)
19
+ .add_transformer(:format, :htmx_examples_uri)
20
+ .add_transformer(:format, :htmx_extensions_uri)
21
+ .add_transformer(:format, :htmx_references_uri)
19
22
  end
20
23
 
21
24
  register(:settings) { Etcher.call(self[:registry]).dup }
@@ -8,7 +8,7 @@ module Pennyworth
8
8
  module Loaders
9
9
  # Loads htmx documentation by scraping web page.
10
10
  class HTMX
11
- include Import[:http]
11
+ include Import[:http, :settings]
12
12
 
13
13
  using Refinements::String
14
14
 
@@ -54,7 +54,7 @@ module Pennyworth
54
54
  model[
55
55
  label: (item.locate("*/code").first || item.locate("a").first).text,
56
56
  description: "#{self.class.text_for description}.",
57
- uri: item.locate("*/@href").first || uri
57
+ uri: (item.locate("*/@href").first || uri).sub(%r(\A(?=/)), settings.htmx_site_uri)
58
58
  ]
59
59
  end
60
60
  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 = "17.4.1"
5
+ spec.version = "17.5.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/pennyworth"
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency "infusible", "~> 3.8"
33
33
  spec.add_dependency "ox", "~> 2.14"
34
34
  spec.add_dependency "rack", "~> 3.0"
35
- spec.add_dependency "refinements", "~> 12.8"
35
+ spec.add_dependency "refinements", "~> 12.9"
36
36
  spec.add_dependency "runcom", "~> 11.5"
37
37
  spec.add_dependency "sod", "~> 0.14"
38
38
  spec.add_dependency "spek", "~> 3.0"
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: 17.4.1
4
+ version: 17.5.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: 2024-09-25 00:00:00.000000000 Z
38
+ date: 2024-10-07 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -169,14 +169,14 @@ dependencies:
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: '12.8'
172
+ version: '12.9'
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: '12.8'
179
+ version: '12.9'
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: runcom
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -252,6 +252,7 @@ files:
252
252
  - lib/pennyworth/cli/actions/git_hub/organization.rb
253
253
  - lib/pennyworth/cli/actions/git_hub/user.rb
254
254
  - lib/pennyworth/cli/actions/htmx/example.rb
255
+ - lib/pennyworth/cli/actions/htmx/extension.rb
255
256
  - lib/pennyworth/cli/actions/htmx/reference.rb
256
257
  - lib/pennyworth/cli/actions/http_status.rb
257
258
  - lib/pennyworth/cli/actions/standard_error.rb
@@ -332,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
332
333
  - !ruby/object:Gem::Version
333
334
  version: '0'
334
335
  requirements: []
335
- rubygems_version: 3.5.20
336
+ rubygems_version: 3.5.21
336
337
  signing_key:
337
338
  specification_version: 4
338
339
  summary: A command line interface for augmented Alfred workflows.
metadata.gz.sig CHANGED
Binary file