minimalist_authentication 2.6.0 → 2.6.1

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: d31aea6a71210e6ef2811dd5ea7d4f11654ff06cb3c5f92ace5ed00dd7d68d30
4
- data.tar.gz: 1cb2c601a6effedef5bdc61960c7e08d7947083c4f755646b92c188c50e0a96f
3
+ metadata.gz: 7729e88f86ac9b5f9a20bc3ea20376c3ca4357cba72ee64fd9ff6b43f303d33f
4
+ data.tar.gz: 263033c938eabe257b2059d0d04ca032b5f7ff49d718c78146e125fd719dcb6e
5
5
  SHA512:
6
- metadata.gz: ba68753ea4d7f106aa8c26b0972ea0d2cdc36ab5991f4ac6824fde2000603b6bae011e949d978e948ce35af00551aff8b47b943a48589f834df4242e7e889298
7
- data.tar.gz: afbcc93b12b3926d7b799267aede7ccef00ac9137f0320c0d00079035a7b81f099fda617369d445d7abea52521c32fca4317cf1a81d19022905bbe0f610bb3ab
6
+ metadata.gz: a722621655bbd7edaf447364ecd240239a2178824d503a152f2d420080eed6735f4f701a43ff2d9476fc1cf20f1875b1519c075a6cfea5a7f8f81a0816a425d3
7
+ data.tar.gz: a0b0879d07451c6c0567578d199746326524c38c36d55aaf3315f7f9f355d05d98884628a7df30ec8befd79c29751a6ea6440f983512cb9953f89a3b931d9e9f
@@ -10,10 +10,10 @@ module MinimalistAuthentication
10
10
 
11
11
  included do
12
12
  # Stores the plain text password.
13
- attr_accessor :password
13
+ attribute :password, :string
14
14
 
15
15
  # Force validations for a blank password.
16
- attr_accessor :password_required
16
+ attribute :password_required, :boolean, default: false
17
17
 
18
18
  # Hashes and stores the password on save.
19
19
  before_save :hash_password
@@ -118,7 +118,7 @@ module MinimalistAuthentication
118
118
  # stored OR are attempting to set a new password. Set **password_required**
119
119
  # to true to force validations even when the password field is blank.
120
120
  def validate_password?
121
- active? && (password_hash.blank? || password.present? || password_required)
121
+ active? && (password_hash.blank? || password? || password_required?)
122
122
  end
123
123
 
124
124
  # Validate email for active users.
@@ -15,7 +15,7 @@ module MinimalistAuthentication
15
15
  if matches_verification_token?(token)
16
16
  update(attributes) && clear_token
17
17
  else
18
- errors.add(:base, "Verfication token check failed")
18
+ errors.add(:base, "Verification token check failed")
19
19
  false
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MinimalistAuthentication
4
- VERSION = "2.6.0"
4
+ VERSION = "2.6.1"
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.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin