devise 4.0.0.rc1 → 4.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise might be problematic. Click here for more details.

Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -6
  3. data/CHANGELOG.md +15 -0
  4. data/Gemfile +3 -3
  5. data/Gemfile.lock +52 -53
  6. data/README.md +3 -6
  7. data/app/controllers/devise/confirmations_controller.rb +1 -1
  8. data/app/controllers/devise/passwords_controller.rb +2 -2
  9. data/app/controllers/devise/registrations_controller.rb +3 -3
  10. data/app/controllers/devise/sessions_controller.rb +3 -3
  11. data/app/controllers/devise/unlocks_controller.rb +1 -1
  12. data/app/controllers/devise_controller.rb +9 -2
  13. data/app/views/devise/confirmations/new.html.erb +1 -1
  14. data/bin/test +13 -0
  15. data/gemfiles/Gemfile.rails-4.1-stable +4 -4
  16. data/gemfiles/Gemfile.rails-4.1-stable.lock +45 -46
  17. data/gemfiles/Gemfile.rails-4.2-stable +4 -4
  18. data/gemfiles/Gemfile.rails-4.2-stable.lock +47 -48
  19. data/gemfiles/Gemfile.rails-5.0-beta +19 -19
  20. data/gemfiles/Gemfile.rails-5.0-beta.lock +61 -106
  21. data/lib/devise.rb +4 -4
  22. data/lib/devise/controllers/helpers.rb +1 -1
  23. data/lib/devise/encryptor.rb +4 -4
  24. data/lib/devise/failure_app.rb +4 -5
  25. data/lib/devise/mailers/helpers.rb +1 -1
  26. data/lib/devise/models/confirmable.rb +2 -2
  27. data/lib/devise/models/database_authenticatable.rb +7 -5
  28. data/lib/devise/models/lockable.rb +1 -1
  29. data/lib/devise/omniauth/url_helpers.rb +62 -4
  30. data/lib/devise/rails/routes.rb +14 -16
  31. data/lib/devise/strategies/database_authenticatable.rb +3 -3
  32. data/lib/devise/test_helpers.rb +1 -1
  33. data/lib/devise/version.rb +1 -1
  34. data/lib/generators/active_record/devise_generator.rb +8 -2
  35. data/lib/generators/active_record/templates/migration.rb +1 -1
  36. data/lib/generators/active_record/templates/migration_existing.rb +1 -1
  37. data/lib/generators/devise/install_generator.rb +15 -0
  38. data/lib/generators/templates/devise.rb +10 -10
  39. data/test/failure_app_test.rb +1 -1
  40. data/test/generators/install_generator_test.rb +14 -3
  41. data/test/mailers/confirmation_instructions_test.rb +6 -6
  42. data/test/mailers/reset_password_instructions_test.rb +5 -5
  43. data/test/mailers/unlock_instructions_test.rb +5 -5
  44. data/test/models/confirmable_test.rb +2 -2
  45. data/test/models/database_authenticatable_test.rb +6 -6
  46. data/test/omniauth/url_helpers_test.rb +4 -6
  47. data/test/rails_app/config/initializers/devise.rb +1 -1
  48. data/test/routes_test.rb +2 -2
  49. data/test/test_helpers_test.rb +2 -2
  50. data/test/test_models.rb +1 -1
  51. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d83d3fdffffd6758ceba6aae0b831a05a92abf2
4
- data.tar.gz: 37bced98172838015eb7ed04a125ff8fd27ae6f8
3
+ metadata.gz: 8017e93e06a4eabf10feea1eee997b6ac155d772
4
+ data.tar.gz: 51038b4688bea239445bbeeba50cc6f77eafdd89
5
5
  SHA512:
6
- metadata.gz: 2545878568e7b865e8327932a0315fc28ec2b3c5b3ab4bb266d0c799c11792bc9c76616d77690cb0671eca653b7a3f03529458b0951dab1d3a10f19a8e2386ff
7
- data.tar.gz: b021773a363c95ebc717b1da34eab9ac04364d181585bf1ecee2a98d00aa9f0d3f2a84b82769aab2556dc0ca28581042b1077f8f1463efa14f9afce2bd1494d3
6
+ metadata.gz: b69177c6c72e7cc49827e38bc630dc3894eac66c19357d3951b168a6c75d2dff557115a1c28a59f35ec2bb58d232e833a81ca4a02188f579de5207d731337a80
7
+ data.tar.gz: d6f2b011bde8c5294f604c1eae19c11d5ec248eacd0eb36f02d8800f1963004d0fdf76635862f4a720de660384cd23d12cc8d42f59b177924ad0d59cf75831fe
@@ -1,15 +1,15 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.5
5
- - 2.2.4
6
4
  - 2.3.0
5
+ - 2.2.4
6
+ - 2.1.5
7
7
 
8
8
  gemfile:
9
+ - Gemfile
10
+ - gemfiles/Gemfile.rails-5.0-beta
9
11
  - gemfiles/Gemfile.rails-4.2-stable
10
12
  - gemfiles/Gemfile.rails-4.1-stable
11
- - gemfiles/Gemfile.rails-5.0-beta
12
- - Gemfile
13
13
 
14
14
  matrix:
15
15
  exclude:
@@ -26,14 +26,14 @@ cache: bundler
26
26
 
27
27
  env:
28
28
  matrix:
29
- - DEVISE_ORM=mongoid
30
29
  - DEVISE_ORM=active_record
30
+ - DEVISE_ORM=mongoid
31
31
 
32
32
  before_install: "rm ${BUNDLE_GEMFILE}.lock"
33
33
 
34
34
  before_script: "bundle update"
35
35
 
36
- script: "bundle exec rake test"
36
+ script: "bin/test"
37
37
 
38
38
  notifications:
39
39
  email: false
@@ -1,3 +1,18 @@
1
+ ### Unreleased
2
+
3
+ * enhancements
4
+ * Introduced `DeviseController#set_flash_message!` for conditional flash
5
+ messages setting to reduce complexity.
6
+ * `rails g devise:install` will fail if the app does not have a ORM configured
7
+ (by @arjunsharma)
8
+ * Support to Rails 5 versioned migrations added.
9
+
10
+ * deprecations
11
+ * omniauth routes are no longer defined with a wildcard `:provider` parameter,
12
+ and provider specific routes are defined instead, so route helpers like `user_omniauth_authorize_path(:github)` are deprecated in favor of `user_github_authorize_path`.
13
+ You can still use `omniauth_authorize_path(:user, :github)` if you need to
14
+ call the helpers dynamically.
15
+
1
16
  ### 4.0.0.rc1 - 2016-01-02
2
17
 
3
18
  * Support added to Rails 5 (by @twalpole).
data/Gemfile CHANGED
@@ -2,9 +2,9 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem "rails", "4.2.2"
6
- gem "omniauth", "~> 1.2.0"
7
- gem "omniauth-oauth2", "~> 1.1.0"
5
+ gem "rails", "~> 4.2.5"
6
+ gem "omniauth", "~> 1.3"
7
+ gem "omniauth-oauth2", "~> 1.4"
8
8
  gem "rdoc"
9
9
 
10
10
  group :test do
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise (4.0.0.rc1)
4
+ devise (4.0.0.rc2)
5
5
  bcrypt (~> 3.0)
6
6
  orm_adapter (~> 0.1)
7
7
  railties (>= 4.1.0, < 5.1)
@@ -11,46 +11,46 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actionmailer (4.2.2)
15
- actionpack (= 4.2.2)
16
- actionview (= 4.2.2)
17
- activejob (= 4.2.2)
14
+ actionmailer (4.2.6)
15
+ actionpack (= 4.2.6)
16
+ actionview (= 4.2.6)
17
+ activejob (= 4.2.6)
18
18
  mail (~> 2.5, >= 2.5.4)
19
19
  rails-dom-testing (~> 1.0, >= 1.0.5)
20
- actionpack (4.2.2)
21
- actionview (= 4.2.2)
22
- activesupport (= 4.2.2)
20
+ actionpack (4.2.6)
21
+ actionview (= 4.2.6)
22
+ activesupport (= 4.2.6)
23
23
  rack (~> 1.6)
24
24
  rack-test (~> 0.6.2)
25
25
  rails-dom-testing (~> 1.0, >= 1.0.5)
26
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
27
- actionview (4.2.2)
28
- activesupport (= 4.2.2)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
27
+ actionview (4.2.6)
28
+ activesupport (= 4.2.6)
29
29
  builder (~> 3.1)
30
30
  erubis (~> 2.7.0)
31
31
  rails-dom-testing (~> 1.0, >= 1.0.5)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
33
- activejob (4.2.2)
34
- activesupport (= 4.2.2)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
+ activejob (4.2.6)
34
+ activesupport (= 4.2.6)
35
35
  globalid (>= 0.3.0)
36
- activemodel (4.2.2)
37
- activesupport (= 4.2.2)
36
+ activemodel (4.2.6)
37
+ activesupport (= 4.2.6)
38
38
  builder (~> 3.1)
39
- activerecord (4.2.2)
40
- activemodel (= 4.2.2)
41
- activesupport (= 4.2.2)
39
+ activerecord (4.2.6)
40
+ activemodel (= 4.2.6)
41
+ activesupport (= 4.2.6)
42
42
  arel (~> 6.0)
43
- activesupport (4.2.2)
43
+ activesupport (4.2.6)
44
44
  i18n (~> 0.7)
45
45
  json (~> 1.7, >= 1.7.7)
46
46
  minitest (~> 5.1)
47
47
  thread_safe (~> 0.3, >= 0.3.4)
48
48
  tzinfo (~> 1.1)
49
49
  arel (6.0.3)
50
- bcrypt (3.1.10)
50
+ bcrypt (3.1.11)
51
51
  bson (3.2.6)
52
52
  builder (3.2.2)
53
- concurrent-ruby (1.0.0)
53
+ concurrent-ruby (1.0.1)
54
54
  connection_pool (2.2.0)
55
55
  erubis (2.7.0)
56
56
  faraday (0.9.2)
@@ -60,13 +60,13 @@ GEM
60
60
  hashie (3.4.3)
61
61
  i18n (0.7.0)
62
62
  json (1.8.3)
63
- jwt (1.5.2)
63
+ jwt (1.5.1)
64
64
  loofah (2.0.3)
65
65
  nokogiri (>= 1.5.9)
66
66
  mail (2.6.3)
67
67
  mime-types (>= 1.16, < 3)
68
68
  metaclass (0.0.4)
69
- mime-types (2.99)
69
+ mime-types (2.99.1)
70
70
  mini_portile2 (2.0.0)
71
71
  minitest (5.8.4)
72
72
  mocha (1.1.0)
@@ -85,21 +85,19 @@ GEM
85
85
  multipart-post (2.0.0)
86
86
  nokogiri (1.6.7.2)
87
87
  mini_portile2 (~> 2.0.0.rc2)
88
- oauth2 (0.9.4)
88
+ oauth2 (1.1.0)
89
89
  faraday (>= 0.8, < 0.10)
90
- jwt (~> 1.0)
90
+ jwt (~> 1.0, < 1.5.2)
91
91
  multi_json (~> 1.3)
92
92
  multi_xml (~> 0.5)
93
- rack (~> 1.2)
94
- omniauth (1.2.2)
93
+ rack (>= 1.2, < 3)
94
+ omniauth (1.3.1)
95
95
  hashie (>= 1.2, < 4)
96
- rack (~> 1.0)
97
- omniauth-facebook (1.6.0)
98
- omniauth-oauth2 (~> 1.1)
99
- omniauth-oauth2 (1.1.2)
100
- faraday (>= 0.8, < 0.10)
101
- multi_json (~> 1.3)
102
- oauth2 (~> 0.9.3)
96
+ rack (>= 1.0, < 3)
97
+ omniauth-facebook (3.0.0)
98
+ omniauth-oauth2 (~> 1.2)
99
+ omniauth-oauth2 (1.4.0)
100
+ oauth2 (~> 1.0)
103
101
  omniauth (~> 1.2)
