devise 3.5.2 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/.travis.yml +2 -3
 - data/CHANGELOG.md +17 -1
 - data/CODE_OF_CONDUCT.md +22 -0
 - data/CONTRIBUTING.md +2 -0
 - data/Gemfile.lock +2 -2
 - data/app/controllers/devise/passwords_controller.rb +1 -0
 - data/app/mailers/devise/mailer.rb +4 -0
 - data/app/views/devise/mailer/password_change.html.erb +3 -0
 - data/app/views/devise/shared/_links.html.erb +1 -1
 - data/config/locales/en.yml +2 -0
 - data/gemfiles/Gemfile.rails-3.2-stable.lock +5 -2
 - data/gemfiles/Gemfile.rails-4.0-stable.lock +5 -2
 - data/gemfiles/Gemfile.rails-4.1-stable.lock +5 -2
 - data/gemfiles/Gemfile.rails-4.2-stable.lock +5 -2
 - data/lib/devise.rb +12 -3
 - data/lib/devise/controllers/helpers.rb +12 -6
 - data/lib/devise/failure_app.rb +17 -3
 - data/lib/devise/hooks/timeoutable.rb +2 -1
 - data/lib/devise/models.rb +1 -1
 - data/lib/devise/models/confirmable.rb +2 -2
 - data/lib/devise/models/database_authenticatable.rb +12 -2
 - data/lib/devise/models/recoverable.rb +2 -6
 - data/lib/devise/rails/routes.rb +17 -3
 - data/lib/devise/strategies/authenticatable.rb +1 -1
 - data/lib/devise/version.rb +1 -1
 - data/lib/generators/devise/views_generator.rb +14 -3
 - data/lib/generators/templates/devise.rb +3 -0
 - data/lib/generators/templates/markerb/confirmation_instructions.markerb +1 -1
 - data/lib/generators/templates/markerb/password_change.markerb +3 -0
 - data/lib/generators/templates/markerb/reset_password_instructions.markerb +1 -1
 - data/lib/generators/templates/markerb/unlock_instructions.markerb +1 -1
 - data/test/controllers/helper_methods_test.rb +21 -0
 - data/test/failure_app_test.rb +17 -0
 - data/test/generators/views_generator_test.rb +7 -0
 - data/test/integration/omniauthable_test.rb +11 -9
 - data/test/integration/timeoutable_test.rb +12 -0
 - data/test/models/confirmable_test.rb +10 -0
 - data/test/models/database_authenticatable_test.rb +20 -0
 - data/test/models/lockable_test.rb +1 -1
 - data/test/models/recoverable_test.rb +23 -0
 - data/test/models_test.rb +15 -6
 - data/test/rails_app/app/active_record/user_without_email.rb +8 -0
 - data/test/rails_app/app/mongoid/user_without_email.rb +33 -0
 - data/test/rails_app/config/routes.rb +5 -0
 - data/test/rails_app/lib/shared_user_without_email.rb +26 -0
 - data/test/support/helpers.rb +4 -0
 - metadata +33 -22
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 1258976e4bec4149281c7764cf903ced83632766
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 57096bdcca6de6c67b0fa26aee8251c446571c39
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e3839e95f5c831805b43974ef72f7e6beca86d37c6c0177dec83ae5e8cc6ebcc5922da78cc505f413157ecdb0ed8b56c3c3499c061743a6ac25708e473ec035c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 59eb1f8398ddf1f4bd05a493a6ff4e41fb3f3580d0f3b143ffefed385b435fd3f521b1aaaaf0e8eee97838a1bc81d992081597738c743becfc4b651aa051b97f
         
     | 
    
        data/.travis.yml
    CHANGED
    
    | 
         @@ -38,8 +38,7 @@ script: "bundle exec rake test" 
     | 
|
| 
       38 
38 
     | 
    
         | 
| 
       39 
39 
     | 
    
         
             
            notifications:
         
     | 
| 
       40 
40 
     | 
    
         
             
              email: false
         
     | 
| 
       41 
     | 
    
         
            -
               
     | 
| 
      
 41 
     | 
    
         
            +
              slack:
         
     | 
| 
       42 
42 
     | 
    
         
             
                on_success: change
         
     | 
| 
       43 
43 
     | 
    
         
             
                on_failure: always
         
     | 
| 
       44 
     | 
    
         
            -
                 
     | 
| 
       45 
     | 
    
         
            -
                  - secure: "TRiqvuM4i/QmRDWjUSNitE5/P91BOzDkNl53+bZjjtxcISCswZtmECWBR7n9\n3xwqCOU1o2lfohxZ32OHOj/Nj7o+90zWJfWxcv+if0hIXRiil62M5pg0lZUd\nyJ4M5VQ0lSWo5he1OUrXhSabPJeaK3B8yT/tdh+qO5yzR+vb/jc="
         
     | 
