authentication_with_registration_generator 0.3.7 → 0.4.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a53cbc855638d51ce2a5de1068d3298c363a9ae7373ed73e5e9b0d68795b0f0
|
4
|
+
data.tar.gz: 87663c9181fbfe8e3294206f177fef0fa2300e0ee6196095c5b9e92eda70ca53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02a39377051fb6b42a593a4b42de98539d6b381d15ac677623e0e09cc32c0587783719e6228fe0517af05f47c8e754aea0b9b5fbb3818e202c5d7a68acbf490e
|
7
|
+
data.tar.gz: 7ba07bad578487103e57292b9fcf91297c78efec4cffa28cd3ade750e5ec5f4e3d18ec781b6550b321b052c4b2290efe08fd0db45d0f9864c988e592f7e45413
|
@@ -15,8 +15,10 @@ module Authentication
|
|
15
15
|
user_model_path = "app/models/user.rb"
|
16
16
|
|
17
17
|
# Check if the validation already exists to prevent duplication
|
18
|
-
if File.
|
19
|
-
|
18
|
+
if File.exist?(user_model_path)
|
19
|
+
if File.readlines(user_model_path).grep(/validates.*:email_address.*uniqueness/).empty?
|
20
|
+
inject_into_class user_model_path, "User", " validates :email_address, uniqueness: true\n"
|
21
|
+
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
data/lib/generators/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authentication_with_registration_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DAZ
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-04-10 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|