104
102
  omniauth-openid (1.0.1)
105
103
  omniauth (~> 1.0)
@@ -113,16 +111,16 @@ GEM
113
111
  ruby-openid (>= 2.1.8)
114
112
  rack-test (0.6.3)
115
113
  rack (>= 1.0)
116
- rails (4.2.2)
117
- actionmailer (= 4.2.2)
118
- actionpack (= 4.2.2)
119
- actionview (= 4.2.2)
120
- activejob (= 4.2.2)
121
- activemodel (= 4.2.2)
122
- activerecord (= 4.2.2)
123
- activesupport (= 4.2.2)
114
+ rails (4.2.6)
115
+ actionmailer (= 4.2.6)
116
+ actionpack (= 4.2.6)
117
+ actionview (= 4.2.6)
118
+ activejob (= 4.2.6)
119
+ activemodel (= 4.2.6)
120
+ activerecord (= 4.2.6)
121
+ activesupport (= 4.2.6)
124
122
  bundler (>= 1.3.0, < 2.0)
125
- railties (= 4.2.2)
123
+ railties (= 4.2.6)
126
124
  sprockets-rails
127
125
  rails-deprecated_sanitizer (1.0.3)
128
126
  activesupport (>= 4.2.0.alpha)
@@ -132,20 +130,21 @@ GEM
132
130
  rails-deprecated_sanitizer (>= 1.0.1)
133
131
  rails-html-sanitizer (1.0.3)
134
132
  loofah (~> 2.0)
135
- railties (4.2.2)
136
- actionpack (= 4.2.2)
137
- activesupport (= 4.2.2)
133
+ railties (4.2.6)
134
+ actionpack (= 4.2.6)
135
+ activesupport (= 4.2.6)
138
136
  rake (>= 0.8.7)
139
137
  thor (>= 0.18.1, < 2.0)
140
- rake (10.5.0)
141
- rdoc (4.2.1)
138
+ rake (11.0.1)
139
+ rdoc (4.2.2)
140
+ json (~> 1.4)
142
141
  responders (2.1.1)
143
142
  railties (>= 4.2.0, < 5.1)
144
143
  ruby-openid (2.7.0)
145
144
  sprockets (3.5.2)
146
145
  concurrent-ruby (~> 1.0)
147
146
  rack (> 1, < 3)
148
- sprockets-rails (3.0.0)
147
+ sprockets-rails (3.0.4)
149
148
  actionpack (>= 4.0)
150
149
  activesupport (>= 4.0)
151
150
  sprockets (>= 3.0.0)
@@ -171,11 +170,11 @@ DEPENDENCIES
171
170
  jruby-openssl
172
171
  mocha (~> 1.1)
173
172
  mongoid (~> 4.0)
174
- omniauth (~> 1.2.0)
173
+ omniauth (~> 1.3)
175
174
  omniauth-facebook
176
- omniauth-oauth2 (~> 1.1.0)
175
+ omniauth-oauth2 (~> 1.4)
177
176
  omniauth-openid (~> 1.0.1)
178
- rails (= 4.2.2)
177
+ rails (~> 4.2.5)
179
178
  rdoc
180
179
  sqlite3
181
180
  webrat (= 0.7.3)
