devise_token_auth 0.1.29.beta2 → 0.1.29.beta3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token, config: message['client-config'].to_s, redirect_url: message['redirect-url']) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password. You can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token, config: message['client-config'].to_s, redirect_url: message['redirect-url'].to_s) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,23 @@
1
+ require 'test_helper'
2
+ require 'fileutils'
3
+ require 'generators/devise_token_auth/install_views_generator'
4
+
5
+ module DeviseTokenAuth
6
+ class InstallViewsGeneratorTest < Rails::Generators::TestCase
7
+ tests InstallViewsGenerator
8
+ destination Rails.root.join('tmp/generators')
9
+
10
+ describe 'default values, clean install' do
11
+ setup :prepare_destination
12
+
13
+ before do
14
+ run_generator
15
+ end
16
+
17
+ test "files are copied" do
18
+ assert_file 'app/views/devise/mailer/reset_password_instructions.html.erb'
19
+ assert_file 'app/views/devise/mailer/confirmation_instructions.html.erb'
20
+ end
21
+ end
22
+ end
23
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_token_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.29.beta2
4
+ version: 0.1.29.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley
@@ -116,6 +116,7 @@ files:
116
116
  - lib/devise_token_auth/version.rb
117
117
  - lib/generators/devise_token_auth/USAGE
118
118
  - lib/generators/devise_token_auth/install_generator.rb
119
+ - lib/generators/devise_token_auth/install_views_generator.rb
119
120
  - lib/generators/devise_token_auth/templates/devise_token_auth.rb
120
121
  - lib/generators/devise_token_auth/templates/devise_token_auth_create_users.rb.erb
121
122
  - lib/generators/devise_token_auth/templates/user.rb
@@ -197,16 +198,15 @@ files:
197
198
  - test/dummy/public/422.html
198
199
  - test/dummy/public/500.html
199
200
  - test/dummy/public/favicon.ico
200
- - test/dummy/tmp/generators/app/controllers/application_controller.rb
201
- - test/dummy/tmp/generators/app/models/user.rb
202
- - test/dummy/tmp/generators/config/initializers/devise_token_auth.rb
203
- - test/dummy/tmp/generators/db/migrate/20140930041823_devise_token_auth_create_users.rb
201
+ - test/dummy/tmp/generators/app/views/devise/mailer/confirmation_instructions.html.erb
202
+ - test/dummy/tmp/generators/app/views/devise/mailer/reset_password_instructions.html.erb
204
203
  - test/dummy/tmp/restart.txt
205
204
  - test/fixtures/evil_users.yml
206
205
  - test/fixtures/mangs.yml
207
206
  - test/fixtures/users.yml
208
207
  - test/integration/navigation_test.rb
209
208
  - test/lib/generators/devise_token_auth/install_generator_test.rb
209
+ - test/lib/generators/devise_token_auth/install_views_generator_test.rb
210
210
  - test/models/user_test.rb
211
211
  - test/test_helper.rb
212
212
  homepage: http://github.com/lynndylanhurley/devise_token_auth
@@ -311,15 +311,14 @@ test_files:
311
311
  - test/dummy/public/favicon.ico
312
312
  - test/dummy/Rakefile
313
313
  - test/dummy/README.rdoc
314
- - test/dummy/tmp/generators/app/controllers/application_controller.rb
315
- - test/dummy/tmp/generators/app/models/user.rb
316
- - test/dummy/tmp/generators/config/initializers/devise_token_auth.rb
317
- - test/dummy/tmp/generators/db/migrate/20140930041823_devise_token_auth_create_users.rb
314
+ - test/dummy/tmp/generators/app/views/devise/mailer/confirmation_instructions.html.erb
315
+ - test/dummy/tmp/generators/app/views/devise/mailer/reset_password_instructions.html.erb
318
316
  - test/dummy/tmp/restart.txt
319
317
  - test/fixtures/evil_users.yml
320
318
  - test/fixtures/mangs.yml
321
319
  - test/fixtures/users.yml
322
320
  - test/integration/navigation_test.rb
323
321
  - test/lib/generators/devise_token_auth/install_generator_test.rb
322
+ - test/lib/generators/devise_token_auth/install_views_generator_test.rb
324
323
  - test/models/user_test.rb
325
324
  - test/test_helper.rb
@@ -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
@@ -1,3 +0,0 @@
1
- class User < ActiveRecord::Base
2
- include DeviseTokenAuth::Concerns::User
3
- end
@@ -1,22 +0,0 @@
1
- DeviseTokenAuth.setup do |config|
2
- # By default the authorization headers will change after each request. The
3
- # client is responsible for keeping track of the changing tokens. Change
4
- # this to false to prevent the Authorization header from changing after
5
- # each request.
6
- #config.change_headers_on_each_request = true
7
-
8
- # By default, users will need to re-authenticate after 2 weeks. This setting
9
- # determines how long tokens will remain valid after they are issued.
10
- #config.token_lifespan = 2.weeks
11
-
12
- # Sometimes it's necessary to make several requests to the API at the same
13
- # time. In this case, each request in the batch will need to share the same
14
- # auth token. This setting determines how far apart the requests can be while
15
- # still using the same auth token.
16
- #config.batch_request_buffer_throttle = 5.seconds
17
-
18
- # This route will be the prefix for all oauth2 redirect callbacks. For
19
- # example, using the default '/omniauth', the github oauth2 provider will
20
- # redirect successful authentications to '/omniauth/github/callback'
21
- #config.omniauth_prefix = "/omniauth"
22
- end
@@ -1,54 +0,0 @@
1
- class DeviseTokenAuthCreateUsers < ActiveRecord::Migration
2
- def change
3
- create_table(:users) 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
-
12
- ## Rememberable
13
- t.datetime :remember_created_at
14
-
15
- ## Trackable
16
- t.integer :sign_in_count, :default => 0, :null => false
17
- t.datetime :current_sign_in_at
18
- t.datetime :last_sign_in_at
19
- t.string :current_sign_in_ip
20
- t.string :last_sign_in_ip
21
-
22
- ## Confirmable
23
- t.string :confirmation_token
24
- t.datetime :confirmed_at
25
- t.datetime :confirmation_sent_at
26
- t.string :unconfirmed_email # Only if using reconfirmable
27
-
28
- ## Lockable
29
- # t.integer :failed_attempts, :default => 0, :null => false # Only if lock strategy is :failed_attempts
30
- # t.string :unlock_token # Only if unlock strategy is :email or :both
31
- # t.datetime :locked_at
32
-
33
- ## User Info
34
- t.string :name
35
- t.string :nickname
36
- t.string :image
37
-
38
- ## unique oauth id
39
- t.string :provider
40
- t.string :uid, :null => false, :default => ""
41
-
42
- ## Tokens
43
- t.text :tokens
44
-
45
- t.timestamps
46
- end
47
-
48
- add_index :users, :email
49
- add_index :users, :uid, :unique => true
50
- add_index :users, :reset_password_token, :unique => true
51
- # add_index :users, :confirmation_token, :unique => true
52
- # add_index :users, :unlock_token, :unique => true
53
- end
54
- end