validates_identity-pa_ruc 0.1.0 → 1.0.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: 187b40bdac9610cd86cff02a051ac40fb3a53c721f909c3ff41d908cccf86b2a
4
- data.tar.gz: d865f56bd0b56c85e42ba85049d9db5960eece3286589ecaa8ee7ab3f2b4fce7
3
+ metadata.gz: 8c301ed1b9fc65db29f09dce56f5071ac01fbe06a08c5c8b60c9d1c3d049ab00
4
+ data.tar.gz: 77f662fe3b0c2322f731c23749e85a2d88d2b39c955aeccb92b52a28d44d4885
5
5
  SHA512:
6
- metadata.gz: 0b7f9678113ecd47c358afd0a7a9143f10a3bf1044e187bd6d88b5f24184d8fbb4eaeeb592a306ac5bf62c5094db6da55894b169de47c7ad406319bd9eb466a9
7
- data.tar.gz: ecf7870a8d00aae47af3a77b3f6ff22ff6dcf71c4635469d35d87f2b1660761b793aa1eb6260374c0b6e0e3497c3606f91d5f62ee3e1a7cd1fd2594446ad11d4
6
+ metadata.gz: eaaf811a09b5d3a6f622757bb24099795f56e484be4631ffe172e5f60311470774c4fd1a6d167789cc74c5c8b79fe7bcbf5bcd9341754336c1129859800284c5
7
+ data.tar.gz: 86ec0dfa98d3eb389adae91e5cedd494ace1121ca947987f5156e9136a6032340fc583e7c4fa73d7703e7b93578f9a9b96856e23f944c9a134e6f8afd1f23caa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [1.0.1] - 2024-03-05
2
+
3
+ ### Fixed
4
+
5
+ - Formatting
6
+
7
+ ## [1.0.0] - 2024-02-29
8
+
9
+ ### Changed
10
+
11
+ - First deployable version. Ready to Production
12
+
1
13
  ## [0.1.0] - 2024-02-28
2
14
 
3
15
  ### Added
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- validates_identity-pa_ruc (0.1.0)
4
+ validates_identity-pa_ruc (1.0.1)
5
5
  activemodel
6
6
  validates_identity (>= 0.5.0)
7
7
 
@@ -31,8 +31,7 @@ GEM
31
31
  coolline (0.5.0)
32
32
  unicode_utils (~> 1.4)
33
33
  diff-lcs (1.5.1)
34
- drb (2.2.0)
35
- ruby2_keywords
34
+ drb (2.2.1)
36
35
  i18n (1.14.1)
37
36
  concurrent-ruby (~> 1.0)
38
37
  jazz_fingers (6.2.0)
@@ -76,7 +75,7 @@ GEM
76
75
  diff-lcs (>= 1.2.0, < 2.0)
77
76
  rspec-support (~> 3.13.0)
78
77
  rspec-support (3.13.1)
79
- rubocop (1.60.2)
78
+ rubocop (1.61.0)
80
79
  json (~> 2.3)
81
80
  language_server-protocol (>= 3.17.0)
82
81
  parallel (~> 1.10)
@@ -87,31 +86,31 @@ GEM
87
86
  rubocop-ast (>= 1.30.0, < 2.0)
88
87
  ruby-progressbar (~> 1.7)
89
88
  unicode-display_width (>= 2.4.0, < 3.0)
90
- rubocop-ast (1.30.0)
91
- parser (>= 3.2.1.0)
89
+ rubocop-ast (1.31.1)
90
+ parser (>= 3.3.0.4)
92
91
  rubocop-capybara (2.20.0)
93
92
  rubocop (~> 1.41)
94
93
  rubocop-factory_bot (2.25.1)
95
94
  rubocop (~> 1.41)
96
95
  rubocop-rake (0.6.0)
97
96
  rubocop (~> 1.0)
98
- rubocop-rspec (2.26.1)
97
+ rubocop-rspec (2.27.1)
99
98
  rubocop (~> 1.40)
100
99
  rubocop-capybara (~> 2.17)
101
100
  rubocop-factory_bot (~> 2.22)
102
101
  ruby-progressbar (1.13.0)
