isorun 0.1.9-x86_64-darwin → 0.1.10-x86_64-darwin

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: '045309e2bebe24468befe3b77fff185b201da5bfbbac2e085d92fbe9499d3062'
4
- data.tar.gz: 5358e3731ab58c9c7b606a72e0d59308d736adc283e35ad3059a1d8066c15b6d
3
+ metadata.gz: b10388064f0cdc9a8c10a6d921ef1b52f1150c98f4341ebc347110643a74bee2
4
+ data.tar.gz: 2d28a5e195cc18b77e8fba3cad8373575eda620742670573f863ef7aa9bffe21
5
5
  SHA512:
6
- metadata.gz: 5954fe17877449d65813377f931bc6a1e3df04fec3425934bcdbc499b1c6a03643cc38c772853766d030eed713fe85c3c2880ca6bf66c05a4bb2c1c0637385b6
7
- data.tar.gz: 322a650b2631c9e8248fc265a4011dc1c77b82f548a6ce6f901047303c7160ab101fc8e176f3652c35741349c24fea55653c5c6a479e77166599e3fe3a255068
6
+ metadata.gz: f886b4a0529f427c4aabfbc15c61add93d123b2d2793e748bd1cb6a69c86291c820b62959b406448dd63d0a709d5132bcf3c0a73955a940644a7458fe5e1a9c0
7
+ data.tar.gz: bd80d25c4dd896f04f1edc837971535c3cf562238747cafa18a134bd092e2f2123c03fb61b7597bd2638c520abf398cbe02817ed1eca964056a039dc8b23c189
@@ -14,10 +14,13 @@ module Isorun
14
14
  # </body>
15
15
  # </html>
16
16
  #
17
+ # @see https://api.rubyonrails.org/v5.1/classes/ActionView/Helpers/TagHelper.html#method-i-tag
17
18
  # @param id [String] An ID representing both, the asset bundle, and by
18
19
  # convention, the target node (e.g. `<div id="my_app">`)
20
+ # @param [Hash] options All valid tag options can also passed as options
21
+ # to this method
19
22
  # @return [String]
20
- def isorun_app(id) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
23
+ def isorun_app(id, options = nil) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
21
24
  ActiveSupport::Notifications.instrument "start.render.isorun", { ts: Time.current }
22
25
 
23
26
  module_path = Isorun.config.module_resolver.call(id)
@@ -43,7 +46,10 @@ module Isorun
43
46
  end
44
47
 
45
48
  html = if ssr_html.present?
46
- tag.div id: id do
49
+ options ||= {}
50
+ options[:id] = id
51
+
52
+ tag.div(**options) do
47
53
  ssr_html.html_safe # rubocop:disable Rails/OutputSafety
48
54
  end
49
55
  else
@@ -15,10 +15,13 @@ module Isorun
15
15
  # </body>
16
16
  # </html>
17
17
  #
18
- # @param id [String] An ID representing both, the asset bundle, and by
18
+ # @see https://api.rubyonrails.org/v5.1/classes/ActionView/Helpers/TagHelper.html#method-i-tag
19
+ # @param [String] id An ID representing both, the asset bundle, and by
19
20
  # convention, the target node (e.g. `<div id="my_app">`)
21
+ # @param [Hash] options All valid tag options can also passed as options
22
+ # to this method
20
23
  # @return [String]
21
- def isorun_vite_app(id) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
24
+ def isorun_vite_app(id, options = nil)
22
25
  ActiveSupport::Notifications.instrument "start.render.isorun", { ts: Time.current }
23
26
 
24
27
  # if id has a file extension, we extract the extension and reduce the ID
@@ -49,7 +52,10 @@ module Isorun
49
52
  end
50
53
 
51
54
  html = if ssr_html.present?
52
- tag.div id: id do
55
+ options ||= {}
56
+ options[:id] = id
57
+
58
+ tag.div(**options) do
53
59
  ssr_html.html_safe # rubocop:disable Rails/OutputSafety
54
60
  end
55
61
  else
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "isorun"
3
- version = "0.1.9"
3
+ version = "0.1.10"
4
4
  edition = "2021"
5
5
  authors = ["Hannes Moser <box@hannesmoser.at>"]
6
6
  homepage = "https://github.com/eliias/isorun"
Binary file
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Isorun
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isorun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - Hannes Moser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-31 00:00:00.000000000 Z
11
+ date: 2023-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties