1298 Commits

Author SHA1 Message Date
Frederik Wille
08374f1d33 fix test 2016-07-18 09:24:46 +02:00
Frederik Wille
a5f8cd9d32 simplify test 2016-07-18 09:00:32 +02:00
Frederik Wille
65d8e94ed9 add test
in the test we need to declare a subclass of ``Devise::Mailer`` to give
a block to mail call inside of method which has a corresponding view
template

there are propably better ways to test this, but this is pretty much the
use case for passing a block
2016-07-15 12:22:12 +02:00
Lucas Mazza
fe10a5b17a Fix test typo and expand test cases for Rememberable#rememberable_value.
Closes #4157
2016-06-27 17:08:52 -03:00
Lucas Mazza
22784cb55a Remove ActiveRecord::Migration inheritance deprecation warning. 2016-06-27 16:50:26 -03:00
Lucas Mazza
656720583f Remove assert_nothing_raised deprecated usage. 2016-06-27 16:48:12 -03:00
Kris Handley
0c991af985 Fix Rails 5 env deprecation warning
Full warning ```DEPRECATION WARNING: env is deprecated and will be removed from Rails 5.1```
2016-06-18 14:20:08 +01:00
Arne Zeising
ac702843dd Change behavior to skip reconfirmation after creating a record with #save called in callback (#4125)
https://github.com/plataformatec/devise/pull/4125
2016-06-13 17:57:24 -03:00
Kostas Diamantis
4015488b90 Add missing support of Rails.application.config.action_controller.relative_url_root (#4146)
* Add Devise::FailureApp#{relative_url_root, relative_url_root?}

Also support missing action_controller.relative_url_root configuration.

* Dry assignment of relative_url_root

Also this commit adds support for
Rails.application.config.action_controller.relative_url_root
2016-06-13 15:46:43 -03:00
Lucas Mazza
cccc137714 Merge pull request #4139 from shinyaK14/public_file_server
Add public_file_server setting for Rails5
2016-06-13 11:34:04 -03:00
Tim Krajcar
a0232cf763 Implement Devise::Models::Authenticatable#inspect, re-using #serializable_hash. 2016-06-03 15:54:58 -07:00
Shinya Kitamura
57980ba82a Add public_file_server setting for Rails5 2016-06-01 14:44:35 +08:00
Stefan Botzenhart
cbbe932ee2 Fix authenticated engine routes (#4081)
Fix infinite loop in authenticated engine routes in Rails 5

https://github.com/plataformatec/devise/issues/3705
2016-05-21 11:55:56 -03:00
Lucas Mazza
7b000390a0 Add Devise::Test::IntegrationHelpers. 2016-05-15 19:36:41 -03:00
Lucas Mazza
3f3ec236bb Move Devise::TestHelpers to Devise::Test::ControllerHelpers. 2016-05-15 19:36:41 -03:00
Ralin Chimev
9caf07dd4f Fix overwriting the remember_token when a valid one already exists (#4101)
The remember_token should not get overwritten when a user is
signing in and a valid token already exists.

Fixes #3950.
2016-05-15 11:48:12 -03:00
Ulisses Almeida
2044fffa25 Deprecate the bypass option of sign_in (#4078)
The sign_in method permits the bypass option
that ignore the others options used. This behavior
has lead some users to a misconfusion what the
method really does.

This change deprecate the bypass option in favor
of a method that only does the sign in with bypass.

Closes #3981
2016-05-15 11:46:48 -03:00
Matt Yanchek
85bcbdf18b Set minimum password length for edit and new views (#4068)
* Set minimum password length for edit and new views

* Update edit.html.erb

* Update registerable_test.rb
2016-05-05 17:16:41 -03:00
Lucas Mazza
e79201aef8 Remove deprecated ParameterSanitizer API. 2016-05-03 18:32:47 -03:00
Lucas Mazza
a2498074f1 Replace custom Array assertion with assert_equal. 2016-05-03 14:18:35 -03:00
Lucas Mazza
536279b05b Replace homemade assert_not matcher in favor of refute. 2016-05-03 13:57:10 -03:00
Lucas Mazza
74ab3e9a05 Remove references to ActiveSupport::OrderedHash.
We no longer support legacy rubies where hashes aren't ordered, so we don't need
to use this class for it.
2016-05-03 13:48:42 -03:00
Ulisses Almeida
81869de9c5 Only set raise_in_transactional_callbacks for Rails 4.2
* Only set for active record orm.
* Only set for Rails versions that supports the config.
2016-05-02 23:22:51 -03:00
Ulisses Almeida
f6301c08f6 Add raise_in_transactional_callbacks to true
Using a rails app without this config generates a rails
warning, since it will be the new default. Let's udpate it.
2016-05-02 22:41:51 -03:00
ALLEN WANG QIANG
78bbf6dcc4 Send on create confirmation email after commit (#4064)
Call send_on_create_confirmation_instructions in after_commit instead of after_create, I think this is no harm in general and it makes things like async job work.

Fix #4062
2016-05-02 21:32:14 -03:00
Ulisses Almeida
1ff64fbbd3 Merge pull request #4076 from f3ndot/issue-4072-unlock-strategy-enabled-bug
Fix strategy checking in #unlock_strategy_enabled? for :none and undefined strategies
2016-05-02 21:28:49 -03:00
Lucas Mazza
13285d7ef3 Remove a few Ruby syntax warnings from the test suite. 2016-05-02 10:47:05 -03:00
Justin Bull
7346ce709a 🪲 Fix strategy checking in #unlock_strategy_enabled? for :none and undefined strategies
A bug that if the unlock strategy was set to `:both`, it would return true for all & any inputs

See #4072
2016-05-01 13:56:12 -04:00
Ulisses Almeida
1ddca80cee Set the new default of sign_out_via config 2016-05-01 12:44:40 -03:00
Ulisses Almeida
896521be73 Se the new default for skip_session_storage config 2016-05-01 12:44:40 -03:00
Ulisses Almeida
6e419ce821 Set the new default for reconfirmable config 2016-05-01 12:44:40 -03:00
Ulisses Almeida
93df02f601 Set the new default for strip_whitespace_keys config 2016-05-01 12:44:40 -03:00
byzg
357ce9c3b5 Humanize authentication keys in failure flash message (#4014)
Humanize and translates the authentication keys in failure flash message.
2016-04-26 11:17:03 -03:00
kimgb
830d3e86ee updated email_regexp and added test cases (#4001)
Add a more permissive default e-mail regex.
2016-04-26 11:13:07 -03:00
Philipe Fatio
209b97d86b Remove upgrade path for old session format (#4032)
This removes an upgrade path that migrated the old serialization format
to the new one introduced. This was introduced in c22d755 (#2300)
3 years ago and should no longer be needed.
2016-04-26 11:10:55 -03:00
Ulisses Almeida
bff701758a Merge pull request #4043 from lmduc/master
Send confirmation instructions when a user updates the email address from nil
2016-04-25 16:42:55 -03:00
Yogesh Khater
9696d83e7d Upgrade Mongoid to 5.0 2016-04-19 17:18:40 +05:30
Ulisses Almeida
846ba80480 Merge pull request #4039 from plataformatec/ua-fix-remember-me
Fix extented remember me
2016-04-18 11:07:02 -03:00
MatBi
274f8f2f87 Should send confirmation instructions after changing email from nil 2016-04-18 19:35:56 +08:00
MatBi
6f9561e64f Refactor a test 2016-04-18 18:30:20 +08:00
MatBi
016b216d95 Change the name of variables to keep the tests consistent 2016-04-18 18:15:32 +08:00
Ulisses Almeida
164134c78a Add warning about default config change
This change add warnings for these configurations:

* strip_whitespace_keys - It is already explicit on config template, now
it will be the same of the template.
* email_regexp - In the new version this regexp will be more
permissive.
* reconfirmable - It is already explicit on config template, now
it will be the same of the template.
* skip_session_storage - It is already explicit on config template, now
it will be the same of the template.
* sign_out_via - It is already explicit on config template, now
it will be the same of the template.

These ones is important to change, since the configuration says current
explicit value are the default. It can lead to misunderstanging if users
remove the explicit configuration.

It also updates the template explicit values:

* Warns the `config.mailer_sender` is nil by default
* Update `config.password_length` to use the current default
* Make the e-mail configuration explicit
2016-04-15 20:31:54 -03:00
Ulisses Almeida
4a4b5ba196 Fix remember me always extending the period
Now the config `extend_remember_period` is used to:

`true` - Every time the user authentication is validated, the
cookie expiration is updated.
`false` - Does not updates the cookie expiration.

Closes #3994
2016-04-15 20:28:46 -03:00
Ulisses Almeida
48af3e8249 Fix Rails 5 build
With this [PR](https://github.com/rails/activemodel-serializers-xml/pull/8)
of activemodel-serializers bundle will require it by default.
2016-04-15 16:57:35 -03:00
bogdanvlviv
0f11c0f6b3 fix method name for File 2016-04-12 09:03:54 +03:00
Lucas Mazza
76f76249e7 Merge pull request #3985 from plataformatec/lm-omniauth-route-helpers
Do not use the dynamic `:action` segment on Omniauth routes.
2016-03-07 11:50:35 -03:00
Lucas Mazza
ec07bdb315 Do not use the dynamic :action segment on Omniauth routes.
This was deprecated on rails/rails#23980.

We now generate scope and provider specific routes, like `user_facebook_omniauth_callback`
or `user_github_omniauth_callback`.

We could deprecate the `omniauth_authorize_path` in favor of the generated routes, but
the `shared/links.html.erb` depends on it to generate all omniauth links at once.

Closes #3983.
2016-03-07 11:19:27 -03:00
Lucas Mazza
c228227bc1 Tweak no ORM check on InstallGenerator.
* Expand the explanation of why it fail.
* Raise a subclass of `Thor::Error` so the Thor doesn't output the exception
  backtrace as it isn't useful for developers facing this error.
2016-02-15 10:16:43 -02:00
Arjun Sharma
648ed3b412 Raise error if no ORM is found during install generator 2016-02-14 14:59:38 -07:00
George Guimarães
c4b4411513 Change encryption for hashing in the documentation.
Throughout the documentations, we are using 'encrypt' incorrectly.
Encrypt means that someone will eventually decrypt the message,
which is obviously not the case for Devise.

I'm changing the docs to use 'hashing' instead.

However, I left the database field as `encrypted_password` for now.
I'll update the db field in an upcoming PR.
2016-02-10 17:10:52 -02:00