svelte-on-rails 9.1.5 → 9.2.0

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: c43e04aa5662d5f28765582d1cac0b301ae7241495d800a1164d06ae83da31b3
4
- data.tar.gz: 5adf8b380dd3949dc1d50d9082b1d386f40a1d49366f19aee0f42173450b4908
3
+ metadata.gz: 29336b36bac6fdb46a03d1f4806e3fb9d9ea92eb91aec0b78abbb6810262b76d
4
+ data.tar.gz: 7cbd43c3707681f0282c34141447b33f3da1466e40ab10cd5a479c4a9ea614f9
5
5
  SHA512:
6
- metadata.gz: a462e7864dadc29bf563d3aaa48cc7f20c9f0cd78b3e07694a49f76a4c11321a8498c8e9a3fdd03a8c0c7380ecb40ecab4fc91ce26738771df16c5d38ba6ed0c
7
- data.tar.gz: fe499094d1615757b76dcd2caa7517e9ebec234b32f17642eb01825b69fdcab1d45edc360ee8d37393f74021269e33ff6b23e864a11bbd3207f6c3972ff8ce8d
6
+ metadata.gz: 8d4b1d6084a23a47553727180bb9b837295b4b2782dd9918b7929589515948e3a435f048512199deee38aaaea58794426663dfdc3636c0edeaeeca80a5003563
7
+ data.tar.gz: 8ffec7a7924fb19d2411dd09a3741fe050669806121e5340d0e34aa86f447c69364ad54baaad5e057bc04c26635912a3cf12b76cc2fbfb8d448d969e4caeb5f2
@@ -2,30 +2,6 @@
2
2
  module SvelteOnRails
3
3
  module ViewHelpers
4
4
 
5
- def svelte_component_ruby2(path, *args)
6
-
7
- props, html, options = validate_ruby2_props(args)
8
-
9
- support = SvelteOnRails::Lib::ViewHelperSupport.new(path, props, html, options, request, false)
10
-
11
- support.render(self) do
12
- render_component(support)
13
- end
14
-
15
- end
16
-
17
- def cached_svelte_component_ruby2(path, *args)
18
-
19
- props, html, options = validate_ruby2_props(args)
20
-
21
- support = SvelteOnRails::Lib::ViewHelperSupport.new(path, props, html, options, request, true)
22
-
23
- support.render_cached(self) do
24
- render_component(support)
25
- end
26
-
27
- end
28
-
29
5
  def svelte_component(path, props = {}, html: {}, options: {})
30
6
 
31
7
  support = SvelteOnRails::Lib::ViewHelperSupport.new(path, props, html, options, request, false)
@@ -65,33 +41,5 @@ module SvelteOnRails
65
41
  end
66
42
  end
67
43
 
68
- def validate_ruby2_props(args)
69
- last_is_kwargs = false
70
- kw_err = false
71
-
72
- if args.length > 2
73
- kw_err = true
74
- elsif args.length >= 1
75
- if (args.last.keys & [:html, :options]).present?
76
- last_is_kwargs = true
77
- if (args.last.keys - [:html, :options]).present?
78
- kw_err = true
79
- end
80
- end
81
- end
82
-
83
- if kw_err
84
- raise "Invalid arguments: First argument can be a hash as svelte-properties, second and third arguments are keyword arguments: :html and/or :options"
85
- end
86
-
87
- first_is_props = args.length == 1 && !last_is_kwargs || args.length == 2
88
-
89
- [
90
- (first_is_props ? args.first : nil),
91
- (last_is_kwargs ? args[1][:html] || {} : {}),
92
- (last_is_kwargs ? args[1][:options] : {}),
93
- ]
94
- end
95
-
96
44
  end
97
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svelte-on-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.5
4
+ version: 9.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Sedlmair
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: '2.7'
114
+ version: '3.0'
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
@@ -121,5 +121,5 @@ requirements: []
121
121
  rubygems_version: 3.6.7
122
122
  specification_version: 4
123
123
  summary: Seamless integration of Svelte components in Rails. With server-side rendering
124
- and caching, built on top of vite_ruby.
124
+ and caching, built on top of vite_rails.
125
125
  test_files: []