nopassword 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/nopassword/email_authentications_controller.rb +1 -1
- data/lib/generators/nopassword/install/USAGE +2 -0
- data/lib/generators/nopassword/install/install_generator.rb +16 -14
- data/lib/nopassword/version.rb +1 -1
- data/lib/nopassword.rb +5 -0
- metadata +3 -4
- data/db/test.sqlite3 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37cca4affe70df1979f4400ae30f646a38667fb82ddeec80d8f52d754fcb822b
|
4
|
+
data.tar.gz: 945cedb9bdf4cdd18ba1059039fa31b9cdff0d190f219dd88276dd6a5954697b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0e1d90c7ab684fc2db22dead9f0edd8eadd7c91c3e61c5399f2f887fe8e783c0943e8c25717abac702c1110f102774e34af6c1a9444da56038d36217e0705fe
|
7
|
+
data.tar.gz: 7077c5b9919eb2bd59709866fe00f79b6503fd4a265c66d31520948a24baddeedb19f51937a2d55ce3030fc3c8552f526a7ca33e5b570462fa034da34bd508bb
|
@@ -17,7 +17,7 @@ class NoPassword::EmailAuthenticationsController < ApplicationController
|
|
17
17
|
if @email_authentication.valid?
|
18
18
|
deliver_authentication @email_authentication
|
19
19
|
@verification = @email_authentication.verification
|
20
|
-
render :edit
|
20
|
+
render :edit, status: :accepted
|
21
21
|
else
|
22
22
|
render :new, status: :unprocessable_entity
|
23
23
|
end
|
@@ -1,20 +1,22 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
module Nopassword
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path("templates", __dir__)
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
def copy_controller_file
|
6
|
+
copy_file "controller.rb", "app/controllers/email_authentications_controller.rb"
|
7
|
+
end
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def copy_view_files
|
10
|
+
directory NoPassword.root.join("app/views/nopassword/email_authentication_mailer"), 'app/views/email_authentication_mailer'
|
11
|
+
directory NoPassword.root.join("app/views/nopassword/email_authentications"), 'app/views/email_authentications'
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
15
|
-
|
14
|
+
def add_nopassword_routes
|
15
|
+
route "resource :email_authentication"
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
18
|
+
def copy_migration_file
|
19
|
+
rake "nopassword_engine:install:migrations"
|
20
|
+
end
|
19
21
|
end
|
20
22
|
end
|
data/lib/nopassword/version.rb
CHANGED
data/lib/nopassword.rb
CHANGED
@@ -10,3 +10,8 @@ module NoPassword
|
|
10
10
|
end
|
11
11
|
|
12
12
|
require "nopassword/engine"
|
13
|
+
|
14
|
+
# Blurg, without this require, the inflector won't properly inflect the `nopassword_engine:install:migrations`
|
15
|
+
# task from the `rails g install nopassword:install` task.
|
16
|
+
require_relative "../config/initializers/inflections.rb"
|
17
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nopassword
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Gessler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -67,7 +67,6 @@ files:
|
|
67
67
|
- config/initializers/inflections.rb
|
68
68
|
- config/routes.rb
|
69
69
|
- db/migrate/20220210203235_create_nopassword_secrets.rb
|
70
|
-
- db/test.sqlite3
|
71
70
|
- lib/generators/nopassword/install/USAGE
|
72
71
|
- lib/generators/nopassword/install/install_generator.rb
|
73
72
|
- lib/generators/nopassword/install/templates/controller.rb
|
@@ -100,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
99
|
- !ruby/object:Gem::Version
|
101
100
|
version: '0'
|
102
101
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
102
|
+
rubygems_version: 3.3.7
|
104
103
|
signing_key:
|
105
104
|
specification_version: 4
|
106
105
|
summary: Passwordless login to Rails applications via email
|
data/db/test.sqlite3
DELETED
Binary file
|