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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d5c504f4058c9844aec8cac752c479b305fc70985c51088b5f4cde9e66dce93
4
- data.tar.gz: 8612c5425755b7873703366fbbe50bd6f3eb0745e4167e0d88852cd51fa7a50e
3
+ metadata.gz: 5628f9ea69f6e8c81ea139b7e9c737b6dd7531560c2f6e46240eee051d6c29bb
4
+ data.tar.gz: ed36c9a7b63affee80dd3149eaf7d6f5f194b1f6377559ba0b7922af507a52c8
5
5
  SHA512:
6
- metadata.gz: 62996d031d6130a20f3026692ad8db6e46f9e4947d87d2fd5fc87cd49d8806ffbec30d7a483c80ca19db87452711a5035b5dfddb3b03c22e96c14c562248ddb2
7
- data.tar.gz: d79784039ab9c747f72e8e551f9c9574aa5ac7bd869e174f6e36e4d8599c23b8e81c8e5adf5c464dba84ad7838fb0b96f5ba875ea5ace3b3b03ac921a524ef6c
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)
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 (5.2.4.4)
12
- activesupport (= 5.2.4.4)
13
- activerecord (5.2.4.4)
14
- activemodel (= 5.2.4.4)
15
- activesupport (= 5.2.4.4)
16
- arel (>= 9.0)
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.7)
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.5)
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.2)
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.7)
95
+ tzinfo (1.2.9)
97
96
  thread_safe (~> 0.1)
98
97
  unicode-display_width (1.3.0)
99
- uuidtools (2.1.5)
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
@@ -1,3 +1,3 @@
1
1
  module Uuidable
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
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
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: 2020-10-27 00:00:00.000000000 Z
11
+ date: 2021-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler