authentication-zero 2.16.0 → 2.16.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: c00816db2934b9b60ab46d76d5126467640cb19474fa92714b8fa9100e37c1e0
4
- data.tar.gz: 5890c1b1239b2a7ae7071b8a53c2ab1d9e9c51fcefc963d02ac7fe63034cbd9a
3
+ metadata.gz: 7dd52b852437d965454115d4fbb2d80f6b97f04dbe0d77e8a4524a4fb6052a89
4
+ data.tar.gz: 297f4bc57d8612d77c89eae113b558014f9b3b174eeebd13c2c6d73d78d7cad5
5
5
  SHA512:
6
- metadata.gz: '09f46b7b85266413e2cdec433fad41bcaab8cd17c085242e2073f96718db5a62f6057f9a09f2cbf2ee03021768fd2dae20fca6078afc03a74b563c0545761862'
7
- data.tar.gz: 0cc1918f61712a284e46079c64954c0b944d785fa8bc70ebda8bfd2698cccde74863e7140123ebb1fdfce81d02d4ac94a9ea3dec5fdedef9c547c1fec92eb0b8
6
+ metadata.gz: e43b09a82b8a63605a3c7ddb2d139890c5bd5153db25b8c5a535f570cf796a12f1e2520add1231bf72d95b4821871c0da72adc21e6a09b4597e5e9e65db9407f
7
+ data.tar.gz: d2d50163045d57ee8b87a0277b0f023d4d35d603637bc94bcae7c78f914afde8131ba725095627256fe93f77ca5484adb8b2247cf238b80bc3e57175db625b38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.16.0)
4
+ authentication-zero (2.16.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -40,8 +40,6 @@ The purpose of authentication zero is to generate a pre-built authentication sys
40
40
 
41
41
  ## Installation
42
42
 
43
- Add this lines to your application's Gemfile:
44
-
45
43
  ```
46
44
  $ bundle add authentication-zero
47
45
  ```
@@ -50,9 +48,6 @@ $ bundle add authentication-zero
50
48
 
51
49
  ```
52
50
  $ rails generate authentication
53
- ```
54
-
55
- ```
56
51
  $ bundle install
57
52
  ```
58
53
 
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.16.0"
2
+ VERSION = "2.16.1"
3
3
  end
@@ -4,8 +4,7 @@ class Identity::EmailVerificationsController < ApplicationController
4
4
  before_action :set_user, only: :edit
5
5
 
6
6
  def edit
7
- @user.update! verified: true
8
- head :no_content
7
+ @user.update!(verified: true); head(:no_content)
9
8
  end
10
9
 
11
10
  def create
@@ -19,10 +19,10 @@ class User < ApplicationRecord
19
19
  <%- end -%>
20
20
 
21
21
  before_validation do
22
- self.email = email.try(:downcase).try(:strip)
22
+ self.email = email&.downcase&.strip
23
23
  end
24
24
 
25
- before_validation if: :email_changed? do
25
+ before_validation if: -> { email_changed? && persisted? } do
26
26
  self.verified = false
27
27
  end
28
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.16.0
4
+ version: 2.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon