minimalist_authentication 2.6.1 → 2.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7729e88f86ac9b5f9a20bc3ea20376c3ca4357cba72ee64fd9ff6b43f303d33f
4
- data.tar.gz: 263033c938eabe257b2059d0d04ca032b5f7ff49d718c78146e125fd719dcb6e
3
+ metadata.gz: c4bb59b8f43fd47739bb2d9751c0c3922100c563a244c24b33760d421c87e25c
4
+ data.tar.gz: 0cdfcf49e0fb66c595cc1be8f24f8dbab0b8c072158f5571caad2dc47f7d9799
5
5
  SHA512:
6
- metadata.gz: a722621655bbd7edaf447364ecd240239a2178824d503a152f2d420080eed6735f4f701a43ff2d9476fc1cf20f1875b1519c075a6cfea5a7f8f81a0816a425d3
7
- data.tar.gz: a0b0879d07451c6c0567578d199746326524c38c36d55aaf3315f7f9f355d05d98884628a7df30ec8befd79c29751a6ea6440f983512cb9953f89a3b931d9e9f
6
+ metadata.gz: 31b964fc19564faf080f6a93c6a36108baea9748f0305eaaf85b3e5cf37d68024f6a2f0fc71bb350b7dd41c5b8c853a40924f4f33fe69750c04124fcf14e86a1
7
+ data.tar.gz: 96ad19ef5f1a5b4cee6d99782c5ee52b3033e57bb8db59288876d223098442fd3ab567c355f48c4c030e50095c9b684dbb85a2b0600c172754babf989aa21eb0
@@ -29,6 +29,6 @@ class PasswordResetsController < ApplicationController
29
29
  end
30
30
 
31
31
  def email
32
- params.require(:user).fetch(:email)
32
+ params.dig(:user, :email)
33
33
  end
34
34
  end
@@ -44,7 +44,7 @@ module MinimalistAuthentication
44
44
  end
45
45
 
46
46
  def user_params
47
- @user_params ||= params.require(:user).permit(:email, :username, :password)
47
+ @user_params ||= params.fetch(:user, {}).permit(:email, :username, :password)
48
48
  end
49
49
 
50
50
  def set_or_verify_email
@@ -42,14 +42,6 @@ module MinimalistAuthentication
42
42
  end
43
43
 
44
44
  module ClassMethods
45
- def authenticate(params)
46
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
47
- Calling #{MinimalistAuthentication.configuration.user_model_name}::authenticate is deprecated.
48
- Use MinimalistAuthentication::Authenticator.authenticated_user instead.
49
- MSG
50
- MinimalistAuthentication::Authenticator.authenticated_user(params)
51
- end
52
-
53
45
  # Returns a frozen user with the email set to GUEST_USER_EMAIL.
54
46
  def guest
55
47
  new(email: GUEST_USER_EMAIL).freeze
@@ -80,11 +72,6 @@ module MinimalistAuthentication
80
72
  email == GUEST_USER_EMAIL
81
73
  end
82
74
 
83
- def is_guest? # rubocop:disable Naming/PredicateName
84
- ActiveSupport::Deprecation.warn("Calling #is_guest? is deprecated. Use #guest? instead")
85
- guest?
86
- end
87
-
88
75
  # Minimum password length
89
76
  def password_minimum = 12
90
77
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MinimalistAuthentication
4
- VERSION = "2.6.1"
4
+ VERSION = "2.7.0"
5
5
  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.6.1
4
+ version: 2.7.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: 2024-07-04 00:00:00.000000000 Z
12
+ date: 2024-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bcrypt