nyauth 0.2.0 → 0.2.1
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/README.md +8 -5
- data/app/models/concerns/nyauth/authenticatable.rb +2 -0
- data/config/routes.rb +1 -2
- data/lib/nyauth/route.rb +1 -3
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +1146 -0
- data/spec/helpers/nyauth/application_helper_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7b92e040021887635fc5cd0c21427d7afc72a3
|
4
|
+
data.tar.gz: 489d0039f87c0481e739cbe48d9106a74091ae5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb13e17f77ddab00ead54b2f455662c09f21bdc5980a945358e2a61833f7ba1416bb0ecd8feb6053c0916b3fcc38966a02c44229c0d42aac64e634382bfacd3c
|
7
|
+
data.tar.gz: 91814e70d9698c204632932ecdbc142dfd16c6dbde8caa1187307d0b54bca9f865446404eb60607f998972781307375860fedbf70d07dcb40e4c2d6b085183a8
|
data/README.md
CHANGED
@@ -16,15 +16,17 @@ end
|
|
16
16
|
class CreateUsers < ActiveRecord::Migration
|
17
17
|
def change
|
18
18
|
create_table :users do |t|
|
19
|
+
t.string :nickname
|
20
|
+
# Authenticatable
|
19
21
|
t.string :email, null: false
|
20
22
|
t.string :password_digest, null: false
|
21
23
|
t.string :password_salt, null: false
|
22
|
-
t.string :
|
24
|
+
t.string :reset_password_key
|
25
|
+
t.datetime :reset_password_key_expired_at
|
26
|
+
# Confirmable
|
23
27
|
t.datetime :confirmed_at
|
24
28
|
t.string :confirmation_key
|
25
29
|
t.datetime :confirmation_key_expired_at
|
26
|
-
t.string :reset_password_key
|
27
|
-
t.datetime :reset_password_key_expired_at
|
28
30
|
|
29
31
|
t.timestamps null: false
|
30
32
|
end
|
@@ -39,7 +41,6 @@ end
|
|
39
41
|
class User < ActiveRecord::Base
|
40
42
|
include Nyauth::Authenticatable
|
41
43
|
include Nyauth::Confirmable
|
42
|
-
include Nyauth::ResetPasswordAbility
|
43
44
|
end
|
44
45
|
```
|
45
46
|
|
@@ -49,7 +50,9 @@ end
|
|
49
50
|
Rails.application.routes.draw do
|
50
51
|
# for admin
|
51
52
|
namespace :nyauth, path: :admin, as: :admin do
|
52
|
-
concerns :
|
53
|
+
# concerns :nyauth_registrable
|
54
|
+
concerns :nyauth_authenticatable
|
55
|
+
# concerns :nyauth_confirmable
|
53
56
|
end
|
54
57
|
|
55
58
|
# for user
|
data/config/routes.rb
CHANGED
data/lib/nyauth/route.rb
CHANGED
@@ -4,10 +4,8 @@ module Nyauth
|
|
4
4
|
concern :nyauth_registrable do
|
5
5
|
resource :registration, only: %i(new create)
|
6
6
|
end
|
7
|
-
concern :
|
7
|
+
concern :nyauth_authenticatable do
|
8
8
|
resource :session, only: %i(new create destroy)
|
9
|
-
end
|
10
|
-
concern :nyauth_passwordable do
|
11
9
|
resource :password, only: %i(edit update)
|
12
10
|
resources :reset_password_requests, only: %i(new create)
|
13
11
|
resources :reset_passwords, param: :reset_password_key, only: %i(edit update)
|
data/lib/nyauth/version.rb
CHANGED
data/spec/dummy/config/routes.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|