uuid_parameter 0.2.2 → 0.2.3

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: 3aede0663d9d5bacb0d3e7d299b8f4b01ea5ab226b884df0429e34642387eaf9
4
- data.tar.gz: ae672857e0dd59992f3e0c6316f58b94c5aef3138081b10227b1ae135f3354a8
3
+ metadata.gz: 9aec924495746402157494f8737e671561ecb2f0cb302dc4bfbf525bda77dccf
4
+ data.tar.gz: 43d2e7963d0d1700a8897070e87319efd1a412e1db3d123f86ef8540f5c40a1e
5
5
  SHA512:
6
- metadata.gz: 2ab74071988159a8746620a8354b76a86109a43c917cb9398b5091151c1ceb4ce0e12bebf30a195ee541f9a9afdcf06142421fa79dc5fb9082dc3d13a461187a
7
- data.tar.gz: 5ea87994cdbaa557d816bc93892d64b3810baa21d04c9c30576ab434eaa03eece94bf23421808faee2958ae6f69849077638c5ba5c80ff35bfaa854b749f97c5
6
+ metadata.gz: f602aa2f1261be23dda894dfce5383e73517e37388c295c9552a11c0253da0ea23a75d259f6d94a2bfad6ac43460c2a83ff5147a153a9a41e445b8b572a85c8b
7
+ data.tar.gz: ff6158d01c6941a8309f95183264d1d665506abdb7e6d9740d3a5e09b5610aff4b471d946f9579f51de5e27d2cccf7adfc1d067b76084d8a734ffaf7e27d9e15
data/config/locale/en.yml CHANGED
@@ -1,7 +1,5 @@
1
1
  en:
2
- activerecord:
2
+ activemodel:
3
3
  errors:
4
- models:
5
- attributes:
6
- uuid:
7
- invalid_random_uuid: "must be a random UUID (v4)"
4
+ messages:
5
+ invalid_random_uuid: "must be a random UUID (v4)"
data/config/locale/fr.yml CHANGED
@@ -1,7 +1,5 @@
1
1
  fr:
2
- activerecord:
2
+ activemodel:
3
3
  errors:
4
- models:
5
- attributes:
6
- uuid:
7
- invalid_random_uuid: "doit être un UUID aléatoire (v4)"
4
+ messages:
5
+ invalid_random_uuid: "doit être un UUID aléatoire (v4)"
@@ -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, message: :not_a_uuid_v4) unless uuid =~ UUID_V4_REGEX
46
+ errors.add(:uuid, :invalid_random_uuid) unless uuid =~ UUID_V4_REGEX
48
47
  end
49
48
  end
50
49
  end
@@ -1,3 +1,3 @@
1
1
  module UUIDParameter
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  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.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 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails