uuid_parameter 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/locale/en.yml +3 -5
- data/config/locale/fr.yml +3 -5
- data/lib/uuid_parameter.rb +3 -3
- data/lib/uuid_parameter/concern.rb +1 -2
- data/lib/uuid_parameter/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: 9aec924495746402157494f8737e671561ecb2f0cb302dc4bfbf525bda77dccf
|
4
|
+
data.tar.gz: 43d2e7963d0d1700a8897070e87319efd1a412e1db3d123f86ef8540f5c40a1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f602aa2f1261be23dda894dfce5383e73517e37388c295c9552a11c0253da0ea23a75d259f6d94a2bfad6ac43460c2a83ff5147a153a9a41e445b8b572a85c8b
|
7
|
+
data.tar.gz: ff6158d01c6941a8309f95183264d1d665506abdb7e6d9740d3a5e09b5610aff4b471d946f9579f51de5e27d2cccf7adfc1d067b76084d8a734ffaf7e27d9e15
|
data/config/locale/en.yml
CHANGED
data/config/locale/fr.yml
CHANGED
data/lib/uuid_parameter.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# TODO: move this to the right place... But where?
|
4
|
-
I18n.load_path += Dir[File.join(__dir__, '../config/locale/*.yml')]
|
5
|
-
|
6
3
|
# == UUIDParameter
|
7
4
|
#
|
8
5
|
# UUIDParameter module provides support for UUIDs in models. It takes care of
|
@@ -29,5 +26,8 @@ I18n.load_path += Dir[File.join(__dir__, '../config/locale/*.yml')]
|
|
29
26
|
# user.to_param # => '8bb96d58-2efd-45df-833b-119971a19fea'
|
30
27
|
#
|
31
28
|
|
29
|
+
# TODO: #2 move this to the right place... But where?
|
30
|
+
I18n.load_path += Dir[File.join(__dir__, '../config/locale/*.yml')]
|
31
|
+
|
32
32
|
require 'uuid_parameter/railtie'
|
33
33
|
require 'uuid_parameter/concern'
|
@@ -12,7 +12,6 @@ module UUIDParameter
|
|
12
12
|
validates :uuid,
|
13
13
|
presence: true,
|
14
14
|
uniqueness: true,
|
15
|
-
# format: { with: UUID_V4_REGEX, message: :not_a_uuid_v4 }
|
16
15
|
with: :uuid4_validator
|
17
16
|
|
18
17
|
|
@@ -44,7 +43,7 @@ module UUIDParameter
|
|
44
43
|
end
|
45
44
|
|
46
45
|
def uuid4_validator
|
47
|
-
errors.add(:uuid, :invalid_random_uuid
|
46
|
+
errors.add(:uuid, :invalid_random_uuid) unless uuid =~ UUID_V4_REGEX
|
48
47
|
end
|
49
48
|
end
|
50
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uuid_parameter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- hellekin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10-
|
11
|
+
date: 2018-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|