rfc_facil 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/rfc_facil/verification_digit_calculator.rb +3 -2
- data/lib/rfc_facil/version.rb +1 -1
- data/tests/rfc_facil/test_rfc.rb +20 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ddcd91907e54fbedb83d48cad24c38ba8c59e1c
|
4
|
+
data.tar.gz: dd4cdbf389490837366b0d6dc9b0554337276ec4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 127540967b6c0738ff34cdedf0df692f495aa5c1e3735bf154be572afcd88f42e7170cd451d8e1c49e6576fa579c3847a14374ff85a5cf0829516e7fd66111c9
|
7
|
+
data.tar.gz: fe01d19e1207fa619238cd7535d7ad520385b0b924c07cc61410e47632fcfb83bb2615283327782d494619b6676b60334ce0bb87503dcc78289546cd5c287c29
|
data/README.md
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
[![Code Climate](https://codeclimate.com/github/Munett/rfc_facil/badges/gpa.svg)](https://codeclimate.com/github/Munett/rfc_facil)
|
3
3
|
[![Test Coverage](https://codeclimate.com/github/Munett/rfc_facil/badges/coverage.svg)](https://codeclimate.com/github/Munett/rfc_facil/coverage)
|
4
4
|
|
5
|
-
![](https://github.com/
|
5
|
+
![](https://github.com/Munett/rfc_facil/raw/master/logo.png)
|
6
6
|
|
7
7
|
Libreria para calcular el Registro Federal de Contribuyentes en México (RFC) en Ruby.
|
8
8
|
|
9
|
-
[![Build Status](https://travis-ci.org/
|
9
|
+
[![Build Status](https://travis-ci.org/Munett/rfc_facil.svg?branch=master)](https://travis-ci.org/Munett/rfc_facil)
|
10
10
|
|
11
11
|
## Uso
|
12
12
|
|
@@ -26,4 +26,4 @@ Esta librería se basa en documentación oficial obtenida por medio del IFAI (In
|
|
26
26
|
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
27
|
|
28
28
|
## Colabora
|
29
|
-
Errores y pull requests son bienvenidos en Github: https://github.com/
|
29
|
+
Errores y pull requests son bienvenidos en Github: https://github.com/Munett/rfc_facil.
|
data/lib/rfc_facil/version.rb
CHANGED
data/tests/rfc_facil/test_rfc.rb
CHANGED
@@ -7,14 +7,30 @@ class TestRfc < Minitest::Test
|
|
7
7
|
assert_equal('RI', rfc.homoclave)
|
8
8
|
assert_equal('6', rfc.verification_digit)
|
9
9
|
assert_equal('RAAA921127RI6', rfc.to_s)
|
10
|
+
|
11
|
+
rfc = RfcFacil::Rfc.new(name: 'ELIUD', first_last_name: 'OROZCO',
|
12
|
+
second_last_name: 'GOMEZ', day: 11, month: 7, year: 1952)
|
13
|
+
|
14
|
+
assert_equal('OOGE520711', rfc.ten_digits_code)
|
15
|
+
assert_equal('15', rfc.homoclave)
|
16
|
+
assert_equal('1', rfc.verification_digit)
|
17
|
+
assert_equal('OOGE520711151', rfc.to_s)
|
18
|
+
|
19
|
+
rfc = RfcFacil::Rfc.new(name: 'SATURNINA', first_last_name: 'ANGEL',
|
20
|
+
second_last_name: 'CRUZ', day: 12, month: 11, year: 1921)
|
21
|
+
|
22
|
+
assert_equal('AECS211112', rfc.ten_digits_code)
|
23
|
+
assert_equal('JP', rfc.homoclave)
|
24
|
+
assert_equal('A', rfc.verification_digit)
|
25
|
+
assert_equal('AECS211112JPA', rfc.to_s)
|
10
26
|
end
|
11
27
|
|
12
28
|
def test_rfc_for_a_juristic_person
|
13
29
|
_rfc = RfcFacil::Rfc.new(legal_name: 'Mu Networks S.A.P.I de C.V.', day: 10, month: 07, year: 2014)
|
14
30
|
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
31
|
+
# assert_equal('MNE140710', rfc.ten_digits_code)
|
32
|
+
# assert_equal('7G', rfc.homoclave)
|
33
|
+
# assert_equal('8', rfc.verification_digit)
|
34
|
+
# assert_equal('MNE1407107G8', rfc.to_s)
|
19
35
|
end
|
20
36
|
end
|
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.
|
4
|
+
version: 1.1.0
|
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-
|
11
|
+
date: 2016-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|