| 
      
 44 
     | 
    
         
            +
                secure: Q3M+kmude3FjisibEeeGe0wSMXgvwLH+vL7Zrx9//q4QtkfnrQ/BBMvY9KXxPEsNF+eys4YopYjTkJ8uRmeboUATW/oQ4Jrv3+u3zkIHK2sFn/Q2cQWpK5w+CbgEnHPjKYnUu34b09njXTgDlr/mqtbPqrKeZ1dLlpKXCB/q4GY=
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,13 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ### Unreleased
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            ### 3.5.3 - 2015-12-10
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            * bug fixes
         
     | 
| 
      
 6 
     | 
    
         
            +
              * Fix password reset for records where `confirmation_required?` is disabled and
         
     | 
| 
      
 7 
     | 
    
         
            +
                `confirmation_sent_at` is nil. (by @andygeers)
         
     | 
| 
      
 8 
     | 
    
         
            +
              * Allow resources with no `email` field to be recoverable (and do not clear the
         
     | 
| 
      
 9 
     | 
    
         
            +
                reset password token if the model was already persisted). (by @seddy, @stanhu)
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            * enhancements
         
     | 
| 
      
 12 
     | 
    
         
            +
              * Upon setting `Devise.send_password_change_notification = true` a user will receive notification when their password has been changed.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
       1 
14 
     | 
    
         
             
            ### 3.5.2 - 2015-08-10
         
     | 
| 
       2 
15 
     | 
    
         | 
| 
       3 
16 
     | 
    
         
             
            * enhancements
         
     | 
| 
       4 
17 
     | 
    
         
             
              * Perform case insensitive basic authorization matching
         
     | 
| 
       5 
18 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
            *  
     | 
| 
      
 19 
     | 
    
         
            +
            * bug fixes
         
     | 
| 
       7 
20 
     | 
    
         
             
              * Do not use digests for password confirmation token
         
     | 
| 
       8 
21 
     | 
    
         
             
              * Fix infinite redirect in Rails 4.2 authenticated routes
         
     | 
| 
       9 
22 
     | 
    
         
             
              * Autoload Devise::Encryptor to avoid errors on thread-safe mode
         
     | 
| 
       10 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
            * deprecations
         
     | 
| 
      
 25 
     | 
    
         
            +
              * `config.expire_auth_token_on_timeout` was removed
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
       11 
27 
     | 
    
         
             
            ### 3.5.1 - 2015-05-24
         
     | 
| 
       12 
28 
     | 
    
         | 
| 
       13 
29 
     | 
    
         
             
            Note: 3.5.0 has been yanked due to a regression
         
     | 
    
        data/CODE_OF_CONDUCT.md
    ADDED
    
    | 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Contributor Code of Conduct
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            Examples of unacceptable behavior by participants include:
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            * The use of sexualized language or imagery
         
     | 
| 
      
 10 
     | 
    
         
            +
            * Personal attacks
         
     | 
| 
      
 11 
     | 
    
         
            +
            * Trolling or insulting/derogatory comments
         
     | 
| 
      
 12 
     | 
    
         
            +
            * Public or private harassment
         
     | 
| 
      
 13 
     | 
    
         
            +
            * Publishing other's private information, such as physical or electronic addresses, without explicit permission
         
     | 
| 
      
 14 
     | 
    
         
            +
            * Other unethical or unprofessional conduct.
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by sending an email to [conduct@plataformatec.com.br](conduct@plataformatec.com.br) or contacting one or more of the project maintainers.
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
         
     | 
    
        data/CONTRIBUTING.md
    CHANGED
    
    | 
         @@ -8,6 +8,8 @@ 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            4) When reporting an issue, include Rails, Devise and Warden versions. If you are getting exceptions, please include the full backtrace.
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
      
 11 
     | 
    
         
            +
            5) Notice that all of your interactions in the project are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md)
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
       11 
13 
     | 
    
         
             
            That's it! The more information you give, the easier it becomes for us to track it down and fix it.
         
     | 
| 
       12 
14 
     | 
    
         
             
            Ideally, you should provide an application that reproduces the error or a test case to Devise's suite.
         
     | 
| 
       13 
