-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This includes a new `alchemy:devise:install` generator to improve security and transparency in the host app. NOTE: If you are upgrading from Alchemy::Devise 2.0 or older and have overwritten the mailer views, you need to upgrade them! See: https://github.com/plataformatec/devise/blob/master/CHANGELOG.md#310---2013-09-05
- Loading branch information
Thomas von Deyen
committed
Jan 1, 2015
1 parent
6875ab5
commit 4e533e1
Showing
23 changed files
with
629 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | ||
|
||
en: | ||
devise: | ||
confirmations: | ||
confirmed: "Your email address has been successfully confirmed." | ||
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes." | ||
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes." | ||
failure: | ||
already_authenticated: "You are already signed in." | ||
inactive: "Your account is not activated yet." | ||
invalid: "Invalid %{authentication_keys} or password." | ||
locked: "Your account is locked." | ||
last_attempt: "You have one more attempt before your account is locked." | ||
not_found_in_database: "Invalid %{authentication_keys} or password." | ||
timeout: "Your session expired. Please sign in again to continue." | ||
unauthenticated: "You need to sign in or sign up before continuing." | ||
unconfirmed: "You have to confirm your email address before continuing." | ||
mailer: | ||
confirmation_instructions: | ||
subject: "Confirmation instructions" | ||
reset_password_instructions: | ||
subject: "Reset password instructions" | ||
unlock_instructions: | ||
subject: "Unlock instructions" | ||
omniauth_callbacks: | ||
failure: "Could not authenticate you from %{kind} because \"%{reason}\"." | ||
success: "Successfully authenticated from %{kind} account." | ||
passwords: | ||
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." | ||
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes." | ||
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." | ||
updated: "Your password has been changed successfully. You are now signed in." | ||
updated_not_active: "Your password has been changed successfully." | ||
registrations: | ||
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon." | ||
signed_up: "Welcome! You have signed up successfully." | ||
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated." | ||
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked." | ||
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." | ||
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address." | ||
updated: "Your account has been updated successfully." | ||
sessions: | ||
signed_in: "Signed in successfully." | ||
signed_out: "Signed out successfully." | ||
already_signed_out: "Signed out successfully." | ||
unlocks: | ||
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes." | ||
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes." | ||
unlocked: "Your account has been unlocked successfully. Please sign in to continue." | ||
errors: | ||
messages: | ||
already_confirmed: "was already confirmed, please try signing in" | ||
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" | ||
expired: "has expired, please request a new one" | ||
not_found: "not found" | ||
already_confirmed: "was already confirmed, please try signing in" | ||
not_locked: "was not locked" | ||
not_saved: | ||
one: "1 error prohibited this %{resource} from being saved:" | ||
other: "%{count} errors prohibited this %{resource} from being saved:" | ||
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one" | ||
|
||
devise: | ||
failure: | ||
already_authenticated: 'You are already signed in.' | ||
unauthenticated: 'You need to sign in or sign up before continuing.' | ||
unconfirmed: 'You have to confirm your account before continuing.' | ||
locked: 'Your account is locked.' | ||
not_found_in_database: 'Invalid email or password.' | ||
invalid: 'Invalid email or password.' | ||
invalid_token: 'Invalid authentication token.' | ||
timeout: 'Your session expired, please sign in again to continue.' | ||
inactive: 'Your account was not activated yet.' | ||
sessions: | ||
signed_in: 'Signed in successfully.' | ||
signed_out: 'Signed out successfully.' | ||
passwords: | ||
send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' | ||
updated: 'Your password was changed successfully. You are now signed in.' | ||
updated_not_active: 'Your password was changed successfully.' | ||
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." | ||
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." | ||
confirmations: | ||
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' | ||
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.' | ||
confirmed: 'Your account was successfully confirmed. You are now signed in.' | ||
registrations: | ||
signed_up: 'Welcome! You have signed up successfully.' | ||
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.' | ||
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.' | ||
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' | ||
updated: 'You updated your account successfully.' | ||
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." | ||
destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' | ||
unlocks: | ||
send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' | ||
unlocked: 'Your account has been unlocked successfully. Please sign in to continue.' | ||
send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' | ||
omniauth_callbacks: | ||
success: 'Successfully authenticated from %{kind} account.' | ||
failure: 'Could not authenticate you from %{kind} because "%{reason}".' | ||
mailer: | ||
confirmation_instructions: | ||
subject: 'Confirmation instructions' | ||
reset_password_instructions: | ||
subject: 'Reset password instructions' | ||
unlock_instructions: | ||
subject: 'Unlock Instructions' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module Alchemy | ||
module Devise | ||
VERSION = "2.1.0.beta2" | ||
VERSION = "2.1.0.beta3" | ||
end | ||
end |
22 changes: 22 additions & 0 deletions
22
lib/generators/alchemy/devise/install/install_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module Alchemy | ||
module Devise | ||
module Generators | ||
class InstallGenerator < Rails::Generators::Base | ||
desc "Installs Alchemy Devise based authentication into your app." | ||
source_root File.expand_path('templates', File.dirname(__FILE__)) | ||
|
||
def copy_devise_config | ||
template 'devise.rb.tt', 'config/initializers/devise.rb' | ||
end | ||
|
||
def add_migrations | ||
run 'bundle exec rake alchemy_devise:install:migrations' | ||
end | ||
|
||
def run_migrations | ||
run 'bundle exec rake db:migrate' | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.