nyauth 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +70 -0
- data/app/controllers/nyauth/base_controller.rb +5 -0
- data/app/controllers/nyauth/confirmation_requests_controller.rb +1 -1
- data/app/controllers/nyauth/confirmations_controller.rb +1 -1
- data/app/controllers/nyauth/new_password_requests_controller.rb +1 -1
- data/app/controllers/nyauth/new_passwords_controller.rb +1 -1
- data/app/controllers/nyauth/passwords_controller.rb +1 -1
- data/app/controllers/nyauth/registrations_controller.rb +1 -1
- data/app/controllers/nyauth/sessions_controller.rb +1 -1
- data/app/helpers/nyauth/application_helper.rb +7 -0
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +2485 -0
- data/spec/mailers/nyauth/user_mailer_spec.rb +15 -0
- data/spec/rails_helper.rb +2 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa665b789065b1cb2ce9a772c824d6f2d03c158a
|
4
|
+
data.tar.gz: e6fc77b3c1d8804ee127efb05b2c62f7ad898b43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de301bc13261d9feae6f717b4787de4aac4840ccc2fb48b4853c592c014b34516d35add7db2dd6a9fd013ae62886fb8759cecb14148a10c7825ab4d398cbee34
|
7
|
+
data.tar.gz: 551c3947db51fdc8e5761711654f9c61c053fb0d4be9080f825e8923a861d74c6ef8aa08a1fb827acf03a08c30a011985b9e6d564a48c162f49d64b30f02fd01
|
data/README.md
CHANGED
@@ -1 +1,71 @@
|
|
1
1
|
# Nyauth
|
2
|
+
|
3
|
+
```application_controller
|
4
|
+
class ApplicationController < ActionController::Base
|
5
|
+
include Nyauth::SessionConcern
|
6
|
+
self.responder = Nyauth::AppResponder
|
7
|
+
end
|
8
|
+
```
|
9
|
+
|
10
|
+
```schema
|
11
|
+
class CreateUsers < ActiveRecord::Migration
|
12
|
+
def change
|
13
|
+
create_table :users do |t|
|
14
|
+
t.string :email, null: false
|
15
|
+
t.string :password_digest, null: false
|
16
|
+
t.string :password_salt, null: false
|
17
|
+
t.string :nickname
|
18
|
+
t.datetime :confirmed_at
|
19
|
+
t.string :confirmation_key
|
20
|
+
t.datetime :confirmation_key_expired_at
|
21
|
+
t.string :new_password_key
|
22
|
+
t.datetime :new_password_key_expired_at
|
23
|
+
|
24
|
+
t.timestamps null: false
|
25
|
+
end
|
26
|
+
add_index :users, :email, unique: true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
```model
|
32
|
+
class User < ActiveRecord::Base
|
33
|
+
include Nyauth::Authenticatable
|
34
|
+
include Nyauth::Confirmable
|
35
|
+
include Nyauth::NewPasswordAbility
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
```routes
|
40
|
+
Rails.application.routes.draw do
|
41
|
+
mount Nyauth::Engine => "/"
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
```
|
46
|
+
rake routes
|
47
|
+
```
|
48
|
+
|
49
|
+
```
|
50
|
+
Prefix Verb URI Pattern Controller#Action
|
51
|
+
nyauth /nyauth Nyauth::Engine
|
52
|
+
|
53
|
+
Routes for Nyauth::Engine:
|
54
|
+
registration POST /registration(.:format) nyauth/registrations#create
|
55
|
+
new_registration GET /registration/new(.:format) nyauth/registrations#new
|
56
|
+
session POST /session(.:format) nyauth/sessions#create
|
57
|
+
new_session GET /session/new(.:format) nyauth/sessions#new
|
58
|
+
DELETE /session(.:format) nyauth/sessions#destroy
|
59
|
+
edit_password GET /password/edit(.:format) nyauth/passwords#edit
|
60
|
+
password PATCH /password(.:format) nyauth/passwords#update
|
61
|
+
PUT /password(.:format) nyauth/passwords#update
|
62
|
+
confirmation_requests POST /confirmation_requests(.:format) nyauth/confirmation_requests#create
|
63
|
+
new_confirmation_request GET /confirmation_requests/new(.:format) nyauth/confirmation_requests#new
|
64
|
+
confirmation GET /confirmations/:confirmation_key(.:format) nyauth/confirmations#update
|
65
|
+
new_password_requests POST /new_password_requests(.:format) nyauth/new_password_requests#create
|
66
|
+
new_new_password_request GET /new_password_requests/new(.:format) nyauth/new_password_requests#new
|
67
|
+
edit_new_password GET /new_passwords/:new_password_key/edit(.:format) nyauth/new_passwords#edit
|
68
|
+
new_password PATCH /new_passwords/:new_password_key(.:format) nyauth/new_passwords#update
|
69
|
+
PUT /new_passwords/:new_password_key(.:format) nyauth/new_passwords#update
|
70
|
+
root GET / nyauth/sessions#new
|
71
|
+
```
|
data/lib/nyauth/version.rb
CHANGED
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|