authentication-zero 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/authentication_zero/version.rb +1 -1
- data/lib/generators/authentication/authentication_generator.rb +2 -2
- data/lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt +5 -1
- data/lib/generators/authentication/templates/views/{html/cancellations → cancellations}/new.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/password_mailer → password_mailer}/reset.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/password_mailer → password_mailer}/reset.text.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/password_resets → password_resets}/edit.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/password_resets → password_resets}/new.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/passwords → passwords}/edit.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/registrations → registrations}/new.html.erb.tt +0 -0
- data/lib/generators/authentication/templates/views/{html/sessions → sessions}/new.html.erb.tt +0 -0
- metadata +9 -11
- data/lib/generators/authentication/templates/views/api/password_mailer/reset.html.erb.tt +0 -7
- data/lib/generators/authentication/templates/views/api/password_mailer/reset.text.erb.tt +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00f2558085051718c5d29c5aeb4f4f5ebb5daf9d6a165c0f8dd588771b73789a
|
4
|
+
data.tar.gz: c4c548e20a25306b3dc44cc46fd4c5dae7d798a8bce4dc352bf0bce314b33b53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ea2a5b31a39bd3aa1f029c96f5c24791d6df8da63b41384e806ad79887122497e1845c4b509c4caf8414ff48eb1a6830d438c0f6d9b31870fed145999f3d84
|
7
|
+
data.tar.gz: 57b4ff721d9c4af1d30aa50f2495869d31a3a8a0d5017ee3d78d12df257625716e5dad2ba58e05a73c0c8e7a70e42bc519fe6ed77301da6fd58da0a6dddc1395
|
data/Gemfile.lock
CHANGED
@@ -21,7 +21,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
21
21
|
|
22
22
|
def create_views
|
23
23
|
if options.api
|
24
|
-
directory "views/
|
24
|
+
directory "views/password_mailer", "app/views/password_mailer"
|
25
25
|
else
|
26
26
|
directory "views/html", "app/views"
|
27
27
|
end
|
@@ -47,7 +47,7 @@ class AuthenticationGenerator < Rails::Generators::NamedBase
|
|
47
47
|
route "post 'cancellation', to: 'cancellations#destroy'"
|
48
48
|
route "get 'password_reset/new', to: 'password_resets#new'" unless options.api?
|
49
49
|
route "post 'password_reset', to: 'password_resets#create'"
|
50
|
-
route "get 'password_reset/edit', to: 'password_resets#edit'"
|
50
|
+
route "get 'password_reset/edit', to: 'password_resets#edit'"
|
51
51
|
route "patch 'password_reset', to: 'password_resets#update'"
|
52
52
|
route "delete 'sign_out', to: 'sessions#destroy'"
|
53
53
|
end
|
data/lib/generators/authentication/templates/controllers/api/password_resets_controller.rb.tt
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
class PasswordResetsController < ApplicationController
|
2
|
-
before_action :set_<%= singular_table_name %>, only:
|
2
|
+
before_action :set_<%= singular_table_name %>, only: %i[ edit update ]
|
3
3
|
skip_before_action :authenticate
|
4
4
|
|
5
|
+
def edit
|
6
|
+
render json: { message: "Open this link in your device" }, status: :not_found
|
7
|
+
end
|
8
|
+
|
5
9
|
def create
|
6
10
|
if @<%= singular_table_name %> = <%= class_name %>.find_by_email(params[:email])
|
7
11
|
PasswordMailer.with(<%= singular_table_name %>: @<%= singular_table_name %>).reset.deliver_later
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/generators/authentication/templates/views/{html/passwords → passwords}/edit.html.erb.tt
RENAMED
File without changes
|
File without changes
|
data/lib/generators/authentication/templates/views/{html/sessions → sessions}/new.html.erb.tt
RENAMED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentication-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nixon
|
@@ -45,16 +45,14 @@ files:
|
|
45
45
|
- lib/generators/authentication/templates/migration.rb.tt
|
46
46
|
- lib/generators/authentication/templates/models/current.rb.tt
|
47
47
|
- lib/generators/authentication/templates/models/resource.rb.tt
|
48
|
-
- lib/generators/authentication/templates/views/
|
49
|
-
- lib/generators/authentication/templates/views/
|
50
|
-
- lib/generators/authentication/templates/views/
|
51
|
-
- lib/generators/authentication/templates/views/
|
52
|
-
- lib/generators/authentication/templates/views/
|
53
|
-
- lib/generators/authentication/templates/views/
|
54
|
-
- lib/generators/authentication/templates/views/
|
55
|
-
- lib/generators/authentication/templates/views/
|
56
|
-
- lib/generators/authentication/templates/views/html/registrations/new.html.erb.tt
|
57
|
-
- lib/generators/authentication/templates/views/html/sessions/new.html.erb.tt
|
48
|
+
- lib/generators/authentication/templates/views/cancellations/new.html.erb.tt
|
49
|
+
- lib/generators/authentication/templates/views/password_mailer/reset.html.erb.tt
|
50
|
+
- lib/generators/authentication/templates/views/password_mailer/reset.text.erb.tt
|
51
|
+
- lib/generators/authentication/templates/views/password_resets/edit.html.erb.tt
|
52
|
+
- lib/generators/authentication/templates/views/password_resets/new.html.erb.tt
|
53
|
+
- lib/generators/authentication/templates/views/passwords/edit.html.erb.tt
|
54
|
+
- lib/generators/authentication/templates/views/registrations/new.html.erb.tt
|
55
|
+
- lib/generators/authentication/templates/views/sessions/new.html.erb.tt
|
58
56
|
homepage: https://github.com/lazaronixon/authentication-zero
|
59
57
|
licenses:
|
60
58
|
- MIT
|