nyauth 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b37fe2ddb1f31d171ed9083a2636a017a4daefb6
4
- data.tar.gz: 9431cfde95b22cec162714428b27cf12086ccff8
3
+ metadata.gz: 8f7b92e040021887635fc5cd0c21427d7afc72a3
4
+ data.tar.gz: 489d0039f87c0481e739cbe48d9106a74091ae5f
5
5
  SHA512:
6
- metadata.gz: 452e765e5ca2dd88ddc78aa2054bf247dd0ea112eae083ced3519b4b32a005cbcba8d04865f1833b0067ffbca29db9496df32c6cb69fb1be0e993649b6082005
7
- data.tar.gz: 19b672d5832eaa21dfc9df82a3bdf8e5cc12c7476eaba4e2fa33c589a53a8de3d33a614b0cd303b008a807f26a6a494fa59a96cb59a92b28c6d00796f9ceb8ea
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 :nickname
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 :nyauth_sessionable
53
+ # concerns :nyauth_registrable
54
+ concerns :nyauth_authenticatable
55
+ # concerns :nyauth_confirmable
53
56
  end
54
57
 
55
58
  # for user
@@ -2,6 +2,8 @@ module Nyauth
2
2
  module Authenticatable
3
3
  extend ActiveSupport::Concern
4
4
  include Nyauth::PasswordDigestAbility
5
+ include Nyauth::ResetPasswordAbility
6
+
5
7
 
6
8
  included do
7
9
  validates :email, presence: true
data/config/routes.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  Nyauth::Engine.routes.draw do
2
2
  concerns :nyauth_registrable
3
- concerns :nyauth_sessionable
4
- concerns :nyauth_passwordable
3
+ concerns :nyauth_authenticatable
5
4
  concerns :nyauth_confirmable
6
5
  Nyauth.configuration.setup_redirect_path
7
6
  end
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 :nyauth_sessionable do
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)
@@ -1,3 +1,3 @@
1
1
  module Nyauth
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  Rails.application.routes.draw do
2
2
  namespace :nyauth, path: :admin, as: :admin do
3
- concerns :nyauth_sessionable
3
+ concerns :nyauth_authenticatable
4
4
  end
5
5
  mount Nyauth::Engine, at: '/', as: :nyauth
6
6
 
Binary file