rfc_facil 1.1.1 → 1.2

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
- SHA1:
3
- metadata.gz: bdef0e7bfc0c4c253f581b99434173fc6e35e1d6
4
- data.tar.gz: a7f0919ae60d0335756fc906cd9b182f3f7915c1
2
+ SHA256:
3
+ metadata.gz: c55495422ff167a77169cd360ee2cc1f9e558a35c4abe9bba5e065588c275de7
4
+ data.tar.gz: c0ae7aca6c61e4c7ebe74a45de2024dcb6582a93d62375fb76847b3a4c9de732
5
5
  SHA512:
6
- metadata.gz: a0dccb45f80671973c48773bacf398a1947e21767294d6bb1e5f19e8705d58f04523bcebfe5ecb64ae03a51b8a0cf0923c561d13545584387c7d7f6c043b596b
7
- data.tar.gz: 1f1859a905a1ae54490cdb7456768983d279c49590699d6e97d58dc1a394ff920c7ef75526501cc89b4dee0848e07f7f6293f6e1a933ea51d89430b5e3c16d5e
6
+ metadata.gz: 0ecf6e938dbaacb758b046769a373d616a5bc40b4148e8ca92519ac9b4e00b1973bc2fe7e3e56142b010b4840c62201509a3b61e99193d6e6c240af78b017c62
7
+ data.tar.gz: 71982be1b7ba0cfa5f1d03d6d14cbc684920924454a6d3f36a8c779a931b496d4f9970a100cba53eeefa9c61e9d770c08d9882dea84511623ea0b6002a02a8e0
data/README.md CHANGED
@@ -22,6 +22,9 @@ rfc.to_s # => 'RAAA921127RI6'
22
22
  ## Fuente
23
23
  Esta librería se basa en documentación oficial obtenida por medio del IFAI (Instituto Federal de Acceso a la Información). El documento puede ser consultado en el sitio de [INFOMEX](https://www.infomex.org.mx/gobiernofederal/moduloPublico/moduloPublico.action) con el folio 0610100135506.
24
24
 
25
+ ## En otros lenguajes
26
+ - .NET [migsalazar/RfcFacil](https://github.com/migsalazar/RfcFacil)
27
+
25
28
  ### Agradecimiento
26
29
  El código es una version en Ruby de [rfc-facil](https://github.com/josketres/rfc-facil) hecha en Java por [josketres](https://github.com/josketres)
27
30
 
@@ -77,7 +77,7 @@ module RfcFacil
77
77
 
78
78
  def filter_name(name)
79
79
  raw_name = normalize(name).strip
80
- if raw_name.include?(' ') && (raw_name.start_with?('MARIA', 'JOSE'))
80
+ if raw_name.include?(' ') && (raw_name.start_with?( 'MARIA', 'JOSE'))
81
81
  return raw_name.split(' ')[1]
82
82
  end
83
83
  name
@@ -1,3 +1,3 @@
1
1
  module RfcFacil
2
- VERSION = '1.1.1'
2
+ VERSION = '1.2'
3
3
  end
@@ -23,6 +23,22 @@ class TestRfc < Minitest::Test
23
23
  assert_equal('JP', rfc.homoclave)
24
24
  assert_equal('A', rfc.verification_digit)
25
25
  assert_equal('AECS211112JPA', rfc.to_s)
26
+
27
+ rfc = RfcFacil::Rfc.new(name: 'MA GLORIA', first_last_name: 'NAVARRO',
28
+ second_last_name: 'VILLASANA', day: 29, month: 3, year: 1956)
29
+
30
+ assert_equal('NAVG560329', rfc.ten_digits_code)
31
+ assert_equal('62', rfc.homoclave)
32
+ assert_equal('1', rfc.verification_digit)
33
+ assert_equal('NAVG560329621', rfc.to_s)
34
+
35
+ rfc = RfcFacil::Rfc.new(name: 'MARCO ANTONIO', first_last_name: 'CANO',
36
+ second_last_name: 'barraza', day: 25, month: 1, year: 1982)
37
+
38
+ assert_equal('CABA820125', rfc.ten_digits_code)
39
+ assert_equal('48', rfc.homoclave)
40
+ assert_equal('0', rfc.verification_digit)
41
+ assert_equal('CABA820125480', rfc.to_s)
26
42
  end
27
43
 
28
44
  def test_rfc_for_a_juristic_person
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rfc_facil
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: '1.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Rangel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -145,9 +145,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  version: '0'
146
146
  requirements: []
147
147
  rubyforge_project:
148
- rubygems_version: 2.5.1
148
+ rubygems_version: 2.7.3
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Libreria para calcular el Registro Federal de Contribuyentes en México (RFC).
152
152
  test_files: []
153
- has_rdoc: