uuidable 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -14
- data/lib/uuidable/active_record.rb +1 -1
- data/lib/uuidable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5628f9ea69f6e8c81ea139b7e9c737b6dd7531560c2f6e46240eee051d6c29bb
|
4
|
+
data.tar.gz: ed36c9a7b63affee80dd3149eaf7d6f5f194b1f6377559ba0b7922af507a52c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1d5aa768583511f4d4427b6dab13ca72de4193993a05fd0fc29ef7140c9fcf40f55111b2cfab5fa8afde26c568fee1ae58f7ab82dd504effe76e351d14414c2
|
7
|
+
data.tar.gz: 24aa031c103ae8c1958373806335d7de27c0b3cd5ebea17c625d79831610ef6db34784b46d0051163eb991e06e0b54b63f5c72a68fe2b06c216b4906c9f4f6eb
|
data/Gemfile.lock
CHANGED
@@ -1,29 +1,28 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
uuidable (0.2.
|
4
|
+
uuidable (0.2.5)
|
5
5
|
activerecord (>= 4.2, < 6.1)
|
6
6
|
uuidtools (>= 2.1, < 3)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (
|
12
|
-
activesupport (=
|
13
|
-
activerecord (
|
14
|
-
activemodel (=
|
15
|
-
activesupport (=
|
16
|
-
|
17
|
-
activesupport (5.2.4.4)
|
11
|
+
activemodel (6.0.3.5)
|
12
|
+
activesupport (= 6.0.3.5)
|
13
|
+
activerecord (6.0.3.5)
|
14
|
+
activemodel (= 6.0.3.5)
|
15
|
+
activesupport (= 6.0.3.5)
|
16
|
+
activesupport (6.0.3.5)
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
18
|
i18n (>= 0.7, < 2)
|
20
19
|
minitest (~> 5.1)
|
21
20
|
tzinfo (~> 1.1)
|
21
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
22
22
|
addressable (2.4.0)
|
23
|
-
arel (9.0.0)
|
24
23
|
ast (2.3.0)
|
25
24
|
backports (3.6.8)
|
26
|
-
concurrent-ruby (1.1.
|
25
|
+
concurrent-ruby (1.1.8)
|
27
26
|
diff-lcs (1.2.5)
|
28
27
|
ethon (0.8.1)
|
29
28
|
ffi (>= 1.3.0)
|
@@ -40,12 +39,12 @@ GEM
|
|
40
39
|
net-http-persistent (>= 2.7)
|
41
40
|
net-http-pipeline
|
42
41
|
highline (1.7.8)
|
43
|
-
i18n (1.8.
|
42
|
+
i18n (1.8.9)
|
44
43
|
concurrent-ruby (~> 1.0)
|
45
44
|
json (2.3.1)
|
46
45
|
launchy (2.4.3)
|
47
46
|
addressable (~> 2.3)
|
48
|
-
minitest (5.14.
|
47
|
+
minitest (5.14.3)
|
49
48
|
multi_json (1.11.2)
|
50
49
|
multipart-post (2.0.0)
|
51
50
|
net-http-persistent (2.9.4)
|
@@ -93,11 +92,12 @@ GEM
|
|
93
92
|
typhoeus (~> 0.6, >= 0.6.8)
|
94
93
|
typhoeus (0.8.0)
|
95
94
|
ethon (>= 0.8.0)
|
96
|
-
tzinfo (1.2.
|
95
|
+
tzinfo (1.2.9)
|
97
96
|
thread_safe (~> 0.1)
|
98
97
|
unicode-display_width (1.3.0)
|
99
|
-
uuidtools (2.
|
98
|
+
uuidtools (2.2.0)
|
100
99
|
websocket (1.2.2)
|
100
|
+
zeitwerk (2.4.2)
|
101
101
|
|
102
102
|
PLATFORMS
|
103
103
|
ruby
|
@@ -21,7 +21,7 @@ module Uuidable
|
|
21
21
|
|
22
22
|
def uuidable(as_param: true)
|
23
23
|
after_initialize { self.uuid = Uuidable.generate_uuid if attributes.keys.include?('uuid') && uuid.blank? }
|
24
|
-
validates :uuid, presence: true, uniqueness: true
|
24
|
+
validates :uuid, presence: true, uniqueness: true, if: :uuid_changed?
|
25
25
|
|
26
26
|
if as_param
|
27
27
|
define_method :to_param do
|
data/lib/uuidable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uuidable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Gnuskov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|