devise-remote-user 0.4.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +21 -1
- data/Gemfile +36 -1
- data/README.md +1 -1
- data/Rakefile +5 -8
- data/{devise_remote_user.gemspec → devise-remote-user.gemspec} +3 -3
- data/lib/devise-remote-user.rb +1 -0
- data/lib/devise_remote_user.rb +11 -13
- data/lib/devise_remote_user/version.rb +1 -1
- data/spec/controllers/application_controller_spec.rb +11 -11
- data/spec/controllers/devise/sessions_controller_spec.rb +2 -3
- data/spec/examples.txt +15 -0
- data/spec/lib/devise_remote_user_spec.rb +3 -3
- data/spec/spec_helper.rb +33 -8
- data/spec/{dummy/db/migrate → test_app_templates}/20131101184256_add_name_fields_to_user.rb +0 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +34 -0
- metadata +41 -153
- data/spec/controllers/application_controller_spec.rb~ +0 -9
- data/spec/controllers/devise/sessions_controller_spec.rb~ +0 -20
- data/spec/dummy/README.rdoc +0 -28
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -13
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -13
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/user.rb +0 -4
- data/spec/dummy/app/models/user.rb~ +0 -6
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -23
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -29
- data/spec/dummy/config/environments/production.rb +0 -80
- data/spec/dummy/config/environments/test.rb +0 -36
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/devise.rb +0 -258
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -12
- data/spec/dummy/config/initializers/session_store.rb +0 -3
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/devise.en.yml +0 -60
- data/spec/dummy/config/locales/en.yml +0 -23
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/db/migrate/20131101150807_devise_create_users.rb +0 -42
- data/spec/dummy/db/migrate/20131101184256_add_name_fields_to_user.rb~ +0 -4
- data/spec/dummy/db/schema.rb +0 -38
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/public/404.html +0 -58
- data/spec/dummy/public/422.html +0 -58
- data/spec/dummy/public/500.html +0 -57
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/features/#logout_spec.rb# +0 -1
- data/spec/factories/user_factories.rb~ +0 -6
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Add new inflection rules using the following format. Inflections
|
4
|
-
# are locale specific, and you may define rules for as many different
|
5
|
-
# locales as you wish. All of these examples are active by default:
|
6
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
-
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
-
# inflect.singular /^(ox)en/i, '\1'
|
9
|
-
# inflect.irregular 'person', 'people'
|
10
|
-
# inflect.uncountable %w( fish sheep )
|
11
|
-
# end
|
12
|
-
|
13
|
-
# These inflection rules are supported but not enabled by default:
|
14
|
-
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
-
# inflect.acronym 'RESTful'
|
16
|
-
# end
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rake secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure your secret_key_base is kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
Dummy::Application.config.secret_token = 'd21fd8b56cd95305d2900f46c17cfecf9cfd198395a33c487af053c3c8e8cfc6bd1846dc9d40731f1d98ae9dd571d3d88be03af97cc46c5cf112b6c2e69f8fc2'
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
-
|
3
|
-
en:
|
4
|
-
devise:
|
5
|
-
confirmations:
|
6
|
-
confirmed: "Your account was successfully confirmed. Please sign in."
|
7
|
-
confirmed_and_signed_in: "Your account was successfully confirmed. You are now signed in."
|
8
|
-
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
9
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
10
|
-
failure:
|
11
|
-
already_authenticated: "You are already signed in."
|
12
|
-
inactive: "Your account is not activated yet."
|
13
|
-
invalid: "Invalid email or password."
|
14
|
-
invalid_token: "Invalid authentication token."
|
15
|
-
locked: "Your account is locked."
|
16
|
-
not_found_in_database: "Invalid email or password."
|
17
|
-
timeout: "Your session expired. Please sign in again to continue."
|
18
|
-
unauthenticated: "You need to sign in or sign up before continuing."
|
19
|
-
unconfirmed: "You have to confirm your account before continuing."
|
20
|
-
mailer:
|
21
|
-
confirmation_instructions:
|
22
|
-
subject: "Confirmation instructions"
|
23
|
-
reset_password_instructions:
|
24
|
-
subject: "Reset password instructions"
|
25
|
-
unlock_instructions:
|
26
|
-
subject: "Unlock Instructions"
|
27
|
-
omniauth_callbacks:
|
28
|
-
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
29
|
-
success: "Successfully authenticated from %{kind} account."
|
30
|
-
passwords:
|
31
|
-
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
32
|
-
send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
|
33
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
34
|
-
updated: "Your password was changed successfully. You are now signed in."
|
35
|
-
updated_not_active: "Your password was changed successfully."
|
36
|
-
registrations:
|
37
|
-
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
|
38
|
-
signed_up: "Welcome! You have signed up successfully."
|
39
|
-
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
40
|
-
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
41
|
-
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
|
42
|
-
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
|
43
|
-
updated: "You updated your account successfully."
|
44
|
-
sessions:
|
45
|
-
signed_in: "Signed in successfully."
|
46
|
-
signed_out: "Signed out successfully."
|
47
|
-
unlocks:
|
48
|
-
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
|
49
|
-
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
|
50
|
-
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
51
|
-
errors:
|
52
|
-
messages:
|
53
|
-
already_confirmed: "was already confirmed, please try signing in"
|
54
|
-
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
55
|
-
expired: "has expired, please request a new one"
|
56
|
-
not_found: "not found"
|
57
|
-
not_locked: "was not locked"
|
58
|
-
not_saved:
|
59
|
-
one: "1 error prohibited this %{resource} from being saved:"
|
60
|
-
other: "%{count} errors prohibited this %{resource} from being saved:"
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# To learn more, please read the Rails Internationalization guide
|
20
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
-
|
22
|
-
en:
|
23
|
-
hello: "Hello world"
|
data/spec/dummy/config/routes.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
class DeviseCreateUsers < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table(:users) do |t|
|
4
|
-
## Database authenticatable
|
5
|
-
t.string :email, :null => false, :default => ""
|
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
|
-
|
34
|
-
t.timestamps
|
35
|
-
end
|
36
|
-
|
37
|
-
add_index :users, :email, :unique => true
|
38
|
-
add_index :users, :reset_password_token, :unique => true
|
39
|
-
# add_index :users, :confirmation_token, :unique => true
|
40
|
-
# add_index :users, :unlock_token, :unique => true
|
41
|
-
end
|
42
|
-
end
|
data/spec/dummy/db/schema.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended to check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(:version => 20131101184256) do
|
15
|
-
|
16
|
-
create_table "users", :force => true do |t|
|
17
|
-
t.string "email", :default => "", :null => false
|
18
|
-
t.string "encrypted_password", :default => "", :null => false
|
19
|
-
t.string "reset_password_token"
|
20
|
-
t.datetime "reset_password_sent_at"
|
21
|
-
t.datetime "remember_created_at"
|
22
|
-
t.integer "sign_in_count", :default => 0, :null => false
|
23
|
-
t.datetime "current_sign_in_at"
|
24
|
-
t.datetime "last_sign_in_at"
|
25
|
-
t.string "current_sign_in_ip"
|
26
|
-
t.string "last_sign_in_ip"
|
27
|
-
t.datetime "created_at", :null => false
|
28
|
-
t.datetime "updated_at", :null => false
|
29
|
-
t.string "first_name"
|
30
|
-
t.string "last_name"
|
31
|
-
t.string "nickname"
|
32
|
-
t.string "display_name"
|
33
|
-
end
|
34
|
-
|
35
|
-
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
36
|
-
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
37
|
-
|
38
|
-
end
|
data/spec/dummy/lib/assets/.keep
DELETED
File without changes
|
data/spec/dummy/log/.keep
DELETED
File without changes
|
data/spec/dummy/public/404.html
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/404.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
54
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
58
|
-
</html>
|
data/spec/dummy/public/422.html
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/422.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>The change you wanted was rejected.</h1>
|
54
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
55
|
-
</div>
|
56
|
-
<p>If you are the application owner check the logs for more information.</p>
|
57
|
-
</body>
|
58
|
-
</html>
|
data/spec/dummy/public/500.html
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style>
|
6
|
-
body {
|
7
|
-
background-color: #EFEFEF;
|
8
|
-
color: #2E2F30;
|
9
|
-
text-align: center;
|
10
|
-
font-family: arial, sans-serif;
|
11
|
-
}
|
12
|
-
|
13
|
-
div.dialog {
|
14
|
-
width: 25em;
|
15
|
-
margin: 4em auto 0 auto;
|
16
|
-
border: 1px solid #CCC;
|
17
|
-
border-right-color: #999;
|
18
|
-
border-left-color: #999;
|
19
|
-
border-bottom-color: #BBB;
|
20
|
-
border-top: #B00100 solid 4px;
|
21
|
-
border-top-left-radius: 9px;
|
22
|
-
border-top-right-radius: 9px;
|
23
|
-
background-color: white;
|
24
|
-
padding: 7px 4em 0 4em;
|
25
|
-
}
|
26
|
-
|
27
|
-
h1 {
|
28
|
-
font-size: 100%;
|
29
|
-
color: #730E15;
|
30
|
-
line-height: 1.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
body > p {
|
34
|
-
width: 33em;
|
35
|
-
margin: 0 auto 1em;
|
36
|
-
padding: 1em 0;
|
37
|
-
background-color: #F7F7F7;
|
38
|
-
border: 1px solid #CCC;
|
39
|
-
border-right-color: #999;
|
40
|
-
border-bottom-color: #999;
|
41
|
-
border-bottom-left-radius: 4px;
|
42
|
-
border-bottom-right-radius: 4px;
|
43
|
-
border-top-color: #DADADA;
|
44
|
-
color: #666;
|
45
|
-
box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
|
46
|
-
}
|
47
|
-
</style>
|
48
|
-
</head>
|
49
|
-
|
50
|
-
<body>
|
51
|
-
<!-- This file lives in public/500.html -->
|
52
|
-
<div class="dialog">
|
53
|
-
<h1>We're sorry, but something went wrong.</h1>
|
54
|
-
</div>
|
55
|
-
<p>If you are the application owner check the logs for more information.</p>
|
56
|
-
</body>
|
57
|
-
</html>
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|