103
- ruby2_keywords (0.0.5)
104
102
  shoulda-matchers (6.1.0)
105
103
  activesupport (>= 5.2.0)
106
104
  tzinfo (2.0.6)
107
105
  concurrent-ruby (~> 1.0)
108
106
  unicode-display_width (2.5.0)
109
107
  unicode_utils (1.4.0)
110
- validates_identity (0.5.2)
108
+ validates_identity (1.0.0)
111
109
  activemodel
112
110
 
113
111
  PLATFORMS
114
112
  x86_64-darwin-21
113
+ x86_64-linux
115
114
 
116
115
  DEPENDENCIES
117
116
  jazz_fingers
data/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  This projects aims to validate Panama [Registro Único de Contribuyente](https://es.wikipedia.org/wiki/Documento_Personal_de_Identificaci%C3%B3n) identification document.
4
4
  This project depends on `validates_identity` gem and is a plugin for it.
5
- This project is based on documentations found [here](https://learn.sayari.com/interpreting-guatemalan-national-id-numbers/) and [here](https://www.mineduc.gob.gt/DIGEESP/documents/adecuacionesCurriculares/Documentos%20de%20Apoyo/C%C3%B3digos%20Departamentos-Municipios-Idiomas.pdf)
6
5
 
7
6
  ## Installation
8
7
 
@@ -18,7 +18,9 @@ class ValidatesIdentity
18
18
  end
19
19
 
20
20
  def formatted
21
- value
21
+ return if result.nil?
22
+
23
+ "#{result[1]}-#{result[2]}-#{result[3]}"
22
24
  end
23
25
 
24
26
  private
@@ -18,7 +18,9 @@ class ValidatesIdentity
18
18
  end
19
19
 
20
20
  def formatted
21
- value
21
+ return if result.nil?
22
+
23
+ "#{result[1]}-#{result[2]}-#{result[3]}"
22
24
  end
23
25
 
24
26
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  class ValidatesIdentity
4
4
  module PaRuc
5
- VERSION = '0.1.0'
5
+ VERSION = '1.0.1'
6
6
  end
7
7
  end
@@ -11,10 +11,10 @@ class ValidatesIdentity
11
11
  end
12
12
 
13
13
  # Legal
14
- ValidatesIdentity.register_legal_identity_type('PA_RUCL', ValidatesIdentity::PaRuc::LegalValidator)
15
- ValidatesIdentity::ShouldaMatchers.register_legal_allowed_values('PA_RUCL', %w[123456789-2-2015 10101010-1-2001 12312123-3-2040])
16
- ValidatesIdentity::ShouldaMatchers.register_legal_disallowed_values('PA_RUCL', %w[90-234-1-23 10-0-123-123])
14
+ ValidatesIdentity.register_legal_identity_type('PA_RUC_LEGAL', ValidatesIdentity::PaRuc::LegalValidator)
15
+ ValidatesIdentity::ShouldaMatchers.register_legal_allowed_values('PA_RUC_LEGAL', %w[123456789-2-2015 10101010-1-2001 12312123-3-2040])
16
+ ValidatesIdentity::ShouldaMatchers.register_legal_disallowed_values('PA_RUC_LEGAL', %w[90-234-1-23 10-0-123-123])
17
17
  # Person
18
- ValidatesIdentity.register_person_identity_type('PA_RUCP', ValidatesIdentity::PaRuc::PersonValidator)
19
- ValidatesIdentity::ShouldaMatchers.register_person_allowed_values('PA_RUCP', %w[PE-23-123 10-1-123])
20
- ValidatesIdentity::ShouldaMatchers.register_person_disallowed_values('PA_RUCP', %w[90-234-123 10-0123-123])
18
+ ValidatesIdentity.register_person_identity_type('PA_RUC_PERSON', ValidatesIdentity::PaRuc::PersonValidator)
19
+ ValidatesIdentity::ShouldaMatchers.register_person_allowed_values('PA_RUC_PERSON', %w[PE-23-123 10-1-123])
20
+ ValidatesIdentity::ShouldaMatchers.register_person_disallowed_values('PA_RUC_PERSON', %w[90-234-123 10-0123-123])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_identity-pa_ruc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Ribeiro
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel