rails_app_generator 0.2.23 → 0.2.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/after_templates/addons/devise/_.rb +0 -27
  4. data/after_templates/addons/devise/db/seeds.rb +3 -3
  5. data/after_templates/addons/devise_masquerade/_.rb +36 -0
  6. data/after_templates/addons/devise_masquerade/app/controllers/application_controller.rb +3 -0
  7. data/after_templates/addons/devise_masquerade/app/controllers/home_controller.rb +4 -0
  8. data/after_templates/addons/devise_masquerade/app/controllers/users/masquerades_controller.rb +10 -0
  9. data/after_templates/addons/devise_masquerade/app/models/user.rb +17 -0
  10. data/after_templates/addons/devise_masquerade/app/views/home/index.html.erb +66 -0
  11. data/after_templates/addons/devise_masquerade/app/views/layouts/_footer.html.erb +1 -0
  12. data/after_templates/addons/devise_masquerade/app/views/layouts/_navbar.html.erb +6 -0
  13. data/after_templates/addons/devise_masquerade/app/views/layouts/application.html.erb +57 -0
  14. data/after_templates/addons/devise_masquerade/db/seeds.rb +3 -0
  15. data/after_templates/addons/minimal_css/_.rb +62 -0
  16. data/after_templates/addons/minimal_css/app/controllers/home_controller.rb +4 -0
  17. data/after_templates/addons/minimal_css/app/views/home/index.html.erb +140 -0
  18. data/after_templates/addons/minimal_css/app/views/layouts/_footer.html.erb +1 -0
  19. data/after_templates/addons/minimal_css/app/views/layouts/_navbar.html.erb +3 -0
  20. data/after_templates/addons/minimal_css/app/views/layouts/application.html.erb +29 -0
  21. data/after_templates/addons/minimal_css/db/seeds.rb +5 -0
  22. data/docs/last_run/app_generator_class.json +25 -1
  23. data/docs/last_run/app_generator_data.json +10 -7
  24. data/docs/last_run/rails_options_class.json +25 -1
  25. data/docs/last_run/rails_options_data.json +12 -8
  26. data/lib/rails_app_generator/addon.rb +13 -3
  27. data/lib/rails_app_generator/addons/devise.rb +9 -1
  28. data/lib/rails_app_generator/addons/devise_masquerade.rb +17 -0
  29. data/lib/rails_app_generator/addons/minimal_css.rb +70 -0
  30. data/lib/rails_app_generator/addons/pretender.rb +13 -0
  31. data/lib/rails_app_generator/app_generator.rb +4 -1
  32. data/lib/rails_app_generator/rag_initializer.rb +5 -1
  33. data/lib/rails_app_generator/version.rb +1 -1
  34. data/package-lock.json +2 -2
  35. data/package.json +1 -1
  36. data/profiles/addons/devise_masquerade.json +17 -0
  37. data/profiles/addons/minimal_css.json +15 -0
  38. metadata +24 -3
  39. data/lib/rails_app_generator/addons/devise_old.rb +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0367fdfc5ef1cc2337ac14d29480e9cca42c03decae87bf581d556f6d035535c
4
- data.tar.gz: a2a9b0008371f06e895fbd8644f12cd52f3ac76a4b6a0caca15275989afbf1d0
3
+ metadata.gz: '0080278d3ec15331c53403ac5ff928f153f26c4fddcc5d066d5c5104155600d8'
4
+ data.tar.gz: '07905d7681aac0916bc0ebdcb5eabaf8f6568c4ba52e1ed09109043ca4352eb7'
5
5
  SHA512:
