superglue 0.53.1 → 0.54.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: 198753d83f64b93b71e4288b40176b1c842ff85f211c7f909bd60aa91ee63e0e
4
- data.tar.gz: 5ac4893e780d682bbd50330d69495848c67e4374f9bae8e755d73b7f0713dd89
3
+ metadata.gz: 0a7defe951c632a4f1f2493ad92f3ca691124986e4d6c94d718791489e1cf1ad
4
+ data.tar.gz: 2be2e0b8422d9f9c8c2c6f0a7e2fb2ec3cf77cd1facb1e50f0a36034236274fe
5
5
  SHA512:
6
- metadata.gz: b9c3665c25d6972ccab1ea2388bd1e0101c86553d70216dafae200126c7ff073f9a7312191ce1fad0f7edf5eb133bd2672f445d9dee27a8fdee06e02fdef4aed
7
- data.tar.gz: 64262e8ab0c665087c87413bbd36261b04daf244caa47fe186fbf7f20fc82687a639be144fce61b6eb1c759f2fe8779cda64fe29e5cb0dc84c4e9d2f661ef090
6
+ metadata.gz: 35131fe314207a550d8921b1f93b37fcac0ada8534940ace2711d2465f741c6151d05f7fd190f72594d36877f265d3a72ba0540cc71d5757075959c5240ff374
7
+ data.tar.gz: c207f98aae2d03e1ce5f44fe46194c363762fde5e7113eea1907cc05727d94c5236a6e51633489f7d4b98665a3674d76a9bc594cb30e3e7eb12b4c1cef738c70
@@ -29,13 +29,8 @@ class <%= controller_class_name %>Controller < ApplicationController
29
29
  @<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
30
30
 
31
31
  if @<%= orm_instance.save %>
32
- <%- if options[:platform] == 'mobile' -%>
33
- redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully created.'" %>
34
- <%- else -%>
35
32
  redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %>
36
- <%- end -%>
37
33
  else
38
- response.set_header("content-location", new_<%= singular_table_name %>_path)
39
34
  render :new
40
35
  end
41
36
  end
@@ -43,13 +38,8 @@ class <%= controller_class_name %>Controller < ApplicationController
43
38
  # PATCH/PUT <%= route_url %>/1
44
39
  def update
45
40
  if @<%= orm_instance.update("#{singular_table_name}_params") %>
46
- <%- if options[:platform] == 'mobile' -%>
47
- redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully updated.'" %>
48
- <%- else -%>
49
41
  redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %>
50
- <%- end -%>
51
42
  else
52
- response.set_header("content-location", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>))
53
43
  render :edit
54
44
  end
55
45
  end
@@ -57,11 +47,7 @@ class <%= controller_class_name %>Controller < ApplicationController
57
47
  # DELETE <%= route_url %>/1
58
48
  def destroy
59
49
  @<%= orm_instance.destroy %>
60
- <%- if options[:platform] == 'mobile' -%>
61
- redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
62
- <%- else -%>
63
50
  redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
64
- <%- end -%>
65
51
  end
66
52
 
67
53
  private
@@ -1,6 +1,6 @@
1
- if @post.errors.any?
1
+ if @<%= singular_table_name %>.errors.any?
2
2
  json.errors({
3
- explanation: "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this post from being saved:",
3
+ explanation: "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:",
4
4
  messages: @<%= singular_table_name %>.errors.full_messages.map{|msg| {body: msg}}
5
5
  })
6
6
  end
@@ -1,6 +1,6 @@
1
- if @post.errors.any?
1
+ if @<%= singular_table_name %>.errors.any?
2
2
  json.errors({
3
- explanation: "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this post from being saved:",
3
+ explanation: "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:",
4
4
  messages: @<%= singular_table_name %>.errors.full_messages.map{|msg| {body: msg}}
5
5
  })
6
6
  end
@@ -1,7 +1,7 @@
1
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
- window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
4
+ window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
5
5
  </script>
6
6
 
7
7
  <%%# If you need SSR follow instructions at %>
@@ -5,14 +5,14 @@ export default function <%= plural_table_name.camelize %>Edit ({
5
5
  // visit,
6
6
  // remote,
7
7
  form,
8
- error,
8
+ errors,
9
9
  <%= singular_table_name.camelize(:lower) %>Path,
10
10
  <%= plural_table_name.camelize(:lower) %>Path,
11
11
  }) {
12
- const messagesEl = error && (
12
+ const messagesEl = errors && (
13
13
  <div id="error_explanation">
14
- <h2>{ error.explanation }</h2>
15
- <ul>{ error.messages.map(({body})=> <li key={body}>{body}</li>) }</ul>
14
+ <h2>{ errors.explanation }</h2>
15
+ <ul>{ errors.messages.map(({body})=> <li key={body}>{body}</li>) }</ul>
16
16
  </div>
17
17
  )
18
18
 
@@ -1,7 +1,7 @@
1
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
- window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
4
+ window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
5
5
  </script>
6
6
 
7
7
  <%%# If you need SSR follow instructions at %>
@@ -1,7 +1,7 @@
1
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
- window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
4
+ window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
5
5
  </script>
6
6
 
7
7
  <%%# If you need SSR follow instructions at %>
@@ -5,13 +5,13 @@ export default function <%= plural_table_name.camelize %>New({
5
5
  // visit,
6
6
  // remote
7
7
  form,
8
- error,
8
+ errors,
9
9
  <%= plural_table_name.camelize(:lower) %>Path,
10
10
  }) {
11
- const messagesEl = error && (
11
+ const messagesEl = errors && (
12
12
  <div id="error_explanation">
13
- <h2>{ error.explanation }</h2>
14
- <ul>{ error.messages.map(({body})=> <li key={body}>{body}</li>) }</ul>
13
+ <h2>{ errors.explanation }</h2>
14
+ <ul>{ errors.messages.map(({body})=> <li key={body}>{body}</li>) }</ul>
15
15
  </div>
16
16
  )
17
17
 
@@ -1,7 +1,7 @@
1
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
- window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
4
+ window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;<%%# erblint:disable ErbSafety %>
5
5
  </script>
6
6
 
7
7
  <%%# If you need SSR follow instructions at %>
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.53.1
4
+ version: 0.54.0
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-23 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -52,90 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.0.5
55
- - !ruby/object:Gem::Dependency
56
- name: activerecord
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '7.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '7.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '12.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '12.0'
83
- - !ruby/object:Gem::Dependency
84
- name: sqlite3
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.3'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.3'
97
- - !ruby/object:Gem::Dependency
98
- name: minitest
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '5.10'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '5.10'
111
- - !ruby/object:Gem::Dependency
112
- name: capybara
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3.0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3.0'
125
- - !ruby/object:Gem::Dependency
126
- name: selenium-webdriver
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '3.11'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '3.11'
139
55
  description: Rails integration for SuperglueJS
140
56
  email: jho406@gmail.com
141
57
  executables: []