superuser 0.3.2 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/superuser/USAGE +0 -0
- data/lib/generators/superuser/init_generator.rb +9 -5
- data/lib/generators/superuser/superuser_generator.rb +0 -0
- data/lib/generators/superuser/templates/base_controller.rb +1 -1
- data/lib/generators/superuser/templates/controller_template.rb +0 -0
- data/lib/generators/superuser/templates/dashboard_controller.rb +0 -0
- data/lib/generators/superuser/templates/superuser_base.js +1 -0
- data/lib/generators/superuser/templates/superuser_base.scss +0 -0
- data/lib/generators/superuser/templates/views/_form.html.erb +0 -0
- data/lib/generators/superuser/templates/views/_search.html.erb +1 -1
- data/lib/generators/superuser/templates/views/dashboard_index.html.erb +0 -0
- data/lib/generators/superuser/templates/views/edit.html.erb +0 -0
- data/lib/generators/superuser/templates/views/index.html.erb +1 -1
- data/lib/generators/superuser/templates/views/layouts/application.html.erb +2 -2
- data/lib/generators/superuser/templates/views/new.html.erb +0 -0
- data/lib/generators/superuser/templates/views/show.html.erb +0 -0
- data/lib/generators/superuser/templates/webpack_native_base.js +3 -0
- data/lib/superuser/version.rb +1 -1
- data/lib/superuser.rb +0 -0
- metadata +19 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d81b2ab441d7e8ad0accf5dc7c76feed1a0fe8abcb214177c916b9e042bf04bf
|
4
|
+
data.tar.gz: '0653534290c3bc7c15388b33f0d17a752f205574423f126bcfea9af446b22919'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41147b00ddfc5a877a797a366c35c8c3d1433065757134651193724cf3c3a19796ee326811946c0849585d681bd73e6501b12bce70afcb4036dda87ca1e4642b
|
7
|
+
data.tar.gz: fc3e0d51db6e98e63fbc8c6cc693c5bd75d51e7f42a813a1b0bea8867db9ace2f4ab66cd1ffc650730f28a3979dcb98ee04d9ffa04ca553ec35afdcbdf597b42
|
File without changes
|
@@ -13,7 +13,11 @@ class Superuser::InitGenerator < Rails::Generators::Base
|
|
13
13
|
def generate_js_file
|
14
14
|
superuser_js_file = "#{javascripts_folder()}/superuser.js"
|
15
15
|
if !File.exist?(superuser_js_file)
|
16
|
-
|
16
|
+
if for_webpack_native
|
17
|
+
copy_file "webpack_native_base.js", superuser_js_file
|
18
|
+
else
|
19
|
+
copy_file "superuser_base.js", superuser_js_file
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
@@ -52,7 +56,7 @@ class Superuser::InitGenerator < Rails::Generators::Base
|
|
52
56
|
end
|
53
57
|
|
54
58
|
def generate_search_form
|
55
|
-
template "views/_search.html.erb", "app/views/
|
59
|
+
template "views/_search.html.erb", "app/views/superuser/_search.html.erb"
|
56
60
|
end
|
57
61
|
|
58
62
|
# in case of user is using webpack_native gem then add an entry pointing to superuser "application" javascript file
|
@@ -61,7 +65,7 @@ class Superuser::InitGenerator < Rails::Generators::Base
|
|
61
65
|
|
62
66
|
webpack_config_file = "#{Rails.root}/app/webpack_native/webpack.config.js"
|
63
67
|
|
64
|
-
entry_line = "\n\t\t\tsuperuser: './src/javascripts/superuser
|
68
|
+
entry_line = "\n\t\t\tsuperuser: './src/javascripts/superuser.js',"
|
65
69
|
|
66
70
|
path = File.join(destination_root, 'app/webpack_native/webpack.config.js')
|
67
71
|
file_content = File.read(path)
|
@@ -98,7 +102,7 @@ class Superuser::InitGenerator < Rails::Generators::Base
|
|
98
102
|
if for_webpack_native
|
99
103
|
'app/webpack_native/src/stylesheets'
|
100
104
|
else
|
101
|
-
'app/
|
105
|
+
'app/javascript/superuser'
|
102
106
|
end
|
103
107
|
end
|
104
108
|
|
@@ -106,7 +110,7 @@ class Superuser::InitGenerator < Rails::Generators::Base
|
|
106
110
|
if for_webpack_native
|
107
111
|
'app/webpack_native/src/javascripts'
|
108
112
|
else
|
109
|
-
'app/javascript/
|
113
|
+
'app/javascript/superuser'
|
110
114
|
end
|
111
115
|
end
|
112
116
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
import "./superuser.scss";
|
File without changes
|
File without changes
|
@@ -5,7 +5,7 @@
|
|
5
5
|
</div>
|
6
6
|
|
7
7
|
<div class="text-center">
|
8
|
-
<%= "<%= form_tag [:superuser, obj], method: :get, class: 'search_form' do %%>" %>
|
8
|
+
<%= "<%= form_tag [:superuser, obj.to_sym], method: :get, class: 'search_form' do %%>" %>
|
9
9
|
|
10
10
|
<span class="condition-label">Condition :</span>
|
11
11
|
|
File without changes
|
File without changes
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<%#= without method_messing available as helper, it should be [main_app, :new, :superuser, @model.table_name.singularize] %>
|
4
4
|
<%= "<%= link_to 'Add new #{resource}', [:new, :superuser, :#{resource}], class: 'btn btn-info float-sm-right' %%>" %>
|
5
5
|
|
6
|
-
<%= "<%= render '
|
6
|
+
<%= "<%= render 'superuser/search', obj: '#{resources}' %%>" %>
|
7
7
|
|
8
8
|
<div class="table-responsive">
|
9
9
|
|
@@ -11,8 +11,8 @@
|
|
11
11
|
<%= '<%= webpack_stylesheet_url "superuser", media: "all", "data-turbolinks-track": "reload" %%>' %>
|
12
12
|
<%= '<%= webpack_javascript_url "superuser", "data-turbolinks-track": "reload" %%>' %>
|
13
13
|
<% else -%>
|
14
|
-
<%= '<%= stylesheet_link_tag "superuser",
|
15
|
-
<%= '<%=
|
14
|
+
<%= '<%= stylesheet_link_tag "superuser", "data-turbo-track": "reload" %%>' %>
|
15
|
+
<%= '<%= javascript_include_tag "superuser", "data-turbo-track": "reload", defer: true %%>' %>
|
16
16
|
<% end -%>
|
17
17
|
|
18
18
|
<!-- CDN for flatpickr.css -->
|
File without changes
|
File without changes
|
data/lib/superuser/version.rb
CHANGED
data/lib/superuser.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superuser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mody
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -48,22 +48,30 @@ dependencies:
|
|
48
48
|
name: pagy
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '3.8'
|
54
51
|
- - ">="
|
55
52
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
53
|
+
version: '0'
|
57
54
|
type: :runtime
|
58
55
|
prerelease: false
|
59
56
|
version_requirements: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
|
-
- - "
|
58
|
+
- - ">="
|
62
59
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: sassc-rails
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :runtime
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
64
72
|
- - ">="
|
65
73
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
74
|
+
version: '0'
|
67
75
|
description: This gem will help you scaffold an admin area very quickly so you can
|
68
76
|
have full control over your code when you need customization
|
69
77
|
email:
|
@@ -88,6 +96,7 @@ files:
|
|
88
96
|
- lib/generators/superuser/templates/views/layouts/application.html.erb
|
89
97
|
- lib/generators/superuser/templates/views/new.html.erb
|
90
98
|
- lib/generators/superuser/templates/views/show.html.erb
|
99
|
+
- lib/generators/superuser/templates/webpack_native_base.js
|
91
100
|
- lib/superuser.rb
|
92
101
|
- lib/superuser/version.rb
|
93
102
|
homepage: https://github.com/scratchoo/superuser
|
@@ -109,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
118
|
- !ruby/object:Gem::Version
|
110
119
|
version: '0'
|
111
120
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
121
|
+
rubygems_version: 3.5.3
|
113
122
|
signing_key:
|
114
123
|
specification_version: 4
|
115
124
|
summary: Build An Admin Area Easily.
|