15 
     | 
    
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                devise (3.5. 
     | 
| 
      
 4 
     | 
    
         
            +
                devise (3.5.3)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  bcrypt (~> 3.0)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  orm_adapter (~> 0.1)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  railties (>= 3.2.6, < 5)
         
     | 
| 
         @@ -153,7 +153,7 @@ GEM 
     | 
|
| 
       153 
153 
     | 
    
         
             
                thread_safe (0.3.5)
         
     | 
| 
       154 
154 
     | 
    
         
             
                tzinfo (1.2.2)
         
     | 
| 
       155 
155 
     | 
    
         
             
                  thread_safe (~> 0.1)
         
     | 
| 
       156 
     | 
    
         
            -
                warden (1.2. 
     | 
| 
      
 156 
     | 
    
         
            +
                warden (1.2.4)
         
     | 
| 
       157 
157 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       158 
158 
     | 
    
         
             
                webrat (0.7.3)
         
     | 
| 
       159 
159 
     | 
    
         
             
                  nokogiri (>= 1.2.0)
         
     | 
| 
         @@ -20,6 +20,6 @@ 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            <%- if devise_mapping.omniauthable? %>
         
     | 
| 
       22 
22 
     | 
    
         
             
              <%- resource_class.omniauth_providers.each do |provider| %>
         
     | 
| 
       23 
     | 
    
         
            -
                <%= link_to "Sign in with #{provider 
     | 
| 
      
 23 
     | 
    
         
            +
                <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
         
     | 
| 
       24 
24 
     | 
    
         
             
              <% end -%>
         
     | 
| 
       25 
25 
     | 
    
         
             
            <% end -%>
         
     | 
    
        data/config/locales/en.yml
    CHANGED
    
    | 
         @@ -23,6 +23,8 @@ en: 
     | 
|
| 
       23 
23 
     | 
    
         
             
                    subject: "Reset password instructions"
         
     | 
| 
       24 
24 
     | 
    
         
             
                  unlock_instructions:
         
     | 
| 
       25 
25 
     | 
    
         
             
                    subject: "Unlock instructions"
         
     | 
| 
      
 26 
     | 
    
         
            +
                  password_change:
         
     | 
| 
      
 27 
     | 
    
         
            +
                    subject: "Password Changed"
         
     | 
| 
       26 
28 
     | 
    
         
             
                omniauth_callbacks:
         
     | 
| 
       27 
29 
     | 
    
         
             
                  failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
         
     | 
| 
       28 
30 
     | 
    
         
             
                  success: "Successfully authenticated from %{kind} account."
         
     | 
| 
         @@ -49,7 +49,7 @@ GIT 
     | 
|
| 
       49 
49 
     | 
    
         
             
            PATH
         
     | 
| 
       50 
50 
     | 
    
         
             
              remote: ..
         
     | 
| 
       51 
51 
     | 
    
         
             
              specs:
         
     | 
| 
       52 
     | 
    
         
            -
                devise (3. 
     | 
| 
      
 52 
     | 
    
         
            +
                devise (3.5.3)
         
     | 
| 
       53 
53 
     | 
    
         
             
                  bcrypt (~> 3.0)
         
     | 
| 
       54 
54 
     | 
    
         
             
                  orm_adapter (~> 0.1)
         
     | 
| 
       55 
55 
     | 
    
         
             
                  railties (>= 3.2.6, < 5)
         
     | 
| 
         @@ -142,7 +142,7 @@ GEM 
     | 
|
| 
       142 
142 
     | 
    
         
             
                  polyglot
         
     | 
| 
       143 
143 
     | 
    
         
             
                  polyglot (>= 0.3.1)
         
     | 
| 
       144 
144 
     | 
    
         
             
                tzinfo (0.3.43)
         
     | 
| 
       145 
     | 
    
         
            -
                warden (1.2. 
     | 
| 
      
 145 
     | 
    
         
            +
                warden (1.2.4)
         
     | 
| 
       146 
146 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       147 
147 
     | 
    
         
             
                webrat (0.7.3)
         
     | 
| 
       148 
148 
     | 
    
         
             
                  nokogiri (>= 1.2.0)
         
     | 
| 
         @@ -167,3 +167,6 @@ DEPENDENCIES 
     | 
|
| 
       167 
167 
     | 
    
         
             
              rdoc
         
     | 
| 
       168 
168 
     | 
    
         
             
              sqlite3
         
     | 
| 
       169 
169 
     | 
    
         
             
              webrat (= 0.7.3)
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 172 
     | 
    
         
            +
               1.10.6
         
     | 
| 
         @@ -43,7 +43,7 @@ GIT 
     | 
|
| 
       43 
43 
     | 
    
         
             
            PATH
         
     | 
| 
       44 
44 
     | 
    
         
             
              remote: ..
         
     | 
| 
       45 
45 
     | 
    
         
             
              specs:
         
     | 
| 
       46 
     | 
    
         
            -
                devise (3. 
     | 
| 
      
 46 
     | 
    
         
            +
                devise (3.5.3)
         
     | 
| 
       47 
47 
     | 
    
         
             
                  bcrypt (~> 3.0)
         
     | 
| 
       48 
48 
     | 
    
         
             
                  orm_adapter (~> 0.1)
         
     | 
| 
       49 
49 
     | 
    
         
             
                  railties (>= 3.2.6, < 5)
         
     | 
| 
         @@ -136,7 +136,7 @@ GEM 
     | 
|
| 
       136 
136 
     | 
    
         
             
                thread_safe (0.3.5)
         
     | 
| 
       137 
137 
     | 
    
         
             
                tilt (1.4.1)
         
     | 
| 
       138 
138 
     | 
    
         
             
                tzinfo (0.3.43)
         
     | 
| 
       139 
     | 
    
         
            -
                warden (1.2. 
     | 
| 
      
 139 
     | 
    
         
            +
                warden (1.2.4)
         
     | 
| 
       140 
140 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       141 
141 
     | 
    
         
             
                webrat (0.7.3)
         
     | 
| 
       142 
142 
     | 
    
         
             
                  nokogiri (>= 1.2.0)
         
     | 
| 
         @@ -161,3 +161,6 @@ DEPENDENCIES 
     | 
|
| 
       161 
161 
     | 
    
         
             
              rdoc
         
     | 
| 
       162 
162 
     | 
    
         
             
              sqlite3
         
     | 
| 
       163 
163 
     | 
    
         
             
              webrat (= 0.7.3)
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 166 
     | 
    
         
            +
               1.10.6
         
     | 
| 
         @@ -48,7 +48,7 @@ GIT 
     | 
|
| 
       48 
48 
     | 
    
         
             
            PATH
         
     | 
| 
       49 
49 
     | 
    
         
             
              remote: ..
         
     | 
| 
       50 
50 
     | 
    
         
             
              specs:
         
     | 
| 
       51 
     | 
    
         
            -
                devise (3. 
     | 
| 
      
 51 
     | 
    
         
            +
                devise (3.5.3)
         
     | 
| 
       52 
52 
     | 
    
         
             
                  bcrypt (~> 3.0)
         
     | 
| 
       53 
53 
     | 
    
         
             
                  orm_adapter (~> 0.1)
         
     | 
| 
       54 
54 
     | 
    
         
             
                  railties (>= 3.2.6, < 5)
         
     | 
| 
         @@ -142,7 +142,7 @@ GEM 
     | 
|
| 
       142 
142 
     | 
    
         
             
                tilt (1.4.1)
         
     | 
| 
       143 
143 
     | 
    
         
             
                tzinfo (1.2.2)
         
     | 
| 
       144 
144 
     | 
    
         
             
                  thread_safe (~> 0.1)
         
     | 
| 
       145 
     | 
    
         
            -
                warden (1.2. 
     | 
| 
      
 145 
     | 
    
         
            +
                warden (1.2.4)
         
     | 
| 
       146 
146 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       147 
147 
     | 
    
         
             
                webrat (0.7.3)
         
     | 
| 
       148 
148 
     | 
    
         
             
                  nokogiri (>= 1.2.0)
         
     | 
| 
         @@ -167,3 +167,6 @@ DEPENDENCIES 
     | 
|
| 
       167 
167 
     | 
    
         
             
              rdoc
         
     | 
| 
       168 
168 
     | 
    
         
             
              sqlite3
         
     | 
| 
       169 
169 
     | 
    
         
             
              webrat (= 0.7.3)
         
     | 
| 
      
 170 
     | 
    
         
            +
             
     | 
| 
      
 171 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 172 
     | 
    
         
            +
               1.10.6
         
     | 
| 
         @@ -58,7 +58,7 @@ GIT 
     | 
|
| 
       58 
58 
     | 
    
         
             
            PATH
         
     | 
| 
       59 
59 
     | 
    
         
             
              remote: ..
         
     | 
| 
       60 
60 
     | 
    
         
             
              specs:
         
     | 
| 
       61 
     | 
    
         
            -
                devise (3. 
     | 
| 
      
 61 
     | 
    
         
            +
                devise (3.5.3)
         
     | 
| 
       62 
62 
     | 
    
         
             
                  bcrypt (~> 3.0)
         
     | 
| 
       63 
63 
     | 
    
         
             
                  orm_adapter (~> 0.1)
         
     | 
| 
       64 
64 
     | 
    
         
             
                  railties (>= 3.2.6, < 5)
         
     | 
| 
         @@ -164,7 +164,7 @@ GEM 
     | 
|
| 
       164 
164 
     | 
    
         
             
                tilt (1.4.1)
         
     | 
| 
       165 
165 
     | 
    
         
             
                tzinfo (1.2.2)
         
     | 
| 
       166 
166 
     | 
    
         
             
                  thread_safe (~> 0.1)
         
     | 
| 
       167 
     | 
    
         
            -
                warden (1.2. 
     | 
| 
      
 167 
     | 
    
         
            +
                warden (1.2.4)
         
     | 
| 
       168 
168 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       169 
169 
     | 
    
         
             
                webrat (0.7.3)
         
     | 
| 
       170 
170 
     | 
    
         
             
                  nokogiri (>= 1.2.0)
         
     | 
| 
         @@ -189,3 +189,6 @@ DEPENDENCIES 
     | 
|
| 
       189 
189 
     | 
    
         
             
              rdoc
         
     | 
| 
       190 
190 
     | 
    
         
             
              sqlite3
         
     | 
| 
       191 
191 
     | 
    
         
             
              webrat (= 0.7.3)
         
     | 
| 
      
 192 
     | 
    
         
            +
             
     | 
| 
      
 193 
     | 
    
         
            +
            BUNDLED WITH
         
     | 
| 
      
 194 
     | 
    
         
            +
               1.10.6
         
     | 
    
        data/lib/devise.rb
    CHANGED
    
    | 
         @@ -150,6 +150,10 @@ module Devise 
     | 
|
| 
       150 
150 
     | 
    
         
             
              mattr_accessor :pepper
         
     | 
| 
       151 
151 
     | 
    
         
             
              @@pepper = nil
         
     | 
| 
       152 
152 
     | 
    
         | 
| 
      
 153 
     | 
    
         
            +
              # Used to enable sending notification to user when their password is changed
         
     | 
| 
      
 154 
     | 
    
         
            +
              mattr_accessor :send_password_change_notification
         
     | 
| 
      
 155 
     | 
    
         
            +
              @@send_password_change_notification = false
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       153 
157 
     | 
    
         
             
              # Scoped views. Since it relies on fallbacks to render default views, it's
         
     | 
| 
       154 
158 
     | 
    
         
             
              # turned off by default.
         
     | 
| 
       155 
159 
     | 
    
         
             
              mattr_accessor :scoped_views
         
     | 
| 
         @@ -325,7 +329,12 @@ module Devise 
     | 
|
| 
       325 
329 
     | 
    
         
             
                mapping
         
     | 
| 
       326 
330 
     | 
    
         
             
              end
         
     | 
| 
       327 
331 
     | 
    
         | 
| 
       328 
     | 
    
         
            -
              #  
     | 
| 
      
 332 
     | 
    
         
            +
              # Register available devise modules. For the standard modules that Devise provides, this method is
         
     | 
| 
      
 333 
     | 
    
         
            +
              # called from lib/devise/modules.rb. Third-party modules need to be added explicitly using this method.
         
     | 
| 
      
 334 
     | 
    
         
            +
              #
         
     | 
| 
      
 335 
     | 
    
         
            +
              # Note that adding a module using this method does not cause it to be used in the authentication
         
     | 
| 
      
 336 
     | 
    
         
            +
              # process. That requires that the module be listed in the arguments passed to the 'devise' method
         
     | 
| 
      
 337 
     | 
    
         
            +
              # in the model class definition.
         
     | 
| 
       329 
338 
     | 
    
         
             
              #
         
     | 
| 
       330 
339 
     | 
    
         
             
              # == Options:
         
     | 
| 
       331 
340 
     | 
    
         
             
              #
         
     | 
| 
         @@ -433,8 +442,8 @@ module Devise 
     | 
|
| 
       433 
442 
     | 
    
         
             
                Devise::Controllers::UrlHelpers.generate_helpers!
         
     | 
| 
       434 
443 
     | 
    
         
             
              end
         
     | 
| 
       435 
444 
     | 
    
         | 
| 
       436 
     | 
    
         
            -
              # A method used internally to setup warden manager  
     | 
| 
       437 
     | 
    
         
            -
              #  
     | 
| 
      
 445 
     | 
    
         
            +
              # A method used internally to complete the setup of warden manager after routes are loaded.
         
     | 
| 
      
 446 
     | 
    
         
            +
              # See lib/devise/rails/routes.rb - ActionDispatch::Routing::RouteSet#finalize_with_devise!
         
     | 
| 
       438 
447 
     | 
    
         
             
              def self.configure_warden! #:nodoc:
         
     | 
| 
       439 
448 
     | 
    
         
             
                @@warden_configured ||= begin
         
     | 
| 
       440 
449 
     | 
    
         
             
                  warden_config.failure_app   = Devise::Delegator.new
         
     | 
| 
         @@ -7,7 +7,9 @@ module Devise 
     | 
|
| 
       7 
7 
     | 
    
         
             
                  include Devise::Controllers::StoreLocation
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
                  included do
         
     | 
| 
       10 
     | 
    
         
            -
                     
     | 
| 
      
 10 
     | 
    
         
            +
                    if respond_to?(:helper_method)
         
     | 
| 
      
 11 
     | 
    
         
            +
                      helper_method :warden, :signed_in?, :devise_controller?
         
     | 
| 
      
 12 
     | 
    
         
            +
                    end
         
     | 
| 
       11 
13 
     | 
    
         
             
                  end
         
     | 
| 
       12 
14 
     | 
    
         | 
| 
       13 
15 
     | 
    
         
             
                  module ClassMethods
         
     | 
| 
         @@ -69,7 +71,9 @@ module Devise 
     | 
|
| 
       69 
71 
     | 
    
         
             
                          end.compact
         
     | 
| 
       70 
72 
     | 
    
         
             
                        end
         
     | 
| 
       71 
73 
     | 
    
         | 
| 
       72 
     | 
    
         
            -
                         
     | 
| 
      
 74 
     | 
    
         
            +
                        if respond_to?(:helper_method)
         
     | 
| 
      
 75 
     | 
    
         
            +
                          helper_method "current_#{group_name}", "current_#{group_name.to_s.pluralize}", "#{group_name}_signed_in?"
         
     | 
| 
      
 76 
     | 
    
         
            +
                        end
         
     | 
| 
       73 
77 
     | 
    
         
             
                      METHODS
         
     | 
| 
       74 
78 
     | 
    
         
             
                    end
         
     | 
| 
       75 
79 
     | 
    
         | 
| 
         @@ -126,7 +130,9 @@ module Devise 
     | 
|
| 
       126 
130 
     | 
    
         
             
                    METHODS
         
     | 
| 
       127 
131 
     | 
    
         | 
| 
       128 
132 
     | 
    
         
             
                    ActiveSupport.on_load(:action_controller) do
         
     | 
| 
       129 
     | 
    
         
            -
                       
     | 
| 
      
 133 
     | 
    
         
            +
                      if respond_to?(:helper_method)
         
     | 
| 
      
 134 
     | 
    
         
            +
                        helper_method "current_#{mapping}", "#{mapping}_signed_in?", "#{mapping}_session"
         
     | 
| 
      
 135 
     | 
    
         
            +
                      end
         
     | 
| 
       130 
136 
     | 
    
         
             
                    end
         
     | 
| 
       131 
137 
     | 
    
         
             
                  end
         
     | 
| 
       132 
138 
     | 
    
         | 
| 
         @@ -190,10 +196,10 @@ module Devise 
     | 
|
| 
       190 
196 
     | 
    
         
             
                  # root path. For a user scope, you can define the default url in
         
     | 
| 
       191 
197 
     | 
    
         
             
                  # the following way:
         
     | 
| 
       192 
198 
     | 
    
         
             
                  #
         
     | 
| 
       193 
     | 
    
         
            -
                  #    
     | 
| 
      
 199 
     | 
    
         
            +
                  #   get '/users' => 'users#index', as: :user_root # creates user_root_path
         
     | 
| 
       194 
200 
     | 
    
         
             
                  #
         
     | 
| 
       195 
     | 
    
         
            -
                  #    
     | 
| 
       196 
     | 
    
         
            -
                  #      
     | 
| 
      
 201 
     | 
    
         
            +
                  #   namespace :user do
         
     | 
| 
      
 202 
     | 
    
         
            +
                  #     root 'users#index' # creates user_root_path
         
     | 
| 
       197 
203 
     | 
    
         
             
                  #   end
         
     | 
| 
       198 
204 
     | 
    
         
             
                  #
         
     | 
| 
       199 
205 
     | 
    
         
             
                  # If the resource root path is not defined, root_path is used. However,
         
     | 
    
        data/lib/devise/failure_app.rb
    CHANGED
    
    | 
         @@ -22,9 +22,12 @@ module Devise 
     | 
|
| 
       22 
22 
     | 
    
         
             
                  @respond.call(env)
         
     | 
| 
       23 
23 
     | 
    
         
             
                end
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
      
 25 
     | 
    
         
            +
                # Try retrieving the URL options from the parent controller (usually 
         
     | 
| 
      
 26 
     | 
    
         
            +
                # ApplicationController). Instance methods are not supported at the moment,
         
     | 
| 
      
 27 
     | 
    
         
            +
                # so only the class-level attribute is used.
         
     | 
| 
       25 
28 
     | 
    
         
             
                def self.default_url_options(*args)
         
     | 
| 
       26 
     | 
    
         
            -
                  if defined?( 
     | 
| 
       27 
     | 
    
         
            -
                     
     | 
| 
      
 29 
     | 
    
         
            +
                  if defined?(Devise.parent_controller.constantize)
         
     | 
| 
      
 30 
     | 
    
         
            +
                    Devise.parent_controller.constantize.try(:default_url_options) || {}
         
     | 
| 
       28 
31 
     | 
    
         
             
                  else
         
     | 
| 
       29 
32 
     | 
    
         
             
                    {}
         
     | 
| 
       30 
33 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -48,7 +51,18 @@ module Devise 
     | 
|
| 
       48 
51 
     | 
    
         
             
                end
         
     | 
| 
       49 
52 
     | 
    
         | 
| 
       50 
53 
     | 
    
         
             
                def recall
         
     | 
| 
       51 
     | 
    
         
            -
                   
     | 
| 
      
 54 
     | 
    
         
            +
                  config = Rails.application.config
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
                  if config.try(:relative_url_root)
         
     | 
| 
      
 57 
     | 
    
         
            +
                    base_path = Pathname.new(config.relative_url_root)
         
     | 
| 
      
 58 
     | 
    
         
            +
                    full_path = Pathname.new(attempted_path)
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                    env["SCRIPT_NAME"] = config.relative_url_root
         
     | 
| 
      
 61 
     | 
    
         
            +
                    env["PATH_INFO"] = '/' + full_path.relative_path_from(base_path).to_s
         
     | 
| 
      
 62 
     | 
    
         
            +
                  else
         
     | 
| 
      
 63 
     | 
    
         
            +
                    env["PATH_INFO"]  = attempted_path
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
       52 
66 
     | 
    
         
             
                  flash.now[:alert] = i18n_message(:invalid) if is_flashing_format?
         
     | 
| 
       53 
67 
     | 
    
         
             
                  self.response = recall_app(warden_options[:recall]).call(env)
         
     | 
| 
       54 
68 
     | 
    
         
             
                end
         
     | 
| 
         @@ -7,7 +7,8 @@ Warden::Manager.after_set_user do |record, warden, options| 
     | 
|
| 
       7 
7 
     | 
    
         
             
              scope = options[:scope]
         
     | 
| 
       8 
8 
     | 
    
         
             
              env   = warden.request.env
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
              if record && record.respond_to?(:timedout?) && warden.authenticated?(scope) && 
     | 
| 
      
 10 
     | 
    
         
            +
              if record && record.respond_to?(:timedout?) && warden.authenticated?(scope) &&
         
     | 
| 
      
 11 
     | 
    
         
            +
                 options[:store] != false && !env['devise.skip_timeoutable']
         
     | 
| 
       11 
12 
     | 
    
         
             
                last_request_at = warden.session(scope)['last_request_at']
         
     | 
| 
       12 
13 
     | 
    
         | 
| 
       13 
14 
     | 
    
         
             
                if last_request_at.is_a? Integer
         
     | 
    
        data/lib/devise/models.rb
    CHANGED
    
    | 
         @@ -12,7 +12,7 @@ module Devise 
     | 
|
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
                # Creates configuration values for Devise and for the given module.
         
     | 
| 
       14 
14 
     | 
    
         
             
                #
         
     | 
| 
       15 
     | 
    
         
            -
                #   Devise::Models.config(Devise:: 
     | 
| 
      
 15 
     | 
    
         
            +
                #   Devise::Models.config(Devise::DatabaseAuthenticatable, :stretches)
         
     | 
| 
       16 
16 
     | 
    
         
             
                #
         
     | 
| 
       17 
17 
     | 
    
         
             
                # The line above creates:
         
     | 
| 
       18 
18 
     | 
    
         
             
                #
         
     | 
| 
         @@ -24,7 +24,7 @@ module Devise 
     | 
|
| 
       24 
24 
     | 
    
         
             
                #     By default allow_unconfirmed_access_for is zero, it means users always have to confirm to sign in.
         
     | 
| 
       25 
25 
     | 
    
         
             
                #   * +reconfirmable+: requires any email changes to be confirmed (exactly the same way as
         
     | 
| 
       26 
26 
     | 
    
         
             
                #     initial account confirmation) to be applied. Requires additional unconfirmed_email
         
     | 
| 
       27 
     | 
    
         
            -
                #     db field to be setup (t.reconfirmable in migrations). Until confirmed new email is
         
     | 
| 
      
 27 
     | 
    
         
            +
                #     db field to be setup (t.reconfirmable in migrations). Until confirmed, new email is
         
     | 
| 
       28 
28 
     | 
    
         
             
                #     stored in unconfirmed email column, and copied to email column on successful
         
     | 
| 
       29 
29 
     | 
    
         
             
                #     confirmation.
         
     | 
| 
       30 
30 
     | 
    
         
             
                #   * +confirm_within+: the time before a sent confirmation token becomes invalid.
         
     | 
| 
         @@ -216,7 +216,7 @@ module Devise 
     | 
|
| 
       216 
216 
     | 
    
         
             
                    #   confirmation_period_expired?  # will always return false
         
     | 
| 
       217 
217 
     | 
    
         
             
                    #
         
     | 
| 
       218 
218 
     | 
    
         
             
                    def confirmation_period_expired?
         
     | 
| 
       219 
     | 
    
         
            -
                      self.class.confirm_within && (Time.now > self.confirmation_sent_at + self.class.confirm_within)
         
     | 
| 
      
 219 
     | 
    
         
            +
                      self.class.confirm_within && self.confirmation_sent_at && (Time.now > self.confirmation_sent_at + self.class.confirm_within)
         
     | 
| 
       220 
220 
     | 
    
         
             
                    end
         
     | 
| 
       221 
221 
     | 
    
         | 
| 
       222 
222 
     | 
    
         
             
                    # Checks whether the record requires any confirmation.
         
     | 
| 
         @@ -12,7 +12,7 @@ module Devise 
     | 
|
| 
       12 
12 
     | 
    
         
             
                #
         
     | 
| 
       13 
13 
     | 
    
         
             
                # == Options
         
     | 
| 
       14 
14 
     | 
    
         
             
                #
         
     | 
| 
       15 
     | 
    
         
            -
                #  
     | 
| 
      
 15 
     | 
    
         
            +
                # DatabaseAuthenticatable adds the following options to devise_for:
         
     | 
| 
       16 
16 
     | 
    
         
             
                #
         
     | 
| 
       17 
17 
     | 
    
         
             
                #   * +pepper+: a random string used to provide a more secure hash. Use
         
     | 
| 
       18 
18 
     | 
    
         
             
                #     `rake secret` to generate new keys.
         
     | 
| 
         @@ -27,6 +27,8 @@ module Devise 
     | 
|
| 
       27 
27 
     | 
    
         
             
                  extend ActiveSupport::Concern
         
     | 
| 
       28 
28 
     | 
    
         | 
| 
       29 
29 
     | 
    
         
             
                  included do
         
     | 
| 
      
 30 
     | 
    
         
            +
                    after_update :send_password_change_notification, if: :send_password_change_notification?
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       30 
32 
     | 
    
         
             
                    attr_reader :password, :current_password
         
     | 
| 
       31 
33 
     | 
    
         
             
                    attr_accessor :password_confirmation
         
     | 
| 
       32 
34 
     | 
    
         
             
                  end
         
     | 
| 
         @@ -133,6 +135,10 @@ module Devise 
     | 
|
| 
       133 
135 
     | 
    
         
             
                    encrypted_password[0,29] if encrypted_password
         
     | 
| 
       134 
136 
     | 
    
         
             
                  end
         
     | 
| 
       135 
137 
     | 
    
         | 
| 
      
 138 
     | 
    
         
            +
                  def send_password_change_notification
         
     | 
| 
      
 139 
     | 
    
         
            +
                    send_devise_notification(:password_change)
         
     | 
| 
      
 140 
     | 
    
         
            +
                  end
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
       136 
142 
     | 
    
         
             
                protected
         
     | 
| 
       137 
143 
     | 
    
         | 
| 
       138 
144 
     | 
    
         
             
                  # Digests the password using bcrypt. Custom encryption should override
         
     | 
| 
         @@ -144,8 +150,12 @@ module Devise 
     | 
|
| 
       144 
150 
     | 
    
         
             
                    Devise::Encryptor.digest(self.class, password)
         
     | 
| 
       145 
151 
     | 
    
         
             
                  end
         
     | 
| 
       146 
152 
     | 
    
         | 
| 
      
 153 
     | 
    
         
            +
                  def send_password_change_notification?
         
     | 
| 
      
 154 
     | 
    
         
            +
                    self.class.send_password_change_notification && encrypted_password_changed?
         
     | 
| 
      
 155 
     | 
    
         
            +
                  end
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       147 
157 
     | 
    
         
             
                  module ClassMethods
         
     | 
| 
       148 
     | 
    
         
            -
                    Devise::Models.config(self, :pepper, :stretches)
         
     | 
| 
      
 158 
     | 
    
         
            +
                    Devise::Models.config(self, :pepper, :stretches, :send_password_change_notification)
         
     | 
| 
       149 
159 
     | 
    
         | 
| 
       150 
160 
     | 
    
         
             
                    # We assume this method already gets the sanitized values from the
         
     | 
| 
       151 
161 
     | 
    
         
             
                    # DatabaseAuthenticatable strategy. If you are using this method on
         
     |