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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a1c31d05b650f4b02d719b16ac734f688688cd851a6385c501f6f690808f7ec
4
- data.tar.gz: e6d0c6a36beb2545af0aade3a658dd547477a5a579ce909d6d33aaf231fb02af
3
+ metadata.gz: d81b2ab441d7e8ad0accf5dc7c76feed1a0fe8abcb214177c916b9e042bf04bf
4
+ data.tar.gz: '0653534290c3bc7c15388b33f0d17a752f205574423f126bcfea9af446b22919'
5
5
  SHA512:
6
- metadata.gz: '08455a1986f43b3ce7223ca6d65922ba577ae9a89ac4d734c6841833522ee8cf4cbab8d88b34fe2ba1ef759a94cb019733eb5b78baf8105c71abcd79946aea48'
7
- data.tar.gz: a146ab5ac8596eedea709007a93b59e584f394ba22e32c244b6dcef84369cd021efc6107f319d083dc522de08380522078a0e3ffcd6c55bc435e519ab028c8a6
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
- copy_file "superuser_base.js", superuser_js_file
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/shared/superuser/_search.html.erb"
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/application.js',"
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/assets/stylesheets'
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/packs'
113
+ 'app/javascript/superuser'
110
114
  end
111
115
  end
112
116
 
File without changes
@@ -14,7 +14,7 @@ module Superuser
14
14
  helper_method :pagy_nav
15
15
  helper_method :pagy_bootstrap_nav
16
16
  # pagy - Items per page
17
- Pagy::VARS[:items] = 15
17
+ # Pagy::VARS[:items] = 15
18
18
  # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
19
 
20
20
  private
@@ -0,0 +1 @@
1
+ import "./superuser.scss";
@@ -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
 
@@ -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 'shared/superuser/search', obj: '#{resources}' %%>" %>
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", media: "all" %%>' %>
15
- <%= '<%= javascript_pack_tag "superuser" %%>' %>
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 -->
@@ -0,0 +1,3 @@
1
+ import '../stylesheets/superuser.scss';
2
+ // the following line requires that images folder exists
3
+ require.context('../images', true, /\.(gif|jpeg|jpg|png|svg)$/i);
@@ -1,3 +1,3 @@
1
1
  module Superuser
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.5"
3
3
  end
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.2
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: 2020-10-06 00:00:00.000000000 Z
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: 3.8.3
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: '3.8'
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: 3.8.3
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.1.2
121
+ rubygems_version: 3.5.3
113
122
  signing_key:
114
123
  specification_version: 4
115
124
  summary: Build An Admin Area Easily.