6
- metadata.gz: c82cfe7377e2980c71185d5907c7654c89d21367abd4ee592be41a73a94a21259f655827227af469864036c7a5d548b639bea2909531a32128a1474b8e58e9f3
7
- data.tar.gz: 36f4e3400f0e51f304ef962baefc0ebfcf573642cd6005ad7a0c21337d1a75078a9ad3599b12e85742e3141dd5b7b3e795cb1d10805ee56d9675cea28a5fefbf
6
+ metadata.gz: 5e903d7fb73c50d7f04fa6c9f7e3658a4c13bda299066bf8439de52734a55ff20e6e32858eb3689e3a9360604f2f4fbcf2fa7375053f63931ad8ad77399391a7
7
+ data.tar.gz: 6f17a342e51ed8304e0b127b2d57b25162747d8dd7fbd0222855ada67fc99e08dca4b81559cf6447e2e00640fe22f03cb66d8a62bce87f49ce3f0975ae0c1555
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [0.2.25](https://github.com/klueless-io/rails_app_generator/compare/v0.2.24...v0.2.25) (2022-08-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * add devise_masquerade profile ([d34668c](https://github.com/klueless-io/rails_app_generator/commit/d34668cf2af1103ebee888ef3c78498e8323b1a5))
7
+
8
+ ## [0.2.24](https://github.com/klueless-io/rails_app_generator/compare/v0.2.23...v0.2.24) (2022-08-16)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add minimal_css profile ([5770975](https://github.com/klueless-io/rails_app_generator/commit/577097594ee3c82218628525b9bc6dd8299fb13e))
14
+
15
+ ## [0.2.23](https://github.com/klueless-io/rails_app_generator/compare/v0.2.22...v0.2.23) (2022-08-16)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * add devise profile ([a665767](https://github.com/klueless-io/rails_app_generator/commit/a6657670b1fce4eb802a56ace36368505ede3c2e))
21
+ * fix invalid gem ([377e547](https://github.com/klueless-io/rails_app_generator/commit/377e5479c4debbd0df9e1362694d1847cf7d58e0))
22
+ * update addon to work with non gems ([f9b0b14](https://github.com/klueless-io/rails_app_generator/commit/f9b0b147859760abbb921a236cd1e7f6a97eb3f0))
23
+
1
24
  ## [0.2.22](https://github.com/klueless-io/rails_app_generator/compare/v0.2.21...v0.2.22) (2022-08-14)
2
25
 
3
26
 
@@ -41,30 +41,3 @@ def setup_customizations
41
41
  directory "app/views"
42
42
  template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
43
43
  end
44
-
45
- # Other template command examples
46
- # prepare_environment
47
- # bundle_install
48
- # css_install('tailwind')
49
- # rails_command('db:migrate')
50
- # rails_command('db:migrate')
51
- # bundle_add('hotwire-rails')
52
- # rails_command('hotwire:install')
53
- # run('bin/importmap pin sortablejs')
54
- # run('npm install daisyui')
55
- # rubocop
56
- #
57
- # directory 'app/assets/images'
58
- # create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
59
- # append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
60
- # insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
61
- # before: %( <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>)
62
- # gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
63
- # template 'home.css', 'app/assets/stylesheets/home.css'
64
- #
65
- # add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
66
- # route(<<-'RUBY')
67
- # PageController.action_methods.each do |action|
68
- # get "/#{action}", to: "page##{action}", as: "page_#{action}"
69
- # end
70
- # RUBY
@@ -1,6 +1,6 @@
1
- david = User.create(email: 'david@site.com', name: 'david', password: 'password', password_confirmation: 'password', role: :admin)
2
- james = User.create(email: 'james@site.com', name: 'james', password: 'password', password_confirmation: 'password')
3
- sally = User.create(email: 'sally@site.com', name: 'sally', password: 'password', password_confirmation: 'password', role: :moderator)
1
+ User.create(email: 'david@site.com', name: 'david', password: 'password', password_confirmation: 'password', role: :admin)
2
+ User.create(email: 'james@site.com', name: 'james', password: 'password', password_confirmation: 'password')
3
+ User.create(email: 'sally@site.com', name: 'sally', password: 'password', password_confirmation: 'password', role: :moderator)
4
4
 
5
5
  10.times do
6
6
  Post.create(
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Description goes here
4
+ #
5
+ # exe/rag addons/devise_masquerade
6
+
7
+ self.local_template_path = File.dirname(__FILE__)
8
+
9
+ gac 'base rails 7 image created'
10
+
11
+ prepare_environment
12
+
13
+ after_bundle do
14
+ setup_customizations
15
+ setup_db
16
+ end
17
+
18
+ def setup_db
19
+ template 'db/seeds.rb' , 'db/seeds.rb'
20
+
21
+ db_migrate
22
+ db_seed
23
+ end
24
+
25
+ def setup_customizations
26
+ route("root 'home#index'")
27
+
28
+ force_copy
29
+
30
+ add_controller('home', 'index')
31
+
32
+ directory "app/controllers"
33
+ directory "app/models"
34
+ directory "app/views"
35
+ template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
36
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ before_action :masquerade_user!
3
+ end
@@ -0,0 +1,4 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,10 @@
1
+ class Users::MasqueradesController < Devise::MasqueradesController
2
+ # This location matches the location for other Devise controllers
3
+
4
+ protected
5
+
6
+ # Custom url redirect after masquerade
7
+ def after_masquerade_path_for(_resource)
8
+ root_path
9
+ end
10
+ end
@@ -0,0 +1,17 @@
1
+ class User < ApplicationRecord
2
+ after_initialize :set_default_role, if: :new_record?
3
+
4
+ # Include default devise modules. Others available are:
5
+ # :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
6
+ devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable, :masqueradable
7
+
8
+ has_many :posts
9
+
10
+ enum role: { user: 0, moderator: 1, admin: 9 }
11
+
12
+ private
13
+
14
+ def set_default_role
15
+ self.role ||= :user
16
+ end
17
+ end
@@ -0,0 +1,66 @@
1
+ <h1>Devise Masquerade</h1>
2
+
3
+ <h4>Devise extension that enables login as another user functionality</h4>
4
+
5
+ <p><b class='alert'>Warning!</b> If <code>masquerade?</code> is never returning <code>true</code> then ensure you have turned on caching in development using <code>rails dev:cache</code> </p>
6
+
7
+ <pre><code>user_masquerade? => <%= user_masquerade? %></code></pre>
8
+
9
+ <p>Sign in with an <b>Admin</b> user and then impersonate other users</p>
10
+
11
+ <h3>Sample users and passwords</h3>
12
+
13
+ <% if current_user %>
14
+ <% if current_user.admin? %>
15
+ <h1 class='admin'><%= current_user.name.capitalize %> - Admininstrator</h1>
16
+ <% elsif current_user.user? %>
17
+ <h1 class='user'><%= current_user.name.capitalize %> - User</h1>
18
+ <% end %>
19
+ <% else %>
20
+ <h1 class='not-signed-in'>Not currently signed in</h1>
21
+ <% end %>
22
+
23
+ <table style='width: 600px;'>
24
+ <tr>
25
+ <th>Name</th>
26
+ <th>Email</th>
27
+ <th>Role</th>
28
+ <% if current_user %>
29
+ <th>Masquerade As</th>
30
+ <% else %>
31
+ <th>Password</th>
32
+ <% end %>
33
+ </tr>
34
+ <% User.all.each do |user| %>
35
+ <tr>
36
+ <td><%= user.name %></td>
37
+ <td><%= user.email %></td>
38
+ <td><%= user.role %></td>
39
+ <td>
40
+ <% if current_user %>
41
+ <% if user_masquerade? %>
42
+ <% if user.admin? %>
43
+ <%= link_to "Back to #{user.name.capitalize}", back_masquerade_path(User.new) %>
44
+ <% end %>
45
+ <% else %>
46
+ <% if current_user.user? %>
47
+ Cannot masquerade
48
+ <% elsif user.user? %>
49
+ <%= link_to user.name.capitalize, masquerade_path(user) %>
50
+ <% else %>
51
+
52
+ <% end %>
53
+ <% end %>
54
+ <% else %>
55
+ password
56
+ <% end %>
57
+
58
+ </td>
59
+ </td>
60
+ </tr>
61
+ <% end %>
62
+ </table>
63
+
64
+ <% if current_user&.user? && !user_masquerade? %>
65
+ <p class='alert'>Sign in as an admin user</p>
66
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <%= link_to 'Home', root_path %>
2
+ <% if current_user %>
3
+ | <%= link_to 'Sign Out', destroy_user_session_path, data: { turbo_method: :delete } %>
4
+ <% else %>
5
+ | <%= link_to 'Sign In', new_user_session_path %>
6
+ <% end%>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= camelized %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%%= csrf_meta_tags %>
7
+ <%%= csp_meta_tag %>
8
+
9
+ <%- if options[:skip_hotwire] || options[:skip_javascript] -%>
10
+ <%%= stylesheet_link_tag "application" %>
11
+ <%- else -%>
12
+ <%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
13
+ <%- end -%>
14
+ <%%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>
15
+ <style>
16
+ .notice {
17
+ color: green;
18
+ }
19
+ .alert {
20
+ color: red;
21
+ }
22
+ table {
23
+ border-collapse: collapse;
24
+ }
25
+ th, td {
26
+ border: 1px solid #ccc;
27
+ padding: 5px;
28
+ }
29
+ .admin {
30
+ background-color: pink;
31
+ }
32
+ .user {
33
+ background-color: lightgreen;
34
+ }
35
+ .not-signed-in {
36
+ background-color: lightgrey;
37
+ }
38
+ .admin, .user, .not-signed-in {
39
+ text-align: center;
40
+ }
41
+ </style>
42
+ </head>
43
+
44
+ <body>
45
+ <header>
46
+ <%%= render 'layouts/navbar' %>
47
+ <hr />
48
+ <%%= render 'layouts/alerts' %>
49
+ </header>
50
+ <main>
51
+ <%%= yield %>
52
+ </main>
53
+ <footer>
54
+ <%%= render 'layouts/footer' %>
55
+ </footer>
56
+ </body>
57
+ </html>
@@ -0,0 +1,3 @@
1
+ User.create(email: 'david@site.com', name: 'david', password: 'password', password_confirmation: 'password', role: :admin)
2
+ User.create(email: 'james@site.com', name: 'james', password: 'password', password_confirmation: 'password')
3
+ User.create(email: 'sally@site.com', name: 'sally', password: 'password', password_confirmation: 'password')
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Description goes here
4
+ #
5
+ # exe/rag addons/minimal_css
6
+
7
+ self.local_template_path = File.dirname(__FILE__)
8
+
9
+ gac 'base rails 7 image created'
10
+
11
+ prepare_environment
12
+
13
+ add_controller('home', 'index')
14
+
15
+ route("root 'home#index'")
16
+
17
+ force_copy
18
+
19
+ directory "app/controllers"
20
+ directory "app/views/home"
21
+ directory "app/views/layouts"
22
+ template 'app/views/layouts/application.html.erb' , 'app/views/layouts/application.html.erb'
23
+
24
+ template 'db/seeds.rb' , 'db/seeds.rb'
25
+
26
+ after_bundle do
27
+ setup_db
28
+ end
29
+
30
+ def setup_db
31
+ add_scaffold('person', 'first_name', 'last_name', 'age:integer', 'address:text')
32
+
33
+ db_migrate
34
+ db_seed
35
+ end
36
+
37
+ # Other template command examples
38
+ # prepare_environment
39
+ # bundle_install
40
+ # css_install('tailwind')
41
+ # rails_command('db:migrate')
42
+ # rails_command('db:migrate')
43
+ # bundle_add('hotwire-rails')
44
+ # rails_command('hotwire:install')
45
+ # run('bin/importmap pin sortablejs')
46
+ # run('npm install daisyui')
47
+ # rubocop
48
+ #
49
+ # directory 'app/assets/images'
50
+ # create_file 'app/assets/stylesheets/custom-bootstrap-import.scss' , read_template('custom-bootstrap-import.scss')
51
+ # append_to_file 'app/assets/config/manifest.js' , read_template('manifest.js')
52
+ # insert_into_file 'app/views/layouts/application.html.erb', read_template('application.html.erb'),
53
+ # before: %( <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %>)
54
+ # gsub_file 'app/views/layouts/application.html.erb', %(container mx-auto mt-28 px-5 flex), 'container mx-auto px-5'
55
+ # template 'home.css', 'app/assets/stylesheets/home.css'
56
+ #
57
+ # add_controller('page', 'benefits', 'faq', 'terms', 'privacy', '--skip-routes')
58
+ # route(<<-'RUBY')
59
+ # PageController.action_methods.each do |action|
60
+ # get "/#{action}", to: "page##{action}", as: "page_#{action}"
61
+ # end
62
+ # RUBY
@@ -0,0 +1,4 @@
1
+ class HomeController < ApplicationController
2
+ def index
3
+ end
4
+ end
@@ -0,0 +1,140 @@
1
+ <h1>Minimal css</h1>
2
+
3
+ <p>The HTML below comes from the demo on Water.css</p>
4
+
5
+ <h2>Element demos</h2>
6
+ <p>This is supposed to be a demo page so we need more elements!</p>
7
+ <h3>Form elements</h3>
8
+ <form>
9
+ <label for="email">Email</label> <input type="email" name="email" id="email" placeholder="john.doe@gmail.com" />
10
+ <label for="id">User id (read only)</label> <input readonly="" name="id" id="id" value="04D6H89Z" />
11
+ <label for="disabled">Random disabled input</label>
12
+ <input disabled="" name="disabled" id="disabled" placeholder="Because why not?" />
13
+ <label for="about">About me</label> <textarea name="about" id="about" placeholder="I am a textarea..."></textarea>
14
+ <label>Choose a Doe:</label>
15
+ <div>
16
+ <input type="radio" id="john" name="drone" value="john" checked="" />
17
+ <label for="john">John Doe</label>
18
+ </div>
19
+ <div>
20
+ <input type="radio" id="jane" name="drone" value="jane" checked="" />
21
+ <label for="jane">Jane Doe</label>
22
+ </div>
23
+ <div>
24
+ <input type="radio" id="johnny" name="drone" value="johnny" checked="" />
25
+ <label for="johnny">Johnny Doe</label>
26
+ </div>
27
+ <br />
28
+ <input type="checkbox" name="remember" id="remember" checked="" />
29
+ <label for="remember">Remember me</label>
30
+
31
+ <input type="submit" value="Submit" />
32
+ <input type="reset" value="Reset" />
33
+ </form>
34
+ <h3 id="code">Code</h3>
35
+ <p>
36
+ Below is some code, you can copy it with <kbd>Ctrl-C</kbd>. Did you know, <code>alert(1)</code> can show an alert in
37
+ JavaScript!
38
+ </p>
39
+ <pre style="position: relative">
40
+ <code>// This logs a message to the console and check out the scrollbar.<br>console.log('Hello, world!')</code>
41
+ <div class="open_grepper_editor" title="Edit &amp; Save To Grepper"></div>
42
+ </pre>
43
+ <h3>Other</h3>
44
+ <p>Here's a horizontal rule and image because I don't know where else to put them.</p>
45
+ <img src="https://placekitten.com/408/287" alt="Example kitten" />
46
+ <hr />
47
+ <p>And here's a nicely marked up table!</p>
48
+
49
+ <table>
50
+ <thead>
51
+ <tr>
52
+ <th>Name</th>
53
+ <th>Quantity</th>
54
+ <th>Price</th>
55
+ </tr>
56
+ </thead>
57
+ <tbody>
58
+ <tr>
59
+ <td>Godzilla</td>
60
+ <td>2</td>
61
+ <td>$299.99</td>
62
+ </tr>
63
+ <tr>
64
+ <td>Mozilla</td>
65
+ <td>10</td>
66
+ <td>$100,000.00</td>
67
+ </tr>
68
+ <tr>
69
+ <td>Quesadilla</td>
70
+ <td>1</td>
71
+ <td>$2.22</td>
72
+ </tr>
73
+ </tbody>
74
+ </table>
75
+
76
+ <details>
77
+ <summary>Some summary/details can't hurt!</summary>
78
+ <p>Lorem ipsum dolor sit blah blah.</p>
79
+ </details>
80
+
81
+ <p>The dialog (form, and menu) tag</p>
82
+ <div><button type="button" id="dialog-trigger">Show me the dialog!</button> <span id="dialog-result"></span></div>
83
+ <dialog id="dialog">
84
+ <header>This is a sample dialog</header>
85
+ <form method="dialog">
86
+ <p>What is your favorite pet animal?</p>
87
+ <menu>
88
+ <button value="feline">Cats</button> <button value="canine">Dogs</button> <button value="other">Others</button>
89
+ </menu>
90
+ </form>
91
+ </dialog>
92
+ <h3 id="typography">Typography</h3>
93
+ <p>
94
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque dictum hendrerit velit, quis ullamcorper sem congue
95
+ ac. Quisque id magna rhoncus, sodales massa vel, vestibulum elit. Duis ornare accumsan egestas. Proin maximus lacus
96
+ interdum leo molestie convallis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus
97
+ mus. Ut iaculis risus eu felis feugiat, eu mollis neque elementum. Donec interdum, nisl id dignissim iaculis, felis
98
+ dui aliquet dui, non fermentum velit lectus ac quam. Class aptent taciti sociosqu ad litora torquent per conubia
99
+ nostra, per inceptos himenaeos. <strong>This is strong,</strong> this is normal, <b>this is just bold,</b>
100
+ <em>and this is emphasized!</em> And heck, <a href="/">here</a>'s a link.
101
+ </p>
102
+ <blockquote cite="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote">
103
+ "The HTML blockquote Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended
104
+ quotation. Usually, this is rendered visually by indentation (see
105
+ <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote#Usage_notes">Notes</a> for how to change
106
+ it). A URL for the source of the quotation may be given using the <code>cite</code> attribute, while a text
107
+ representation of the source can be given using the <code>&lt;cite&gt;</code> cite element."
108
+ <footer><cite>MDN, "The Block Quotation element"</cite></footer>
109
+ </blockquote>
110
+ <ul>
111
+ <li>Unordered list item 1</li>
112
+ <li>Unordered list item 2</li>
113
+ <li>Unordered list item 3</li>
114
+ </ul>
115
+ <ol>
116
+ <li>Ordered list item 1</li>
117
+ <li>Ordered list item 2</li>
118
+ <li>Ordered list item 3</li>
119
+ </ol>
120
+ <p>Addresses are also styled to be <strong>awesome</strong>!</p>
121
+ <address>
122
+ <a href="mailto:john.doe@example.com">john.doe@example.com</a><br />
123
+ <a href="tel:778-330-2389">778-330-2389</a><br />
124
+ <a href="sms:666-666-6666">666-666-6666</a><br />
125
+ </address>
126
+ <br />
127
+ <h1>Heading 1</h1>
128
+ <h2>Heading 2</h2>
129
+ <h3>Heading 3</h3>
130
+ <h4>Heading 4</h4>
131
+ <h5>Heading 5</h5>
132
+ <h6>Heading 6</h6>
133
+ <footer><a href="#">Back to top ⬆</a></footer>
134
+ <script src="script.js" defer=""></script>
135
+ <div style="position: static !important">
136
+ <div
137
+ data-lastpass-infield="true"
138
+ style="position: absolute !important; top: 0px !important; left: 0px !important"
139
+ ></div>
140
+ </div>
@@ -0,0 +1,3 @@
1
+ <%= link_to 'Home', root_path %> |
2
+ <%= link_to 'People', people_path %>
3
+ <hr />
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= camelized %></title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <%%= csrf_meta_tags %>
7
+ <%%= csp_meta_tag %>
8
+
9
+ <%- if options[:skip_hotwire] || options[:skip_javascript] -%>
10
+ <%%= stylesheet_link_tag "application" %>
11
+ <%- else -%>
12
+ <%%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
13
+ <%- end -%>
14
+ </head>
15
+
16
+ <body>
17
+ <header>
18
+ <%%= render 'layouts/navbar' %>
19
+ <hr />
20
+ </header>
21
+ <main>
22
+ <%%= yield %>
23
+ </main>
24
+ <footer>
25
+ <%%= render 'layouts/footer' %>
26
+ </footer>
27
+ </body>
28
+ </html>
29
+
@@ -0,0 +1,5 @@
1
+ # scaffold('people', 'first_name', 'last_name', 'age:integer', 'address:text')
2
+
3
+ 20.times do |i|
4
+ Person.create(first_name: "First #{i}", last_name: "Last #{i}", age: i, address: Faker::Address.full_address)
5
+ end
@@ -48,6 +48,7 @@
48
48
  "add_browser",
49
49
  "add_chartkick",
50
50
  "add_devise",
51
+ "add_devise_masquerade",
51
52
  "add_dotenv",
52
53
  "add_faker",
53
54
  "add_groupdate",
@@ -55,6 +56,8 @@
55
56
  "add_httparty",
56
57
  "add_honeybadger",
57
58
  "add_lograge",
59
+ "add_minimal_css",
60
+ "minimal_css_library",
58
61
  "add_mini_magick",
59
62
  "add_motor_admin",
60
63
  "add_public_suffix",
@@ -111,7 +114,7 @@
111
114
  "name": "ruby",
112
115
  "description": "Path to the Ruby binary of your choice",
113
116
  "type": "string",
114
- "default": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
117
+ "default": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
115
118
  "required": false
116
119
  },
117
120
  {
@@ -401,6 +404,13 @@
401
404
  "default": false,
402
405
  "required": false
403
406
  },
407
+ {
408
+ "name": "add_devise_masquerade",
409
+ "description": "Indicates when to generate add devise masquerade",
410
+ "type": "boolean",
411
+ "default": false,
412
+ "required": false
413
+ },
404
414
  {
405
415
  "name": "add_dotenv",
406
416
  "description": "Indicates when to generate add dotenv",
@@ -450,6 +460,20 @@
450
460
  "default": false,
451
461
  "required": false
452
462
  },
463
+ {
464
+ "name": "add_minimal_css",
465
+ "description": "Indicates when to generate add minimal css",
466
+ "type": "boolean",
467
+ "default": false,
468
+ "required": false
469
+ },
470
+ {
471
+ "name": "minimal_css_library",
472
+ "description": "Indicates when to generate minimal css library",
473
+ "type": "string",
474
+ "default": "water.css",
475
+ "required": false
476
+ },
453
477
  {
454
478
  "name": "add_mini_magick",
455
479
  "description": "Indicates when to generate add mini magick",
@@ -2,7 +2,7 @@
2
2
  "options": {
3
3
  "skip_namespace": false,
4
4
  "skip_collision_check": false,
5
- "ruby": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
5
+ "ruby": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
6
6
  "database": "sqlite3",
7
7
  "skip_git": true,
8
8
  "skip_keeps": false,
@@ -26,33 +26,36 @@
26
26
  "main": false,
27
27
  "no_rc": false,
28
28
  "api": false,
29
- "javascript": "importmap",
29
+ "javascript": "esbuild",
30
30
  "skip_bundle": false,
31
31
  "note": "",
32
32
  "test": "rspec",
33
33
  "add_acts_as_list": false,
34
- "add_administrate": true,
34
+ "add_administrate": false,
35
35
  "add_annotate": true,
36
36
  "add_avo": false,
37
37
  "add_bcrypt": false,
38
38
  "add_browser": false,
39
39
  "add_chartkick": false,
40
- "add_devise": false,
40
+ "add_devise": true,
41
+ "add_devise_masquerade": true,
41
42
  "add_dotenv": false,
42
- "add_faker": true,
43
+ "add_faker": false,
43
44
  "add_groupdate": false,
44
45
  "add_hexapdf": false,
45
46
  "add_httparty": false,
46
47
  "add_honeybadger": false,
47
48
  "add_lograge": false,
49
+ "add_minimal_css": true,
50
+ "minimal_css_library": "water.css",
48
51
  "add_mini_magick": false,
49
52
  "add_motor_admin": false,
50
53
  "add_public_suffix": false,
51
54
  "add_phony_rails": false,
52
55
  "add_rails_html_sanitizer": false,
53
56
  "add_redcarpet": false,
54
- "add_rubocop": true,
57
+ "add_rubocop": false,
55
58
  "add_twilio_ruby": false,
56
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/administrate/_.rb"
59
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/devise_masquerade/_.rb"
57
60
  }
58
61
  }
@@ -48,6 +48,7 @@
48
48
  "add_browser",
49
49
  "add_chartkick",
50
50
  "add_devise",
51
+ "add_devise_masquerade",
51
52
  "add_dotenv",
52
53
  "add_faker",
53
54
  "add_groupdate",
@@ -55,6 +56,8 @@
55
56
  "add_httparty",
56
57
  "add_honeybadger",
57
58
  "add_lograge",
59
+ "add_minimal_css",
60
+ "minimal_css_library",
58
61
  "add_mini_magick",
59
62
  "add_motor_admin",
60
63
  "add_public_suffix",
@@ -111,7 +114,7 @@
111
114
  "name": "ruby",
112
115
  "description": "Path to the Ruby binary of your choice",
113
116
  "type": "string",
114
- "default": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
117
+ "default": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
115
118
  "required": false
116
119
  },
117
120
  {
@@ -401,6 +404,13 @@
401
404
  "default": false,
402
405
  "required": false
403
406
  },
407
+ {
408
+ "name": "add_devise_masquerade",
409
+ "description": "",
410
+ "type": "boolean",
411
+ "default": false,
412
+ "required": false
413
+ },
404
414
  {
405
415
  "name": "add_dotenv",
406
416
  "description": "",
@@ -450,6 +460,20 @@
450
460
  "default": false,
451
461
  "required": false
452
462
  },
463
+ {
464
+ "name": "add_minimal_css",
465
+ "description": "",
466
+ "type": "boolean",
467
+ "default": false,
468
+ "required": false
469
+ },
470
+ {
471
+ "name": "minimal_css_library",
472
+ "description": "Minimal CSS library to get you started. [options: water.css (default)]",
473
+ "type": "string",
474
+ "default": "water.css",
475
+ "required": false
476
+ },
453
477
  {
454
478
  "name": "add_mini_magick",
455
479
  "description": "",
@@ -6,8 +6,8 @@
6
6
  "pretend": false,
7
7
  "quiet": false,
8
8
  "skip": false,
9
- "ruby": "/Users/davidcruwys/.asdf/installs/ruby/3.1.1/bin/ruby",
10
- "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/administrate/_.rb",
9
+ "ruby": "/Users/davidcruwys/.asdf/installs/ruby/2.7.6/bin/ruby",
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/devise_masquerade/_.rb",
11
11
  "database": "sqlite3",
12
12
  "skip_git": true,
13
13
  "skip_keeps": false,
@@ -35,33 +35,37 @@
35
35
  "version": false,
36
36
  "api": false,
37
37
  "minimal": false,
38
- "javascript": "importmap",
38
+ "javascript": "esbuild",
39
39
  "css": "",
40
40
  "skip_bundle": false,
41
41
  "note": "",
42
42
  "test": "rspec",
43
43
  "add_acts_as_list": false,
44
- "add_administrate": true,
44
+ "add_administrate": false,
45
45
  "add_annotate": true,
46
46
  "add_avo": false,
47
47
  "add_bcrypt": false,
48
48
  "add_browser": false,
49
49
  "add_chartkick": false,
50
- "add_devise": false,
50
+ "add_devise": true,
51
+ "add_devise_masquerade": true,
51
52
  "add_dotenv": false,
52
- "add_faker": true,
53
+ "add_faker": false,
53
54
  "add_groupdate": false,
54
55
  "add_hexapdf": false,
55
56
  "add_httparty": false,
56
57
  "add_honeybadger": false,
57
58
  "add_lograge": false,
59
+ "add_minimal_css": true,
60
+ "minimal_css_library": "water.css",
58
61
  "add_mini_magick": false,
59
62
  "add_motor_admin": false,
60
63
  "add_public_suffix": false,
61
64
  "add_phony_rails": false,
62
65
  "add_rails_html_sanitizer": false,
63
66
  "add_redcarpet": false,
64
- "add_rubocop": true,
65
- "add_twilio_ruby": false
67
+ "add_rubocop": false,
68
+ "add_twilio_ruby": false,
69
+ "notes": "there is a name conflict if the rails application has the same name as the gem and so devise_masquerade has been renamed to devise_masquerade_sample"
66
70
  }
67
71
  }
@@ -35,10 +35,20 @@ module RailsAppGenerator
35
35
  context.options
36
36
  end
37
37
 
38
- def option?(option_name)
39
- value = options[option_name.to_sym]
38
+ def add_flag?(option_name)
39
+ value = options["add_#{option_name}".to_sym]
40
+
41
+ return false if value.nil?
42
+
43
+ value == true
44
+ end
40
45
 
41
- !value.nil?
46
+ def active?(option_name)
47
+ add_flag?(option_name) # || !skip_flag?(option_name)
48
+ end
49
+
50
+ def option?(option_name)
51
+ !options[option_name.to_sym].nil?
42
52
  end
43
53
 
44
54
  def uses?(addon_name = nil)
@@ -56,7 +56,15 @@ module RailsAppGenerator
56
56
 
57
57
  def update_routes_with_devise_controllers
58
58
  in_root do
59
- gsub_file 'config/routes.rb', /devise_for :users/, 'devise_for :users, controllers: { sessions: "users/sessions", registrations: "users/registrations" }'
59
+ controller_config = [
60
+ 'sessions: "users/sessions"',
61
+ 'registrations: "users/registrations"'
62
+ ]
63
+ controller_config << 'masquerades: "users/masquerades"' if active?(:devise_masquerade)
64
+
65
+ devise_for_replacement = "devise_for :users, controllers: { #{controller_config.join(', ')} }"
66
+
67
+ gsub_file 'config/routes.rb', /devise_for :users/, devise_for_replacement
60
68
  end
61
69
  end
62
70
 
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Custom add-ons for RailsAppGenerator
5
+ module AddOns
6
+ # Add DeviseMasquerade to rails application
7
+ class DeviseMasquerade < RailsAppGenerator::Addon
8
+ depends_on :devise
9
+
10
+ required_gem gem.version('devise_masquerade', '1.3.12', 'Devise extension that enables login as another user functionality')
11
+
12
+ def apply
13
+ # NOTE: update_routes_with_devise_controllers is being handled in devise.rb addon
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Custom add-ons for RailsAppGenerator
5
+ module AddOns
6
+ # Add MinimalCss to rails application
7
+ class MinimalCss < RailsAppGenerator::Addon
8
+ LIBRARIES = {
9
+ water: {
10
+ source: 'https://watercss.kognise.dev',
11
+ content: '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">'
12
+ },
13
+ picnic: {
14
+ source: 'https://picnicss.com',
15
+ content: '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/picnic">'
16
+ },
17
+ chota: {
18
+ source: 'https://jenil.github.io/chota/',
19
+ content: '<link rel="stylesheet" href="https://unpkg.com/chota@latest">'
20
+ }
21
+ }.freeze
22
+
23
+ # https://purecss.io/
24
+ # https://bulma.io/
25
+ # https://get.foundation/
26
+ # https://www.blazeui.com/
27
+ # https://getbase.org/
28
+ # https://cirrus-ui.netlify.app/
29
+ # https://vanillaframework.io/
30
+ # https://www.patternfly.org/v4/
31
+ # https://tachyons.io/
32
+ # https://nostalgic-css.github.io/NES.css/
33
+ # https://selekkt.dk/skelet/v3/
34
+ # https://picturepan2.github.io/spectre/
35
+ # https://kylelogue.github.io/mustard-ui/
36
+ # https://www.bonsaicss.com/
37
+ # https://ajusa.github.io/lit/
38
+ # https://www.cutestrap.com/
39
+ # https://kbrsh.github.io/wing/
40
+ # https://devinhunt.github.io/typebase.css/
41
+ # http://getskeleton.com/
42
+ # https://semantic-ui.com/
43
+ # https://getuikit.com/
44
+
45
+ # ANIMATION
46
+ # https://animate.style/
47
+ # https://www.csswand.dev/
48
+ # http://animation.kaustubhmenon.com/
49
+ # https://www.minimamente.com/project/magic/
50
+
51
+ def apply; end
52
+
53
+ def after_bundle
54
+ library_key = (options[:minimal_css_library] || 'water').to_sym
55
+
56
+ insert_into_file 'app/views/layouts/application.html.erb', head(library_key), before: %r{^\s+</head>}, force: true
57
+ end
58
+
59
+ private
60
+
61
+ def head(library_key)
62
+ library = LIBRARIES[library_key] || LIBRARIES[:water]
63
+
64
+ content = library[:content]
65
+
66
+ " #{content}\n"
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsAppGenerator
4
+ # Custom add-ons for RailsAppGenerator
5
+ module AddOns
6
+ # Add Pretender to rails application
7
+ class Pretender < RailsAppGenerator::Addon
8
+ required_gem gem.version('pretender', '0.4.0', 'Log in as another user in Rails')
9
+
10
+ def apply; end
11
+ end
12
+ end
13
+ end
@@ -176,6 +176,7 @@ module RailsAppGenerator
176
176
  add_if(:chartkick) # tested
177
177
  add_if(:continuous_integration) # TODO: needs work
178
178
  add_if(:devise) # tested
179
+ add_if(:devise_masquerade) # tested
179
180
  # docker_compose
180
181
  # docker
181
182
  add_if(:dotenv) # tested
@@ -188,10 +189,12 @@ module RailsAppGenerator
188
189
  add_if(:high_voltage) # TODO: needs testing
189
190
  add_if(:honeybadger) # tested
190
191
  add_if(:lograge) # tested
192
+ add_if(:minimal_css) # tested (this is NOT a GEM)
191
193
  add_if(:mini_magick) # tested
192
194
  add_if(:motor_magick) # tested
193
- add_if(:public_suffix) # tested
194
195
  add_if(:phony_rails) # tested
196
+ add_if(:pretender) # tested
197
+ add_if(:public_suffix) # tested
195
198
  add_if(:pundit) # TODO: needs testing
196
199
  add_if(:rails_html_sanitizer) # tested
197
200
  add_if(:rails_app_generator) # TODO: needs testing
@@ -111,6 +111,7 @@ KConfig.configure do |config|
111
111
  rag.add_option :add_chartkick , type: :boolean, default: false
112
112
  # continuous_integration
113
113
  rag.add_option :add_devise , type: :boolean, default: false
114
+ rag.add_option :add_devise_masquerade , type: :boolean, default: false
114
115
  # docker_compose
115
116
  # docker
116
117
  rag.add_option :add_dotenv , type: :boolean, default: false
@@ -123,10 +124,13 @@ KConfig.configure do |config|
123
124
  # high_voltage
124
125
  rag.add_option :add_honeybadger , type: :boolean, default: false
125
126
  rag.add_option :add_lograge , type: :boolean, default: false
127
+ rag.add_option :add_minimal_css , type: :boolean, default: false
128
+ rag.add_option :minimal_css_library , type: :string, default: 'water.css', description: "Minimal CSS library to get you started. [options: water.css (default)]"
126
129
  rag.add_option :add_mini_magick , type: :boolean, default: false
127
130
  rag.add_option :add_motor_admin , type: :boolean, default: false
128
- rag.add_option :add_public_suffix , type: :boolean, default: false
129
131
  rag.add_option :add_phony_rails , type: :boolean, default: false
132
+ rag.add_option :add_pretender , type: :boolean, default: false
133
+ rag.add_option :add_public_suffix , type: :boolean, default: false
130
134
  # pundit
131
135
  rag.add_option :add_rails_html_sanitizer , type: :boolean, default: false
132
136
  # rails_app_generator
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAppGenerator
4
- VERSION = '0.2.23'
4
+ VERSION = '0.2.26'
5
5
  end
data/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.23",
3
+ "version": "0.2.26",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "rails_app_generator",
9
- "version": "0.2.23",
9
+ "version": "0.2.26",
10
10
  "dependencies": {
11
11
  "daisyui": "^2.20.0"
12
12
  },
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rails_app_generator",
3
- "version": "0.2.23",
3
+ "version": "0.2.26",
4
4
  "description": "Create new Rails Application with custom opinions",
5
5
  "scripts": {
6
6
  "release": "semantic-release"
@@ -0,0 +1,17 @@
1
+ {
2
+ "args": {
3
+ "app_path": "r7_devise_masquerade",
4
+ "destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
5
+ },
6
+ "opts": {
7
+ "notes": "there is a name conflict if the rails application has the same name as the gem and so devise_masquerade has been renamed to devise_masquerade_sample",
8
+ "skip_git": true,
9
+ "skip_test": true,
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/devise_masquerade/_.rb",
11
+ "javascript": "esbuild",
12
+ "add_annotate": true,
13
+ "add_devise": true,
14
+ "add_devise_masquerade": true,
15
+ "add_minimal_css": true
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "args": {
3
+ "app_path": "minimal_css",
4
+ "destination_root": "/Users/davidcruwys/dev/kgems/rails_app_generator/a/addons"
5
+ },
6
+ "opts": {
7
+ "skip_git": true,
8
+ "skip_test": true,
9
+ "note": "minimal_css_library is optional and will default to water if not specified.",
10
+ "template": "/Users/davidcruwys/dev/kgems/rails_app_generator/after_templates/addons/minimal_css/_.rb",
11
+ "add_faker": true,
12
+ "add_minimal_css": true,
13
+ "minimal_css_library": "water"
14
+ }
15
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_app_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.23
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Cruwys
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2022-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootsnap
@@ -251,6 +251,16 @@ files:
251
251
  - after_templates/addons/devise/app/views/posts/index.html.erb
252
252
  - after_templates/addons/devise/app/views/posts/show.html.erb
253
253
  - after_templates/addons/devise/db/seeds.rb
254
+ - after_templates/addons/devise_masquerade/_.rb
255
+ - after_templates/addons/devise_masquerade/app/controllers/application_controller.rb
256
+ - after_templates/addons/devise_masquerade/app/controllers/home_controller.rb
257
+ - after_templates/addons/devise_masquerade/app/controllers/users/masquerades_controller.rb
258
+ - after_templates/addons/devise_masquerade/app/models/user.rb
259
+ - after_templates/addons/devise_masquerade/app/views/home/index.html.erb
260
+ - after_templates/addons/devise_masquerade/app/views/layouts/_footer.html.erb
261
+ - after_templates/addons/devise_masquerade/app/views/layouts/_navbar.html.erb
262
+ - after_templates/addons/devise_masquerade/app/views/layouts/application.html.erb
263
+ - after_templates/addons/devise_masquerade/db/seeds.rb
254
264
  - after_templates/addons/dotenv/_.rb
255
265
  - after_templates/addons/dotenv/app/controllers/home_controller.rb
256
266
  - after_templates/addons/dotenv/app/views/home/index.html.erb
@@ -299,6 +309,13 @@ files:
299
309
  - after_templates/addons/mini_magick/app/views/layouts/_footer.html.erb
300
310
  - after_templates/addons/mini_magick/app/views/layouts/_navbar.html.erb
301
311
  - after_templates/addons/mini_magick/app/views/layouts/application.html.erb
312
+ - after_templates/addons/minimal_css/_.rb
313
+ - after_templates/addons/minimal_css/app/controllers/home_controller.rb
314
+ - after_templates/addons/minimal_css/app/views/home/index.html.erb
315
+ - after_templates/addons/minimal_css/app/views/layouts/_footer.html.erb
316
+ - after_templates/addons/minimal_css/app/views/layouts/_navbar.html.erb
317
+ - after_templates/addons/minimal_css/app/views/layouts/application.html.erb
318
+ - after_templates/addons/minimal_css/db/seeds.rb
302
319
  - after_templates/addons/motor_admin/_.rb
303
320
  - after_templates/addons/motor_admin/app/controllers/home_controller.rb
304
321
  - after_templates/addons/motor_admin/app/views/home/index.html.erb
@@ -555,7 +572,7 @@ files:
555
572
  - lib/rails_app_generator/addons/chartkick.rb
556
573
  - lib/rails_app_generator/addons/continuous_integration.rb
557
574
  - lib/rails_app_generator/addons/devise.rb
558
- - lib/rails_app_generator/addons/devise_old.rb
575
+ - lib/rails_app_generator/addons/devise_masquerade.rb
559
576
  - lib/rails_app_generator/addons/docker.rb
560
577
  - lib/rails_app_generator/addons/docker_compose.rb
561
578
  - lib/rails_app_generator/addons/dotenv.rb
@@ -572,8 +589,10 @@ files:
572
589
  - lib/rails_app_generator/addons/irbrc.rb
573
590
  - lib/rails_app_generator/addons/lograge.rb
574
591
  - lib/rails_app_generator/addons/mini_magick.rb
592
+ - lib/rails_app_generator/addons/minimal_css.rb
575
593
  - lib/rails_app_generator/addons/motor_admin.rb
576
594
  - lib/rails_app_generator/addons/phony_rails.rb
595
+ - lib/rails_app_generator/addons/pretender.rb
577
596
  - lib/rails_app_generator/addons/public_suffix.rb
578
597
  - lib/rails_app_generator/addons/pundit.rb
579
598
  - lib/rails_app_generator/addons/rails_html_sanitizer.rb
@@ -631,6 +650,7 @@ files:
631
650
  - profiles/addons/browser.json
632
651
  - profiles/addons/chartkick.json
633
652
  - profiles/addons/devise.json
653
+ - profiles/addons/devise_masquerade.json
634
654
  - profiles/addons/dotenv.json
635
655
  - profiles/addons/faker.json
636
656
  - profiles/addons/hexapdf.json
@@ -638,6 +658,7 @@ files:
638
658
  - profiles/addons/httparty.json
639
659
  - profiles/addons/lograge.json
640
660
  - profiles/addons/mini_magick.json
661
+ - profiles/addons/minimal_css.json
641
662
  - profiles/addons/motor_admin.json
642
663
  - profiles/addons/phony_rails.json
643
664
  - profiles/addons/public_suffix.json
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module RailsAppGenerator
4
- # Custom add-ons for RailsAppGenerator
5
- module AddOns
6
- # Add Devise authentication to rails application
7
- class DeviseXxxx < RailsAppGenerator::Addon
8
- depends_on :active_record
9
-
10
- required_gem gem.version('devise', '4.8.1', 'Flexible authentication solution for Rails with Warden')
11
-
12
- # Requires Testing
13
- def apply
14
- update_development_rb
15
- gsub_file 'config/initializers/devise.rb', /# config.pepper = .+/, " # config.pepper = 'pepper'"
16
- gsub_file 'config/initializers/devise.rb', /# config.secret_key = .+/, " # config.secret_key = 'secret_key'"
17
- db_changes
18
- create_seed
19
- end
20
- end
21
- end
22
- end