phlex-stimulus 0.1.0 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f20ab06752e9826fc2e3861ee9878cd26448f2094ccbd5779ffacb64b6fe364
4
- data.tar.gz: 9b0bb287d885da0b196d9aab1b21d9d9b1048f2d4d19e2c15d969dfba7f0a1e2
3
+ metadata.gz: d5f51c97b602da2ffe25109fc4229e2980839134de4602912fcda7de9993331a
4
+ data.tar.gz: 16897e82b71726d0b84e33b1f3b7fdb00387408f892180d7e529aa48ce53b177
5
5
  SHA512:
6
- metadata.gz: 4afabcd2606a43cdf8f029e27afa3dc86c119fd68f6e5cda842ba729ac9df2659110b048f1cbb56df7f502a343cf61f6b6da8e163373780cc6d3af151f82de99
7
- data.tar.gz: 9c25eddafac1a456cb42303eac937eb5f95b898a446daa85ffe981528c210bbe0b92dbce5a79812b26d3ace3e4567489bec9940dbc22f594680ab91138d6fb41
6
+ metadata.gz: 304b3c3b6a8a9160a5e873864621cfa6a9f6047bd1808e93a595eb9f5a47a86fecde535b060278cdbaae49c546d24bc79dadba3ec1f3038920f4592b26e92fbe
7
+ data.tar.gz: b815213393ae0d157571a6fe46fc081386bd657bfa71a4f93afc369b9bc1d1b65f25c404d67d8ed17ad24a66fbae9294bc849527742dbd9508c411b7f5ee7717
data/CHANGELOG.md CHANGED
@@ -9,6 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  Add changes in new features here. Do not change the gem's version in pull/merge requests.
11
11
 
12
+ ## [0.1.2] - 27.07.2026
13
+
14
+ [Diff](https://github.com/espago/phlex-stimulus/compare/v0.1.1...v0.1.2)
15
+
16
+ - Fix controller generators
17
+
18
+ ## [0.1.1] - 27.07.2026
19
+
20
+ [Diff](https://github.com/espago/phlex-stimulus/compare/v0.1.0...v0.1.1)
21
+
22
+ - Add missing require
23
+ - Fix RBI generation
24
+
12
25
  ## [0.1.0] - 22.07.2026
13
26
 
14
27
  [Diff](https://github.com/espago/phlex-stimulus/compare/v0.0.0...v0.1.0)
@@ -12,13 +12,26 @@ module Phlex::Stimulus::Generators
12
12
  #: -> void
13
13
  def create_files
14
14
  template 'controller.ts.erb',
15
- File.join(destination_root, 'app', 'javascript', 'controllers', class_path, "#{file_name}_controller.ts")
15
+ File.join(
16
+ destination_root,
17
+ 'app',
18
+ 'javascript',
19
+ 'controllers',
20
+ *class_path,
21
+ "#{file_name}_controller.ts",
22
+ )
16
23
 
17
24
  template 'component.rb.erb',
18
- File.join(destination_root, 'app', 'components', class_path, "#{file_name}_controller.rb")
25
+ File.join(
26
+ destination_root,
27
+ 'app',
28
+ 'components',
29
+ *class_path,
30
+ "#{file_name}_controller.rb",
31
+ )
19
32
 
20
33
  append_to_file File.join(destination_root, 'app', 'javascript', 'controllers', 'index.ts'),
21
- "import \"./#{class_path}/#{file_name}_controller\"\n"
34
+ "import \"./#{File.join(*class_path)}/#{file_name}_controller\"\n"
22
35
  end
23
36
 
24
37
  private
@@ -8,6 +8,9 @@ class Components::Base < Phlex::Stimulus::Components::Base
8
8
  # Include any helpers you want to be available across all components
9
9
  include Phlex::Rails::Helpers::Routes
10
10
 
11
+ #: -> ApplicationController::HelperProxy
12
+ def h = view_context
13
+
11
14
  if Rails.env.development?
12
15
  #: -> void
13
16
  def before_template
@@ -1,4 +1,5 @@
1
1
  // import all your controllers here
2
+ import "./chain_controller"
2
3
  import "./log_controller"
3
4
  import "./sleep_controller"
4
5
  import "./classlist_controller"
@@ -7,7 +7,6 @@ module Phlex::Stimulus
7
7
  #
8
8
  # @abstract
9
9
  class Base < Phlex::HTML
10
- #: -> ApplicationController::HelperProxy
11
10
  def h = view_context
12
11
 
13
12
  #: -> String
@@ -7,3 +7,4 @@ module Phlex::Stimulus
7
7
  end
8
8
 
9
9
  require_relative 'components/base'
10
+ require_relative 'components/controller'
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Phlex
5
5
  module Stimulus
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.2'
7
7
  end
8
8
  end
@@ -1,12 +1,5 @@
1
1
  # typed: true
2
2
 
3
- class ApplicationController
4
- module HelperProxy
5
- sig { params(path: String).returns(T.nilable(String))}
6
- def resolve_asset_path(path); end
7
- end
8
- end
9
-
10
3
  module Zeitwerk
11
4
  class GemLoader; end
12
5
  class Loader; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-stimulus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Espago