rails_app_generator 0.2.22 → 0.2.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/after_templates/addons/devise/_.rb +70 -0
- data/after_templates/addons/devise/app/controllers/home_controller.rb +4 -0
- data/after_templates/addons/devise/app/controllers/posts_controller.rb +81 -0
- data/after_templates/addons/devise/app/models/post.rb +11 -0
- data/after_templates/addons/devise/app/models/user.rb +17 -0
- data/after_templates/addons/devise/app/views/home/index.html.erb +40 -0
- data/after_templates/addons/devise/app/views/layouts/_footer.html.erb +1 -0
- data/after_templates/addons/devise/app/views/layouts/_navbar.html.erb +10 -0
- data/after_templates/addons/devise/app/views/layouts/application.html.erb +38 -0
- data/after_templates/addons/devise/app/views/posts/_form.html.erb +27 -0
- data/after_templates/addons/devise/app/views/posts/_post.html.erb +14 -0
- data/after_templates/addons/devise/app/views/posts/index.html.erb +12 -0
- data/after_templates/addons/devise/app/views/posts/show.html.erb +8 -0
- data/after_templates/addons/devise/db/seeds.rb +11 -0
- data/after_templates/rag/devise/_.rb +14 -17
- data/after_templates/rag/devise/app/controllers/home_controller.rb +4 -0
- data/after_templates/rag/devise/{post → app/controllers}/posts_controller.rb +0 -0
- data/after_templates/rag/devise/{post → app/models}/post.rb +0 -0
- data/after_templates/rag/devise/app/views/home/index.html.erb +3 -0
- data/after_templates/rag/devise/app/views/layouts/_footer.html.erb +3 -0
- data/after_templates/rag/devise/app/views/layouts/_navbar.html.erb +8 -0
- data/after_templates/rag/devise/app/views/layouts/application.html.erb +24 -0
- data/after_templates/rag/devise/{post → app/views/post}/_post.html.erb +0 -0
- data/after_templates/rag/test/_.rb +64 -0
- data/after_templates/rag/test/app/controllers/home_controller.rb +4 -0
- data/after_templates/rag/test/app/views/home/index.html.erb +3 -0
- data/after_templates/rag/test/app/views/layouts/_footer.html.erb +1 -0
- data/after_templates/rag/test/app/views/layouts/_navbar.html.erb +5 -0
- data/after_templates/rag/test/app/views/layouts/application.html.erb +29 -0
- data/after_templates/rag/test/db/seeds.rb +7 -0
- data/after_templates/rag/testy/_.rb +64 -0
- data/after_templates/rag/testy/app/controllers/home_controller.rb +4 -0
- data/after_templates/rag/testy/app/views/home/index.html.erb +3 -0
- data/after_templates/rag/testy/app/views/layouts/_footer.html.erb +1 -0
- data/after_templates/rag/testy/app/views/layouts/_navbar.html.erb +5 -0
- data/after_templates/rag/testy/app/views/layouts/application.html.erb +29 -0
- data/after_templates/rag/testy/db/seeds.rb +7 -0
- data/lib/rails_app_generator/addon.rb +20 -2
- data/lib/rails_app_generator/addons/devise.rb +111 -0
- data/lib/rails_app_generator/addons/devise_old.rb +1 -40
- data/lib/rails_app_generator/app_generator.rb +9 -1
- data/lib/rails_app_generator/gem_query.rb +34 -0
- data/lib/rails_app_generator/rag_initializer.rb +1 -0
- data/lib/rails_app_generator/version.rb +1 -1
- data/lib/rails_app_generator.rb +1 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- data/profiles/addons/devise.json +16 -0
- data/profiles/rag/testy.json +12 -0
- data/tasks/addon.thor +7 -3
- data/tasks/profile.thor +3 -3
- data/templates/Gemfile.erb +1 -0
- data/{after_templates/rag/devise/turbo_controller.rb → templates/addons/devise/app/controllers/turbo_devise_controller.rb} +4 -10
- data/templates/addons/devise/app/controllers/users/registrations_controller.rb +62 -0
- data/templates/addons/devise/app/views/devise/registrations/edit.html.erb +40 -54
- data/templates/addons/devise/app/views/devise/registrations/new.html.erb +32 -43
- data/templates/addons/devise/app/views/layouts/_alerts.html.erb +2 -0
- data/{after_templates/rag → templates/addons}/devise/config/initializers/devise_turbo.rb +1 -1
- data/templates/thor_task/profile/after_template.rb +1 -1
- data/templates/thor_task/profile/app/views/layouts/_footer.html.erb.tt +1 -3
- data/templates/thor_task/profile/app/views/layouts/_navbar.html.erb +5 -8
- data/templates/thor_task/profile/app/views/layouts/application.html.erb.tt +8 -2
- data/templates/thor_task/profile/db/seeds.rb +2 -11
- metadata +46 -17
- data/after_templates/rag/devise/application.html.erb +0 -20
- data/tasks/gem_info.rb +0 -47
- data/templates/addons/devise/app/views/devise/confirmations/new.html.erb +0 -24
- data/templates/addons/devise/app/views/devise/passwords/edit.html.erb +0 -34
- data/templates/addons/devise/app/views/devise/passwords/new.html.erb +0 -23
- data/templates/addons/devise/app/views/devise/sessions/new.html.erb +0 -33
- data/templates/addons/devise/app/views/devise/shared/_error_messages.html.erb +0 -15
- data/templates/addons/devise/app/views/devise/shared/_form_wrap.html.erb +0 -5
- data/templates/addons/devise/app/views/devise/shared/_links.html.erb +0 -25
- data/templates/addons/devise/app/views/devise/unlocks/new.html.erb +0 -22
@@ -1,62 +1,48 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
<%=
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<%= f.email_field :email, autocomplete: "email", class:"input" %>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div class="input-group">
|
19
|
-
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
20
|
-
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
21
|
-
<% end %>
|
22
|
-
</div>
|
23
|
-
|
24
|
-
<div class="input-group">
|
25
|
-
<%= f.label :password, class:"label" %>
|
26
|
-
<%= f.password_field :password, autocomplete: "new-password", class:"input" %>
|
27
|
-
<p class="pt-1 text-sm italic text-grey-dark"> <% if @minimum_password_length %>
|
28
|
-
<%= @minimum_password_length %> characters minimum <% end %> (leave blank if you don't want to change it) </p>
|
29
|
-
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div class="input-group">
|
33
|
-
<%= f.label :password_confirmation, class: "label" %>
|
34
|
-
<%= f.password_field :password_confirmation, autocomplete: "new-password", class: "input" %>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
<div class="input-group">
|
38
|
-
<%= f.label :current_password, class: "label" %>
|
39
|
-
<%= f.password_field :current_password, autocomplete: "current-password", class: "input" %>
|
40
|
-
<p class="pt-2 text-sm italic text-grey-dark">(we need your current password to confirm your changes)</p>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div class="input-group">
|
44
|
-
<%= f.submit "Update", class: "btn btn-default" %>
|
45
|
-
</div>
|
46
|
-
<% end %>
|
1
|
+
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
4
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :name %><br />
|
8
|
+
<%= f.text_field :name, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="field">
|
12
|
+
<%= f.label :email %><br />
|
13
|
+
<%= f.email_field :email, autocomplete: "email" %>
|
14
|
+
</div>
|
47
15
|
|
48
|
-
|
16
|
+
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
17
|
+
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
18
|
+
<% end %>
|
49
19
|
|
50
|
-
<
|
20
|
+
<div class="field">
|
21
|
+
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
22
|
+
<%= f.password_field :password, autocomplete: "new-password" %>
|
23
|
+
<% if @minimum_password_length %>
|
24
|
+
<br />
|
25
|
+
<em><%= @minimum_password_length %> characters minimum</em>
|
26
|
+
<% end %>
|
27
|
+
</div>
|
51
28
|
|
52
|
-
<div class="
|
53
|
-
|
54
|
-
|
55
|
-
|
29
|
+
<div class="field">
|
30
|
+
<%= f.label :password_confirmation %><br />
|
31
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
32
|
+
</div>
|
56
33
|
|
57
|
-
|
34
|
+
<div class="field">
|
35
|
+
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
36
|
+
<%= f.password_field :current_password, autocomplete: "current-password" %>
|
58
37
|
</div>
|
59
38
|
|
39
|
+
<div class="actions">
|
40
|
+
<%= f.submit "Update" %>
|
41
|
+
</div>
|
60
42
|
<% end %>
|
61
43
|
|
62
|
-
|
44
|
+
<h3>Cancel my account</h3>
|
45
|
+
|
46
|
+
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
|
47
|
+
|
48
|
+
<%= link_to "Back", :back %>
|
@@ -1,45 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<div class="input-group">
|
34
|
-
<%= f.submit "Sign up", class: "btn btn-default" %>
|
35
|
-
</div>
|
36
|
-
|
37
|
-
<hr class="mt-6 border" />
|
38
|
-
|
39
|
-
<% end %>
|
40
|
-
|
41
|
-
<%= render "devise/shared/links" %>
|
42
|
-
|
1
|
+
<h2>Sign up</h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
4
|
+
<%= render "devise/shared/error_messages", resource: resource %>
|
5
|
+
|
6
|
+
<div class="field">
|
7
|
+
<%= f.label :name %><br />
|
8
|
+
<%= f.text_field :name, autofocus: true %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="field">
|
12
|
+
<%= f.label :email %><br />
|
13
|
+
<%= f.email_field :email, autocomplete: "email" %>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="field">
|
17
|
+
<%= f.label :password %>
|
18
|
+
<% if @minimum_password_length %>
|
19
|
+
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
20
|
+
<% end %><br />
|
21
|
+
<%= f.password_field :password, autocomplete: "new-password" %>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<div class="field">
|
25
|
+
<%= f.label :password_confirmation %><br />
|
26
|
+
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="actions">
|
30
|
+
<%= f.submit "Sign up" %>
|
31
|
+
</div>
|
43
32
|
<% end %>
|
44
33
|
|
45
|
-
<%= render "devise/shared/
|
34
|
+
<%= render "devise/shared/links" %>
|
@@ -19,7 +19,7 @@ end
|
|
19
19
|
Devise.setup do |config|
|
20
20
|
# ==> Controller configuration
|
21
21
|
# Configure the parent class to the devise controllers.
|
22
|
-
config.parent_controller = '
|
22
|
+
config.parent_controller = 'TurboDeviseController'
|
23
23
|
|
24
24
|
config.navigational_formats = ['*/*', :html, :turbo_stream]
|
25
25
|
|
@@ -28,7 +28,7 @@ after_bundle do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def setup_db
|
31
|
-
# add_scaffold('post', 'title', 'body:text')
|
31
|
+
# add_scaffold('post', 'title', 'body:text', 'user:references')
|
32
32
|
# add_scaffold('people', 'first_name', 'last_name', 'age:integer', 'address:text')
|
33
33
|
# add_scaffold('product', 'name', 'price:integer')
|
34
34
|
|
@@ -1,8 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%# link_to 'People', people_path %>
|
7
|
-
<hr />
|
8
|
-
</header>
|
1
|
+
<%= link_to 'Home', root_path %>
|
2
|
+
<%# link_to 'Products', products_path %>
|
3
|
+
<%# link_to 'Posts', posts_path %>
|
4
|
+
<%# link_to 'People', people_path %>
|
5
|
+
<hr />
|
@@ -14,10 +14,16 @@
|
|
14
14
|
</head>
|
15
15
|
|
16
16
|
<body>
|
17
|
-
|
17
|
+
<header>
|
18
|
+
<%%= render 'layouts/navbar' %>
|
19
|
+
<hr />
|
20
|
+
</header>
|
18
21
|
<main>
|
19
22
|
<%%= yield %>
|
20
23
|
</main>
|
21
|
-
|
24
|
+
<footer>
|
25
|
+
<%%= render 'layouts/footer' %>
|
26
|
+
</footer>
|
22
27
|
</body>
|
23
28
|
</html>
|
29
|
+
|
@@ -1,15 +1,6 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
|
3
|
-
#
|
4
|
-
# User.find_or_create_by(email: "admin@admin.com") do |user|
|
5
|
-
# user.name = 'Admin'
|
6
|
-
# user.password = 'password'
|
7
|
-
# user.admin = true
|
8
|
-
# end
|
9
|
-
|
10
1
|
# david = User.create(email: 'david@site.com', name: 'david', password: 'password')
|
11
|
-
#
|
12
|
-
#
|
2
|
+
# james = User.create(email: 'james@site.com', name: 'james', password: 'password')
|
3
|
+
# sally = User.create(email: 'sally@site.com', name: 'sally', password: 'password')
|
13
4
|
|
14
5
|
# 10.times do |i|
|
15
6
|
# Post.create(title: "Post #{i}", body: "This is the body of post #{i}", user: User.all.sample)
|
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.
|
4
|
+
version: 0.2.23
|
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-
|
11
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootsnap
|
@@ -237,6 +237,20 @@ files:
|
|
237
237
|
- after_templates/addons/chartkick/app/views/people/_person.html.erb
|
238
238
|
- after_templates/addons/chartkick/config/initializers/chartkick.rb
|
239
239
|
- after_templates/addons/chartkick/db/seeds.rb
|
240
|
+
- after_templates/addons/devise/_.rb
|
241
|
+
- after_templates/addons/devise/app/controllers/home_controller.rb
|
242
|
+
- after_templates/addons/devise/app/controllers/posts_controller.rb
|
243
|
+
- after_templates/addons/devise/app/models/post.rb
|
244
|
+
- after_templates/addons/devise/app/models/user.rb
|
245
|
+
- after_templates/addons/devise/app/views/home/index.html.erb
|
246
|
+
- after_templates/addons/devise/app/views/layouts/_footer.html.erb
|
247
|
+
- after_templates/addons/devise/app/views/layouts/_navbar.html.erb
|
248
|
+
- after_templates/addons/devise/app/views/layouts/application.html.erb
|
249
|
+
- after_templates/addons/devise/app/views/posts/_form.html.erb
|
250
|
+
- after_templates/addons/devise/app/views/posts/_post.html.erb
|
251
|
+
- after_templates/addons/devise/app/views/posts/index.html.erb
|
252
|
+
- after_templates/addons/devise/app/views/posts/show.html.erb
|
253
|
+
- after_templates/addons/devise/db/seeds.rb
|
240
254
|
- after_templates/addons/dotenv/_.rb
|
241
255
|
- after_templates/addons/dotenv/app/controllers/home_controller.rb
|
242
256
|
- after_templates/addons/dotenv/app/views/home/index.html.erb
|
@@ -410,18 +424,20 @@ files:
|
|
410
424
|
- after_templates/rag/bootstrap/custom-using-scss.scss
|
411
425
|
- after_templates/rag/bootstrap/manifest.js
|
412
426
|
- after_templates/rag/devise/_.rb
|
413
|
-
- after_templates/rag/devise/
|
427
|
+
- after_templates/rag/devise/app/controllers/home_controller.rb
|
428
|
+
- after_templates/rag/devise/app/controllers/posts_controller.rb
|
429
|
+
- after_templates/rag/devise/app/models/post.rb
|
430
|
+
- after_templates/rag/devise/app/views/home/index.html.erb
|
431
|
+
- after_templates/rag/devise/app/views/layouts/_footer.html.erb
|
432
|
+
- after_templates/rag/devise/app/views/layouts/_navbar.html.erb
|
433
|
+
- after_templates/rag/devise/app/views/layouts/application.html.erb
|
434
|
+
- after_templates/rag/devise/app/views/post/_post.html.erb
|
414
435
|
- after_templates/rag/devise/application_controller.rb
|
415
|
-
- after_templates/rag/devise/config/initializers/devise_turbo.rb
|
416
436
|
- after_templates/rag/devise/layouts/_alerts.html.erb
|
417
437
|
- after_templates/rag/devise/layouts/_footer.html.erb
|
418
438
|
- after_templates/rag/devise/layouts/_navbar.html.erb
|
419
439
|
- after_templates/rag/devise/layouts/application.html.erb
|
420
|
-
- after_templates/rag/devise/post/_post.html.erb
|
421
|
-
- after_templates/rag/devise/post/post.rb
|
422
|
-
- after_templates/rag/devise/post/posts_controller.rb
|
423
440
|
- after_templates/rag/devise/seed_data.rb
|
424
|
-
- after_templates/rag/devise/turbo_controller.rb
|
425
441
|
- after_templates/rag/devise/user.rb
|
426
442
|
- after_templates/rag/import_map/_.rb
|
427
443
|
- after_templates/rag/import_map/component-sortable.html
|
@@ -493,6 +509,20 @@ files:
|
|
493
509
|
- after_templates/rag/tailwind_hotwire_form_search/show.html.erb
|
494
510
|
- after_templates/rag/tailwind_hotwire_form_search/theme_changer_controller.js
|
495
511
|
- after_templates/rag/tailwind_hotwire_form_search/update.turbo_stream.erb
|
512
|
+
- after_templates/rag/test/_.rb
|
513
|
+
- after_templates/rag/test/app/controllers/home_controller.rb
|
514
|
+
- after_templates/rag/test/app/views/home/index.html.erb
|
515
|
+
- after_templates/rag/test/app/views/layouts/_footer.html.erb
|
516
|
+
- after_templates/rag/test/app/views/layouts/_navbar.html.erb
|
517
|
+
- after_templates/rag/test/app/views/layouts/application.html.erb
|
518
|
+
- after_templates/rag/test/db/seeds.rb
|
519
|
+
- after_templates/rag/testy/_.rb
|
520
|
+
- after_templates/rag/testy/app/controllers/home_controller.rb
|
521
|
+
- after_templates/rag/testy/app/views/home/index.html.erb
|
522
|
+
- after_templates/rag/testy/app/views/layouts/_footer.html.erb
|
523
|
+
- after_templates/rag/testy/app/views/layouts/_navbar.html.erb
|
524
|
+
- after_templates/rag/testy/app/views/layouts/application.html.erb
|
525
|
+
- after_templates/rag/testy/db/seeds.rb
|
496
526
|
- app:template
|
497
527
|
- bin/console
|
498
528
|
- bin/setup
|
@@ -524,6 +554,7 @@ files:
|
|
524
554
|
- lib/rails_app_generator/addons/browser.rb
|
525
555
|
- lib/rails_app_generator/addons/chartkick.rb
|
526
556
|
- lib/rails_app_generator/addons/continuous_integration.rb
|
557
|
+
- lib/rails_app_generator/addons/devise.rb
|
527
558
|
- lib/rails_app_generator/addons/devise_old.rb
|
528
559
|
- lib/rails_app_generator/addons/docker.rb
|
529
560
|
- lib/rails_app_generator/addons/docker_compose.rb
|
@@ -571,6 +602,7 @@ files:
|
|
571
602
|
- lib/rails_app_generator/diff/processor.rb
|
572
603
|
- lib/rails_app_generator/diff/report.rb
|
573
604
|
- lib/rails_app_generator/formatted_gem_entry.rb
|
605
|
+
- lib/rails_app_generator/gem_query.rb
|
574
606
|
- lib/rails_app_generator/notes/commands-list.txt
|
575
607
|
- lib/rails_app_generator/notes/methods-class.txt
|
576
608
|
- lib/rails_app_generator/notes/methods-instance.txt
|
@@ -598,6 +630,7 @@ files:
|
|
598
630
|
- profiles/addons/bcrypt.json
|
599
631
|
- profiles/addons/browser.json
|
600
632
|
- profiles/addons/chartkick.json
|
633
|
+
- profiles/addons/devise.json
|
601
634
|
- profiles/addons/dotenv.json
|
602
635
|
- profiles/addons/faker.json
|
603
636
|
- profiles/addons/hexapdf.json
|
@@ -624,9 +657,9 @@ files:
|
|
624
657
|
- profiles/rag/tailwind-hotwire-form.json
|
625
658
|
- profiles/rag/tailwind-hotwire.json
|
626
659
|
- profiles/rag/tailwind.json
|
660
|
+
- profiles/rag/testy.json
|
627
661
|
- sig/rails_app_generator.rbs
|
628
662
|
- tasks/addon.thor
|
629
|
-
- tasks/gem_info.rb
|
630
663
|
- tasks/profile.thor
|
631
664
|
- templates/Gemfile-original-r7
|
632
665
|
- templates/Gemfile-original-schienenzeppelin.erb
|
@@ -635,16 +668,12 @@ files:
|
|
635
668
|
- templates/README.md.erb
|
636
669
|
- templates/addons/annotate/auto_annotate_models.rake
|
637
670
|
- templates/addons/continuous_integration/.github/workflows/build.yml.erb
|
638
|
-
- templates/addons/devise/app/
|
639
|
-
- templates/addons/devise/app/
|
640
|
-
- templates/addons/devise/app/views/devise/passwords/new.html.erb
|
671
|
+
- templates/addons/devise/app/controllers/turbo_devise_controller.rb
|
672
|
+
- templates/addons/devise/app/controllers/users/registrations_controller.rb
|
641
673
|
- templates/addons/devise/app/views/devise/registrations/edit.html.erb
|
642
674
|
- templates/addons/devise/app/views/devise/registrations/new.html.erb
|
643
|
-
- templates/addons/devise/app/views/
|
644
|
-
- templates/addons/devise/
|
645
|
-
- templates/addons/devise/app/views/devise/shared/_form_wrap.html.erb
|
646
|
-
- templates/addons/devise/app/views/devise/shared/_links.html.erb
|
647
|
-
- templates/addons/devise/app/views/devise/unlocks/new.html.erb
|
675
|
+
- templates/addons/devise/app/views/layouts/_alerts.html.erb
|
676
|
+
- templates/addons/devise/config/initializers/devise_turbo.rb
|
648
677
|
- templates/addons/docker/.dockerignore.erb
|
649
678
|
- templates/addons/docker/Dockerfile.erb
|
650
679
|
- templates/addons/docker_compose/docker-compose.yml.erb
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Devise</title>
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<%= csrf_meta_tags %>
|
7
|
-
<%= csp_meta_tag %>
|
8
|
-
|
9
|
-
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
10
|
-
</head>
|
11
|
-
|
12
|
-
<body>
|
13
|
-
<%= render 'layouts/navbar' %>
|
14
|
-
<main>
|
15
|
-
<%= render 'layouts/alerts' %>
|
16
|
-
<%= yield %>
|
17
|
-
</main>
|
18
|
-
<%= render 'layouts/footer' %>
|
19
|
-
</body>
|
20
|
-
</html>
|
data/tasks/gem_info.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Retrieve GemInfo from RubyGems.org
|
4
|
-
class GemInfo
|
5
|
-
attr_reader :name
|
6
|
-
attr_reader :version
|
7
|
-
attr_reader :description
|
8
|
-
|
9
|
-
def initialize(name, version, description)
|
10
|
-
@name = name
|
11
|
-
@version = version
|
12
|
-
@description = description
|
13
|
-
end
|
14
|
-
|
15
|
-
def debug
|
16
|
-
puts "name: #{name}"
|
17
|
-
puts "version: #{version}"
|
18
|
-
puts "description: #{description}"
|
19
|
-
end
|
20
|
-
|
21
|
-
class << self
|
22
|
-
def get(name)
|
23
|
-
gem_info = query_ruby_gems(name)
|
24
|
-
|
25
|
-
return gem_info if gem_info
|
26
|
-
|
27
|
-
return query_ruby_gems(name.gsub('_', '-')) if name.include?('_')
|
28
|
-
return query_ruby_gems(name.gsub('-', '_')) if name.include?('-')
|
29
|
-
|
30
|
-
abort "Cannot find GEM (#{name}) on RubyGems.org"
|
31
|
-
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
def query_ruby_gems(name)
|
36
|
-
link = "https://rubygems.org/api/v1/gems/#{name.downcase}.json"
|
37
|
-
info = Net::HTTP.get(URI.parse(link))
|
38
|
-
json = JSON.parse(info)
|
39
|
-
|
40
|
-
new(json['name'], json['version'], json['info'])
|
41
|
-
rescue SocketError
|
42
|
-
abort 'Internet connection cannot be established to RubyGems.org'
|
43
|
-
rescue JSON::ParserError
|
44
|
-
nil
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
@@ -1,24 +0,0 @@
|
|
1
|
-
<% content_for :devise_form do %>
|
2
|
-
|
3
|
-
<h2 class="pt-4 mb-8 text-4xl font-bold heading">Resend confirmation instructions</h2>
|
4
|
-
|
5
|
-
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
6
|
-
<%= render "devise/shared/error_messages", resource: resource %>
|
7
|
-
|
8
|
-
<div class="input-group">
|
9
|
-
<%= f.label :email, class: "label" %>
|
10
|
-
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: "input" %>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="input-group">
|
14
|
-
<%= f.submit "Resend confirmation instructions", class: "btn btn-default" %>
|
15
|
-
</div>
|
16
|
-
<% end %>
|
17
|
-
|
18
|
-
<hr class="mt-6 border" />
|
19
|
-
|
20
|
-
<%= render "devise/shared/links" %>
|
21
|
-
|
22
|
-
<% end %>
|
23
|
-
|
24
|
-
<%= render "devise/shared/form_wrap" %>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
<% content_for :devise_form do %>
|
2
|
-
<h2 class="pt-4 mb-8 text-4xl font-bold heading">Change your password</h2>
|
3
|
-
|
4
|
-
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
5
|
-
<%= render "devise/shared/error_messages", resource: resource %>
|
6
|
-
<%= f.hidden_field :reset_password_token %>
|
7
|
-
|
8
|
-
<div class="input-group">
|
9
|
-
<div class="flex">
|
10
|
-
<%= f.label :password, "New password", class:"label" %>
|
11
|
-
<% if @minimum_password_length %>
|
12
|
-
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
13
|
-
<% end %>
|
14
|
-
</div>
|
15
|
-
<%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: "input" %>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div class="input-group">
|
19
|
-
<%= f.label :password_confirmation, "Confirm new password", class: "label" %>
|
20
|
-
<%= f.password_field :password_confirmation, autocomplete: "off", class: "input" %>
|
21
|
-
</div>
|
22
|
-
|
23
|
-
<div class="input-group">
|
24
|
-
<%= f.submit "Change my password", class: "btn btn-default" %>
|
25
|
-
</div>
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<hr class="mt-6 border" />
|
29
|
-
|
30
|
-
<%= render "devise/shared/links" %>
|
31
|
-
|
32
|
-
<% end %>
|
33
|
-
|
34
|
-
<%= render "devise/shared/form_wrap" %>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<% content_for :devise_form do %>
|
2
|
-
|
3
|
-
<h2 class="pt-4 mb-8 text-4xl font-bold heading">Forgot your password?</h2>
|
4
|
-
|
5
|
-
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
6
|
-
<%= render "devise/shared/error_messages", resource: resource %>
|
7
|
-
|
8
|
-
<div class="input-group">
|
9
|
-
<%= f.label :email, class: "label" %>
|
10
|
-
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %>
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div class="input-group">
|
14
|
-
<%= f.submit "Send me reset password instructions", class: "btn btn-default" %>
|
15
|
-
</div>
|
16
|
-
<% end %>
|
17
|
-
|
18
|
-
<hr class="mt-6 border" />
|
19
|
-
|
20
|
-
<%= render "devise/shared/links" %>
|
21
|
-
<% end %>
|
22
|
-
|
23
|
-
<%= render "devise/shared/form_wrap" %>
|
@@ -1,33 +0,0 @@
|
|
1
|
-
<% content_for :devise_form do %>
|
2
|
-
<h2 class="pt-4 mb-8 text-4xl font-bold heading">Log in</h2>
|
3
|
-
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
4
|
-
|
5
|
-
<div class="input-group">
|
6
|
-
<%= f.label :email, class:"label" %>
|
7
|
-
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: "input" %>
|
8
|
-
</div>
|
9
|
-
|
10
|
-
<div class="input-group">
|
11
|
-
<%= f.label :password, class:"label" %>
|
12
|
-
<%= f.password_field :password, autocomplete: "current-password", class: "input" %>
|
13
|
-
</div>
|
14
|
-
|
15
|
-
<div class="mb-6 input-checkbox">
|
16
|
-
<% if devise_mapping.rememberable? -%>
|
17
|
-
<%= f.check_box :remember_me %>
|
18
|
-
<%= f.label :remember_me, class:"label" %>
|
19
|
-
<% end -%>
|
20
|
-
</div>
|
21
|
-
|
22
|
-
<div class="input-group">
|
23
|
-
<%= f.submit "Log in", class: "btn btn-default" %>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<% end %>
|
27
|
-
|
28
|
-
<hr class="mt-6 border" />
|
29
|
-
|
30
|
-
<%= render "devise/shared/links" %>
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
<%= render "devise/shared/form_wrap" %>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<% if resource.errors.any? %>
|
2
|
-
<div id="error_explanation" class="text-red-500">
|
3
|
-
<h2 class="font-semibold text-lg">
|
4
|
-
<%= I18n.t("errors.messages.not_saved",
|
5
|
-
count: resource.errors.count,
|
6
|
-
resource: resource.class.model_name.human.downcase)
|
7
|
-
%>
|
8
|
-
</h2>
|
9
|
-
<ul class="list-none p-0">
|
10
|
-
<% resource.errors.full_messages.each do |message| %>
|
11
|
-
<li><%= message %></li>
|
12
|
-
<% end %>
|
13
|
-
</ul>
|
14
|
-
</div>
|
15
|
-
<% end %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<%- if controller_name != 'sessions' %>
|
2
|
-
<div class="flex flex-wrap"><%= link_to "Log in", new_session_path(resource_name), class: "block py-2 text-gray-700 underline hover:no-underline" %></div>
|
3
|
-
<% end -%>
|
4
|
-
|
5
|
-
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
-
<%= link_to "Sign up", new_registration_path(resource_name), class: "block py-2 text-gray-700 underline hover:no-underline" %>
|
7
|
-
<% end -%>
|
8
|
-
|
9
|
-
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
10
|
-
<%= link_to "Forgot your password?", new_password_path(resource_name), class: "block py-2 text-gray-700 underline hover:no-underline" %>
|
11
|
-
<% end -%>
|
12
|
-
|
13
|
-
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
-
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: "block py-2 text-gray-700 underline hover:no-underline"%>
|
15
|
-
<% end -%>
|
16
|
-
|
17
|
-
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
-
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: "block py-2 text-gray-700 underline hover:no-underline" %>
|
19
|
-
<% end -%>
|
20
|
-
|
21
|
-
<%- if devise_mapping.omniauthable? %>
|
22
|
-
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
-
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), class: "btn btn-default my-4" %>
|
24
|
-
<% end -%>
|
25
|
-
<% end -%>
|