devise_token_auth 0.1.28.beta9 → 0.1.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ class Mang < ActiveRecord::Base
2
+ include DeviseTokenAuth::Concerns::User
3
+ end
@@ -0,0 +1,9 @@
1
+ Rails.application.routes.draw do
2
+ mount_devise_token_auth_for 'User', at: '/auth'
3
+
4
+ mount_devise_token_auth_for 'Mang', at: '/mangs'
5
+ as :mang do
6
+ # Define routes for Mang within this block.
7
+ end
8
+ patch '/chong', to: 'bong#index'
9
+ end
@@ -0,0 +1,56 @@
1
+ class DeviseTokenAuthCreateMangs < ActiveRecord::Migration
2
+ def change
3
+ create_table(:mangs) do |t|
4
+ ## Database authenticatable
5
+ t.string :email
6
+ t.string :encrypted_password, :null => false, :default => ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+ t.string :reset_password_redirect_url
12
+
13
+ ## Rememberable
14
+ t.datetime :remember_created_at
15
+
16
+ ## Trackable
17
+ t.integer :sign_in_count, :default => 0, :null => false
18
+ t.datetime :current_sign_in_at
19
+ t.datetime :last_sign_in_at
20
+ t.string :current_sign_in_ip
21
+ t.string :last_sign_in_ip
22
+
23
+ ## Confirmable
24
+ t.string :confirmation_token
25
+ t.datetime :confirmed_at
26
+ t.datetime :confirmation_sent_at
27
+ t.string :confirm_success_url
28
+ t.string :unconfirmed_email # Only if using reconfirmable
29
+
30
+ ## Lockable
31
+ # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
32
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
33
+ # t.datetime :locked_at
34
+
35
+ ## User Info
36
+ t.string :name
37
+ t.string :nickname
38
+ t.string :image
39
+
40
+ ## unique oauth id
41
+ t.string :provider
42
+ t.string :uid, :null => false, :default => ""
43
+
44
+ ## Tokens
45
+ t.text :tokens
46
+
47
+ t.timestamps
48
+ end
49
+
50
+ add_index :mangs, :email
51
+ add_index :mangs, :uid, :unique => true
52
+ add_index :mangs, :reset_password_token, :unique => true
53
+ # add_index :mangs, :confirmation_token, :unique => true
54
+ # add_index :mangs, :unlock_token, :unique => true
55
+ end
56
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28.beta9
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-22 00:00:00.000000000 Z
11
+ date: 2014-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -176,17 +176,18 @@ files:
176
176
  - test/dummy/db/migrate/20140916224624_add_favorite_color_to_mangs.rb
177
177
  - test/dummy/db/schema.rb
178
178
  - test/dummy/db/test.sqlite3
179
- - test/dummy/db/test.sqlite3-journal
180
179
  - test/dummy/log/development.log
181
180
  - test/dummy/log/test.log
182
181
  - test/dummy/public/404.html
183
182
  - test/dummy/public/422.html
184
183
  - test/dummy/public/500.html
185
184
  - test/dummy/public/favicon.ico
186
- - test/dummy/tmp/generators/app/controllers/application_controller.rb
185
+ - test/dummy/tmp/generators/app/models/mang.rb
187
186
  - test/dummy/tmp/generators/app/models/user.rb
188
187
  - test/dummy/tmp/generators/config/initializers/devise_token_auth.rb
189
- - test/dummy/tmp/generators/db/migrate/20140922164332_devise_token_auth_create_users.rb
188
+ - test/dummy/tmp/generators/config/routes.rb
189
+ - test/dummy/tmp/generators/db/migrate/20140924174608_devise_token_auth_create_mangs.rb
190
+ - test/dummy/tmp/generators/db/migrate/20140924174608_devise_token_auth_create_users.rb
190
191
  - test/dummy/tmp/restart.txt
191
192
  - test/fixtures/mangs.yml
192
193
  - test/fixtures/users.yml
@@ -209,9 +210,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
209
210
  version: '0'
210
211
  required_rubygems_version: !ruby/object:Gem::Requirement
211
212
  requirements:
212
- - - ">"
213
+ - - ">="
213
214
  - !ruby/object:Gem::Version
214
- version: 1.3.1
215
+ version: '0'
215
216
  requirements: []
216
217
  rubyforge_project:
217
218
  rubygems_version: 2.2.2
@@ -274,7 +275,6 @@ test_files:
274
275
  - test/dummy/db/migrate/20140916224624_add_favorite_color_to_mangs.rb
275
276
  - test/dummy/db/schema.rb
276
277
  - test/dummy/db/test.sqlite3
277
- - test/dummy/db/test.sqlite3-journal
278
278
  - test/dummy/log/development.log
279
279
  - test/dummy/log/test.log
280
280
  - test/dummy/public/404.html
@@ -283,10 +283,12 @@ test_files:
283
283
  - test/dummy/public/favicon.ico
284
284
  - test/dummy/Rakefile
285
285
  - test/dummy/README.rdoc
286
- - test/dummy/tmp/generators/app/controllers/application_controller.rb
286
+ - test/dummy/tmp/generators/app/models/mang.rb
287
287
  - test/dummy/tmp/generators/app/models/user.rb
288
288
  - test/dummy/tmp/generators/config/initializers/devise_token_auth.rb
289
- - test/dummy/tmp/generators/db/migrate/20140922164332_devise_token_auth_create_users.rb
289
+ - test/dummy/tmp/generators/config/routes.rb
290
+ - test/dummy/tmp/generators/db/migrate/20140924174608_devise_token_auth_create_mangs.rb
291
+ - test/dummy/tmp/generators/db/migrate/20140924174608_devise_token_auth_create_users.rb
290
292
  - test/dummy/tmp/restart.txt
291
293
  - test/fixtures/mangs.yml
292
294
  - test/fixtures/users.yml
Binary file
@@ -1,8 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- include DeviseTokenAuth::Concerns::SetUserByToken
3
- respond_to :json
4
-
5
- def whatever
6
- 'whatever'
7
- end
8
- end