data/README.md CHANGED
@@ -4,7 +4,6 @@ By [Plataformatec](http://plataformatec.com.br/).
4
4
 
5
5
  [![Build Status](https://api.travis-ci.org/plataformatec/devise.svg?branch=master)](http://travis-ci.org/plataformatec/devise)
6
6
  [![Code Climate](https://codeclimate.com/github/plataformatec/devise.svg)](https://codeclimate.com/github/plataformatec/devise)
7
- [![Security](https://hakiri.io/github/plataformatec/devise/master.svg)](https://hakiri.io/github/plataformatec/devise/master)
8
7
 
9
8
  This README is [also available in a friendly navigable format](http://devise.plataformatec.com.br/).
10
9
 
@@ -17,7 +16,7 @@ Devise is a flexible authentication solution for Rails based on Warden. It:
17
16
 
18
17
  It's composed of 10 modules:
19
18
 
20
- * [Database Authenticatable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/DatabaseAuthenticatable): encrypts and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication.
19
+ * [Database Authenticatable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/DatabaseAuthenticatable): hashes and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication.
21
20
  * [Omniauthable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Omniauthable): adds OmniAuth (https://github.com/intridea/omniauth) support.
22
21
  * [Confirmable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Confirmable): sends emails with confirmation instructions and verifies whether an account is already confirmed during sign in.
23
22
  * [Recoverable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Recoverable): resets the user password and sends reset instructions.
@@ -28,8 +27,6 @@ It's composed of 10 modules:
28
27
  * [Validatable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Validatable): provides validations of email and password. It's optional and can be customized, so you're able to define your own validations.
29
28
  * [Lockable](http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Lockable): locks an account after a specified number of failed sign-in attempts. Can unlock via email or after a specified time period.
30
29
 
31
- Devise is guaranteed to be thread-safe on YARV. Thread-safety support on JRuby is in progress.
32
-
33
30
  ## Information
34
31
 
35
32
  ### The Devise wiki
@@ -174,7 +171,7 @@ member_session
174
171
 
175
172
  ### Configuring Models
176
173
 
177
- The Devise method in your models also accepts some options to configure its modules. For example, you can choose the cost of the encryption algorithm with:
174
+ The Devise method in your models also accepts some options to configure its modules. For example, you can choose the cost of the hashing algorithm with:
178
175
 
179
176
  ```ruby
180
177
  devise :database_authenticatable, :registerable, :confirmable, :recoverable, stretches: 20
@@ -412,7 +409,7 @@ Caution: Devise Controllers inherit from ApplicationController. If your app uses
412
409
 
413
410
  ### Test helpers
414
411
 
415
- Devise includes some test helpers for functional specs. In order to use them, you need to include Devise in your functional tests by adding the following to the bottom of your `test/test_helper.rb` file:
412
+ Devise includes some test helpers for functional specs. In order to use them, you need to include Devise in your functional tests by adding the following to the bottom of your `test/test_helper.rb` file (make sure you place it out of scope of `ActiveSupport::TestCase` which is the default class inside of `test/test_helper.rb`):
416
413
 
417
414
  ```ruby
418
415
  class ActionController::TestCase
@@ -22,7 +22,7 @@ class Devise::ConfirmationsController < DeviseController
22
22
  yield resource if block_given?
23
23
 
24
24
  if resource.errors.empty?
25
- set_flash_message(:notice, :confirmed) if is_flashing_format?
25
+ set_flash_message!(:notice, :confirmed)
26
26
  respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
27
27
  else
28
28
  respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
@@ -36,10 +36,10 @@ class Devise::PasswordsController < DeviseController
36
36
  resource.unlock_access! if unlockable?(resource)
37
37
  if Devise.sign_in_after_reset_password
38
38
  flash_message = resource.active_for_authentication? ? :updated : :updated_not_active
39
- set_flash_message(:notice, flash_message) if is_flashing_format?
39
+ set_flash_message!(:notice, flash_message)
40
40
  sign_in(resource_name, resource)
41
41
  else
42
- set_flash_message(:notice, :updated_not_active) if is_flashing_format?
42
+ set_flash_message!(:notice, :updated_not_active)
43
43
  end
44
44
  respond_with resource, location: after_resetting_password_path_for(resource)
45
45
  else
@@ -18,11 +18,11 @@ class Devise::RegistrationsController < DeviseController
18
18
  yield resource if block_given?
19
19
  if resource.persisted?
20
20
  if resource.active_for_authentication?
21
- set_flash_message :notice, :signed_up if is_flashing_format?
21
+ set_flash_message! :notice, :signed_up
22
22
  sign_up(resource_name, resource)
23
23
  respond_with resource, location: after_sign_up_path_for(resource)
24
24
  else
25
- set_flash_message :notice, :"signed_up_but_#{resource.inactive_message}" if is_flashing_format?
25
+ set_flash_message! :notice, :"signed_up_but_#{resource.inactive_message}"
26
26
  expire_data_after_sign_in!
27
27
  respond_with resource, location: after_inactive_sign_up_path_for(resource)
28
28
  end
@@ -65,7 +65,7 @@ class Devise::RegistrationsController < DeviseController
65
65
  def destroy
66
66
  resource.destroy
67
67
  Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)
68
- set_flash_message :notice, :destroyed if is_flashing_format?
68
+ set_flash_message! :notice, :destroyed
69
69
  yield resource if block_given?
70
70
  respond_with_navigational(resource){ redirect_to after_sign_out_path_for(resource_name) }
71
71
  end
@@ -15,7 +15,7 @@ class Devise::SessionsController < DeviseController
15
15
  # POST /resource/sign_in
16
16
  def create
17
17
  self.resource = warden.authenticate!(auth_options)
18
- set_flash_message(:notice, :signed_in) if is_flashing_format?
18
+ set_flash_message!(:notice, :signed_in)
19
19
  sign_in(resource_name, resource)
20
20
  yield resource if block_given?
21
21
  respond_with resource, location: after_sign_in_path_for(resource)
@@ -24,7 +24,7 @@ class Devise::SessionsController < DeviseController
24
24
  # DELETE /resource/sign_out
25
25
  def destroy
26
26
  signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
27
- set_flash_message :notice, :signed_out if signed_out && is_flashing_format?
27
+ set_flash_message! :notice, :signed_out if signed_out
28
28
  yield if block_given?
29
29
  respond_to_on_destroy
30
30
  end
@@ -58,7 +58,7 @@ class Devise::SessionsController < DeviseController
58
58
  # to the after_sign_out path.
59
59
  def verify_signed_out_user
60
60
  if all_signed_out?
61
- set_flash_message :notice, :already_signed_out if is_flashing_format?
61
+ set_flash_message! :notice, :already_signed_out
62
62
 
63
63
  respond_to_on_destroy
64
64
  end
@@ -24,7 +24,7 @@ class Devise::UnlocksController < DeviseController
24
24
  yield resource if block_given?
25
25
 
26
26
  if resource.errors.empty?
27
- set_flash_message :notice, :unlocked if is_flashing_format?
27
+ set_flash_message! :notice, :unlocked
28
28
  respond_with_navigational(resource){ redirect_to after_unlock_path_for(resource) }
29
29
  else
30
30
  respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
@@ -127,13 +127,13 @@ MESSAGE
127
127
  end
128
128
 
129
129
  if notice
130
- set_flash_message :notice, notice if is_flashing_format?
130
+ set_flash_message! :notice, notice
131
131
  true
132
132
  end
133
133
  end
134
134
 
135
135
  # Sets the flash message with :key, using I18n. By default you are able
136
- # to setup your messages using specific resource scope, and if no message is
136
+ # to set up your messages using specific resource scope, and if no message is
137
137
  # found we look to the default scope. Set the "now" options key to a true
138
138
  # value to populate the flash.now hash in lieu of the default flash hash (so
139
139
  # the flash message will be available to the current action instead of the
@@ -158,6 +158,13 @@ MESSAGE
158
158
  end
159
159
  end
160
160
 
161
+ # Sets flash message if is_flashing_format? equals true
162
+ def set_flash_message!(key, kind, options = {})
163
+ if is_flashing_format?
164
+ set_flash_message(key, kind, options)
165
+ end
166
+ end
167
+
161
168
  # Sets minimum password length to show to user
162
169
  def set_minimum_password_length
163
170
  if devise_mapping.validatable?
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div class="field">
7
7
  <%= f.label :email %><br />
8
- <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
8
+ <%= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
9
9
  </div>
10
10
 
11
11
  <div class="actions">
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env ruby
2
+ $: << File.expand_path(File.expand_path('../../test', __FILE__))
3
+
4
+ require 'bundler/setup'
5
+ begin
6
+ require 'rails/test_unit/minitest_plugin'
7
+ rescue LoadError
8
+ exec 'rake'
9
+ end
10
+
11
+ Rails::TestUnitReporter.executable = 'bin/test'
12
+
13
+ exit Minitest.run(ARGV)