superglue 0.52.1 → 0.53.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rails/templates/web/edit.html.erb +1 -1
- data/lib/generators/rails/templates/web/index.html.erb +1 -1
- data/lib/generators/rails/templates/web/new.html.erb +1 -1
- data/lib/generators/rails/templates/web/show.html.erb +1 -1
- data/lib/install/templates/web/application.js +0 -1
- data/lib/install/templates/web/application.json.props +2 -2
- data/lib/superglue/helpers.rb +3 -19
- data/lib/superglue.rb +0 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 198753d83f64b93b71e4288b40176b1c842ff85f211c7f909bd60aa91ee63e0e
|
4
|
+
data.tar.gz: 5ac4893e780d682bbd50330d69495848c67e4374f9bae8e755d73b7f0713dd89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c3665c25d6972ccab1ea2388bd1e0101c86553d70216dafae200126c7ff073f9a7312191ce1fad0f7edf5eb133bd2672f445d9dee27a8fdee06e02fdef4aed
|
7
|
+
data.tar.gz: 64262e8ab0c665087c87413bbd36261b04daf244caa47fe186fbf7f20fc82687a639be144fce61b6eb1c759f2fe8779cda64fe29e5cb0dc84c4e9d2f661ef090
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
|
1
|
+
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
2
2
|
|
3
3
|
<script type="text/javascript">
|
4
4
|
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
|
1
|
+
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
2
2
|
|
3
3
|
<script type="text/javascript">
|
4
4
|
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
|
1
|
+
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
2
2
|
|
3
3
|
<script type="text/javascript">
|
4
4
|
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
|
1
|
+
<%% initial_state = controller.render_to_string(active_template_virtual_path, formats: [:json], locals: local_assigns, layout: true) %>
|
2
2
|
|
3
3
|
<script type="text/javascript">
|
4
4
|
window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
|
@@ -4,7 +4,7 @@ json.data(search: path) do
|
|
4
4
|
yield json
|
5
5
|
end
|
6
6
|
|
7
|
-
json.componentIdentifier
|
7
|
+
json.componentIdentifier active_template_virtual_path
|
8
8
|
json.defers json.deferred!
|
9
9
|
json.fragments json.fragments!
|
10
10
|
json.assets [ asset_path('application.js') ]
|
@@ -15,7 +15,7 @@ end
|
|
15
15
|
|
16
16
|
if path
|
17
17
|
json.action 'graft'
|
18
|
-
json.path
|
18
|
+
json.path params[:props_at]
|
19
19
|
end
|
20
20
|
|
21
21
|
json.restoreStrategy 'fromCacheAndRevisitInBackground'
|
data/lib/superglue/helpers.rb
CHANGED
@@ -16,27 +16,11 @@ module Superglue
|
|
16
16
|
|
17
17
|
def param_to_search_path(param)
|
18
18
|
if param
|
19
|
-
param
|
19
|
+
param
|
20
|
+
.gsub(/[^\da-zA-Z_=.]+/, "")
|
21
|
+
.squeeze(".")
|
20
22
|
.split(".")
|
21
|
-
.map do |part|
|
22
|
-
if /^-?[0-9]+$/.match?(part)
|
23
|
-
part.to_i
|
24
|
-
else
|
25
|
-
part
|
26
|
-
end
|
27
|
-
end
|
28
23
|
end
|
29
24
|
end
|
30
|
-
|
31
|
-
def search_path_to_camelized_param(path)
|
32
|
-
path.map do |part|
|
33
|
-
if part.include? "="
|
34
|
-
key, rest = part.split("=")
|
35
|
-
[key.camelize(:lower), rest].join("=")
|
36
|
-
else
|
37
|
-
part.camelize(:lower)
|
38
|
-
end
|
39
|
-
end.join(".")
|
40
|
-
end
|
41
25
|
end
|
42
26
|
end
|
data/lib/superglue.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superglue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.53.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johny Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.32.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.32.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: form_props
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|