minimalist_authentication 2.2.4 → 2.4.0
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.
- checksums.yaml +4 -4
 - data/MIT-LICENSE +1 -1
 - data/Rakefile +5 -33
 - data/app/controllers/password_resets_controller.rb +5 -4
 - data/lib/minimalist_authentication/configuration.rb +1 -1
 - data/lib/minimalist_authentication/version.rb +1 -1
 - metadata +7 -20
 - data/app/assets/config/minimalist_authentication_manifest.js +0 -0
 - data/lib/tasks/minimalist_authentication_tasks.rake +0 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b96cc91bf5acc0a4606333d5b09207c9c8e6116a20c7fb8b32b2bf34ba15378a
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 442db2eec5c51db232a5e490892cb2d4380501077ec0350da73f532cac080819
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 6ff22e83ea138efb4fba838deaf1697bf3e7d65eb80ec19301ed48c56c128ddb1a0838e5f31feee15ada666e228942316008724ba8ba723b11f7185aea862d9b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: afe046c528a3fda8b673ac84337450edf79ab5c12cdfb49ef52d7374d63a7c0a8062ced6d02315a4fb3f9ad749d27f52fcc075c8a3a262e1198925326e731e14
         
     | 
    
        data/MIT-LICENSE
    CHANGED
    
    | 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            Copyright 2009- 
     | 
| 
      
 1 
     | 
    
         
            +
            Copyright 2009-2022 Brightways Learning https://www.brightwayslearning.org
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            Permission is hereby granted, free of charge, to any person obtaining
         
     | 
| 
       4 
4 
     | 
    
         
             
            a copy of this software and associated documentation files (the
         
     | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -1,36 +1,8 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
              require 'bundler/setup'
         
     | 
| 
       3 
     | 
    
         
            -
            rescue LoadError
         
     | 
| 
       4 
     | 
    
         
            -
              puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
         
     | 
| 
       5 
     | 
    
         
            -
            end
         
     | 
| 
      
 1 
     | 
    
         
            +
            require "bundler/setup"
         
     | 
| 
       6 
2 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
         
     | 
| 
      
 4 
     | 
    
         
            +
            load "rails/tasks/engine.rake"
         
     | 
| 
       8 
5 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
              rdoc.rdoc_dir = 'rdoc'
         
     | 
| 
       11 
     | 
    
         
            -
              rdoc.title    = 'MinimalistAuthentication'
         
     | 
| 
       12 
     | 
    
         
            -
              rdoc.options << '--line-numbers'
         
     | 
| 
       13 
     | 
    
         
            -
              rdoc.rdoc_files.include('README.md')
         
     | 
| 
       14 
     | 
    
         
            -
              rdoc.rdoc_files.include('lib/**/*.rb')
         
     | 
| 
       15 
     | 
    
         
            -
            end
         
     | 
| 
      
 6 
     | 
    
         
            +
            load "rails/tasks/statistics.rake"
         
     | 
| 
       16 
7 
     | 
    
         | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
            load 'rails/tasks/engine.rake'
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
             
     | 
| 
       21 
     | 
    
         
            -
            load 'rails/tasks/statistics.rake'
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
             
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            require 'bundler/gem_tasks'
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            require 'rake/testtask'
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
            Rake::TestTask.new(:test) do |t|
         
     | 
| 
       30 
     | 
    
         
            -
              t.libs << 'test'
         
     | 
| 
       31 
     | 
    
         
            -
              t.pattern = 'test/**/*_test.rb'
         
     | 
| 
       32 
     | 
    
         
            -
              t.verbose = false
         
     | 
| 
       33 
     | 
    
         
            -
            end
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
             
     | 
| 
       36 
     | 
    
         
            -
            task default: :test
         
     | 
| 
      
 8 
     | 
    
         
            +
            require "bundler/gem_tasks"
         
     | 
| 
         @@ -15,16 +15,17 @@ class PasswordResetsController < ApplicationController 
     | 
|
| 
       15 
15 
     | 
    
         
             
                  MinimalistAuthenticationMailer.update_password(user).deliver_now
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
| 
       17 
17 
     | 
    
         
             
                # always display notice even if the user was not found to prevent leaking user emails
         
     | 
| 
       18 
     | 
    
         
            -
                redirect_to new_session_path, notice: "Password reset instructions were mailed to #{ 
     | 
| 
      
 18 
     | 
    
         
            +
                redirect_to new_session_path, notice: "Password reset instructions were mailed to #{email}"
         
     | 
| 
       19 
19 
     | 
    
         
             
              end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
              private
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
              def user
         
     | 
| 
       24 
     | 
    
         
            -
                 
     | 
| 
      
 24 
     | 
    
         
            +
                return unless URI::MailTo::EMAIL_REGEXP.match?(email)
         
     | 
| 
      
 25 
     | 
    
         
            +
                @user ||= MinimalistAuthentication.configuration.user_model.active.email_verified.find_by(email: email)
         
     | 
| 
       25 
26 
     | 
    
         
             
              end
         
     | 
| 
       26 
27 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
              def  
     | 
| 
       28 
     | 
    
         
            -
                params.require(:user). 
     | 
| 
      
 28 
     | 
    
         
            +
              def email
         
     | 
| 
      
 29 
     | 
    
         
            +
                params.require(:user).fetch(:email)
         
     | 
| 
       29 
30 
     | 
    
         
             
              end
         
     | 
| 
       30 
31 
     | 
    
         
             
            end
         
     | 
| 
         @@ -67,7 +67,7 @@ module MinimalistAuthentication 
     | 
|
| 
       67 
67 
     | 
    
         | 
| 
       68 
68 
     | 
    
         
             
                # Returns the user_model class
         
     | 
| 
       69 
69 
     | 
    
         
             
                # Calling constantize on a string makes this work correctly with
         
     | 
| 
       70 
     | 
    
         
            -
                # the  
     | 
| 
      
 70 
     | 
    
         
            +
                # the Spring application preloader gem.
         
     | 
| 
       71 
71 
     | 
    
         
             
                def user_model
         
     | 
| 
       72 
72 
     | 
    
         
             
                  user_model_name.constantize
         
     | 
| 
       73 
73 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: minimalist_authentication
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.4.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Aaron Baldwin
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire:
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date:  
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2023-01-31 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -45,20 +45,6 @@ dependencies: 
     | 
|
| 
       45 
45 
     | 
    
         
             
                - - ">="
         
     | 
| 
       46 
46 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       47 
47 
     | 
    
         
             
                    version: 3.1.3
         
     | 
| 
       48 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       49 
     | 
    
         
            -
              name: sqlite3
         
     | 
| 
       50 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       51 
     | 
    
         
            -
                requirements:
         
     | 
| 
       52 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       53 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: '1.3'
         
     | 
| 
       55 
     | 
    
         
            -
              type: :development
         
     | 
| 
       56 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       57 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       58 
     | 
    
         
            -
                requirements:
         
     | 
| 
       59 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       60 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       61 
     | 
    
         
            -
                    version: '1.3'
         
     | 
| 
       62 
48 
     | 
    
         
             
            description: A Rails authentication plugin that takes a minimalist approach. It is
         
     | 
| 
       63 
49 
     | 
    
         
             
              designed to be simple to understand, use, and modify for your application.
         
     | 
| 
       64 
50 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -70,7 +56,6 @@ files: 
     | 
|
| 
       70 
56 
     | 
    
         
             
            - MIT-LICENSE
         
     | 
| 
       71 
57 
     | 
    
         
             
            - README.md
         
     | 
| 
       72 
58 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       73 
     | 
    
         
            -
            - app/assets/config/minimalist_authentication_manifest.js
         
     | 
| 
       74 
59 
     | 
    
         
             
            - app/controllers/email_verifications_controller.rb
         
     | 
| 
       75 
60 
     | 
    
         
             
            - app/controllers/emails_controller.rb
         
     | 
| 
       76 
61 
     | 
    
         
             
            - app/controllers/password_resets_controller.rb
         
     | 
| 
         @@ -105,11 +90,13 @@ files: 
     | 
|
| 
       105 
90 
     | 
    
         
             
            - lib/minimalist_authentication/user.rb
         
     | 
| 
       106 
91 
     | 
    
         
             
            - lib/minimalist_authentication/verifiable_token.rb
         
     | 
| 
       107 
92 
     | 
    
         
             
            - lib/minimalist_authentication/version.rb
         
     | 
| 
       108 
     | 
    
         
            -
            - lib/tasks/minimalist_authentication_tasks.rake
         
     | 
| 
       109 
93 
     | 
    
         
             
            homepage: https://github.com/wwidea/minimalist_authentication
         
     | 
| 
       110 
94 
     | 
    
         
             
            licenses:
         
     | 
| 
       111 
95 
     | 
    
         
             
            - MIT
         
     | 
| 
       112 
     | 
    
         
            -
            metadata: 
     | 
| 
      
 96 
     | 
    
         
            +
            metadata:
         
     | 
| 
      
 97 
     | 
    
         
            +
              homepage_uri: https://github.com/wwidea/minimalist_authentication
         
     | 
| 
      
 98 
     | 
    
         
            +
              source_code_uri: https://github.com/wwidea/minimalist_authentication
         
     | 
| 
      
 99 
     | 
    
         
            +
              rubygems_mfa_required: 'true'
         
     | 
| 
       113 
100 
     | 
    
         
             
            post_install_message:
         
     | 
| 
       114 
101 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       115 
102 
     | 
    
         
             
            require_paths:
         
     | 
| 
         @@ -125,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       125 
112 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       126 
113 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       127 
114 
     | 
    
         
             
            requirements: []
         
     | 
| 
       128 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 115 
     | 
    
         
            +
            rubygems_version: 3.4.5
         
     | 
| 
       129 
116 
     | 
    
         
             
            signing_key:
         
     | 
| 
       130 
117 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       131 
118 
     | 
    
         
             
            summary: A Rails authentication plugin that takes a minimalist approach.
         
     | 
| 
         
            File without changes
         
     |