carterdte_smtp_filter 0.0.3.4 → 0.0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/carterdte_smtp_filter.gemspec +1 -1
- data/lib/carterdte_smtp_filter/dte.rb +23 -21
- data/lib/carterdte_smtp_filter/message.rb +1 -0
- data/lib/carterdte_smtp_filter/version.rb +1 -1
- data/lib/carterdte_smtp_filter.rb +1 -1
- data/test/fixtures/acuse.xml +2 -1
- data/test/fixtures/acuse_2.xml +66 -0
- data/test/fixtures/email_problem_dte.eml +160 -0
- data/test/test_dte.rb +30 -2
- metadata +43 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7055df6b6f82a4aad397d0fbf3ca159a0dc16d91
|
4
|
+
data.tar.gz: 8a86125592c46b870b02d3fe4afcd2cfea7370e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32c766d0b421c68ad68553d0ee19584cc07c50fd8ed8ede6fbdf9d4025d3c7366953dbf7c1ae01ff0e487b1836f56c9a4a2e0cf342bcce41c03cff726926438f
|
7
|
+
data.tar.gz: 80b13d792cc64598012d976ff721603fb5324be5fea6db46606bee4d4f841cb59b109007d34a0323336efc4ed2c45e37fbfd0fc82ae26a7a879ee056d35bb3bd
|
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_dependency 'mail', "~> 2.6"
|
22
22
|
spec.add_dependency "midi-smtp-server", "~> 2.0"
|
23
|
-
spec.add_dependency 'xml-simple', "~> 1.1"
|
24
23
|
spec.add_dependency "rest-client", "~> 1.7"
|
25
24
|
spec.add_dependency "json", "~> 1.8"
|
26
25
|
spec.add_dependency "bundler", "~> 1.6"
|
26
|
+
spec.add_dependency "nokogiri", "~> 1.6"
|
27
27
|
|
28
28
|
spec.add_development_dependency "rake", "~> 10.4"
|
29
29
|
spec.add_development_dependency "guard", "~> 2.12"
|
@@ -2,16 +2,16 @@ module CarterdteSmtpFilter
|
|
2
2
|
|
3
3
|
class Dte
|
4
4
|
|
5
|
-
VALID_NODES = %w(
|
6
|
-
attr_accessor :
|
5
|
+
VALID_NODES = %w(EnvioDTE RespuestaDTE)
|
6
|
+
attr_accessor :dte_xml
|
7
7
|
|
8
8
|
def initialize(xml_string)
|
9
|
-
@
|
9
|
+
@dte_xml = Nokogiri::XML xml_string
|
10
10
|
return false unless valid?
|
11
11
|
end
|
12
12
|
|
13
13
|
def valid?
|
14
|
-
|
14
|
+
VALID_NODES.include? root_name
|
15
15
|
end
|
16
16
|
|
17
17
|
def envio?
|
@@ -25,6 +25,7 @@ module CarterdteSmtpFilter
|
|
25
25
|
def to_json
|
26
26
|
return JSON.generate({}) unless valid?
|
27
27
|
JSON.generate({
|
28
|
+
folio: folio,
|
28
29
|
rut_receptor: rut_receptor,
|
29
30
|
rut_emisor: rut_emisor,
|
30
31
|
msg_type: msg_type,
|
@@ -36,53 +37,54 @@ module CarterdteSmtpFilter
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def root_name
|
39
|
-
|
40
|
+
dte_xml.root.name
|
40
41
|
end
|
41
42
|
|
42
43
|
def root_node
|
43
|
-
@
|
44
|
+
@dte_xml[root_name].first
|
44
45
|
end
|
45
46
|
|
46
47
|
def get_data(data)
|
47
|
-
|
48
|
-
result = root_node["RecepcionEnvio"].first[data].first if respuesta?
|
49
|
-
return result.first if result.is_a? Array
|
50
|
-
result
|
48
|
+
@dte_xml.at_css(data).text
|
51
49
|
end
|
52
50
|
|
53
51
|
def msg_type
|
54
|
-
return "respuesta" if root_name == "
|
55
|
-
return "envio" if root_name == "
|
52
|
+
return "respuesta" if root_name == "RespuestaDTE"
|
53
|
+
return "envio" if root_name == "EnvioDTE"
|
56
54
|
end
|
57
55
|
|
58
56
|
def setdte_id
|
59
|
-
return
|
60
|
-
|
57
|
+
return @dte_xml.at_css("SetDTE").attribute("ID").value if envio?
|
58
|
+
value = @dte_xml.at_css("EnvioDTEID")
|
59
|
+
value.nil? ? nil : value.text
|
61
60
|
end
|
62
61
|
|
63
62
|
def rut_emisor
|
64
|
-
get_data "
|
63
|
+
get_data "RUTEmisor"
|
65
64
|
end
|
66
65
|
|
67
66
|
def rut_receptor
|
68
|
-
get_data "
|
67
|
+
get_data "RUTRecep"
|
69
68
|
end
|
70
69
|
|
71
70
|
def dte_type
|
72
|
-
|
73
|
-
|
71
|
+
get_data "TipoDTE"
|
72
|
+
end
|
73
|
+
|
74
|
+
def folio
|
75
|
+
get_data "Folio"
|
74
76
|
end
|
75
77
|
|
76
78
|
def fecha_emision
|
77
79
|
time_stamp = get_data "TmstFirmaEnv" if envio?
|
78
|
-
time_stamp =
|
80
|
+
time_stamp = get_data "TmstFirmaResp" if respuesta?
|
79
81
|
Time.parse(time_stamp).to_date
|
80
82
|
end
|
81
83
|
|
82
84
|
def fecha_recepcion
|
83
85
|
return nil if envio?
|
84
|
-
time_stamp =
|
85
|
-
Time.parse(time_stamp).to_date
|
86
|
+
time_stamp = @dte_xml.at_css "FchRecep"
|
87
|
+
time_stamp.nil? ? nil : Time.parse(time_stamp.text).to_date
|
86
88
|
end
|
87
89
|
|
88
90
|
end
|
@@ -55,6 +55,7 @@ module CarterdteSmtpFilter
|
|
55
55
|
|
56
56
|
def save_tmp
|
57
57
|
Dir.mkdir TMP_MESSAGE_DIR unless File.directory? TMP_MESSAGE_DIR
|
58
|
+
@logger.info("Saving File #{TMP_MESSAGE_DIR}/#{@email.message_id}.eml")
|
58
59
|
File.open("#{TMP_MESSAGE_DIR}/#{@email.message_id}.eml", 'w') { |file| file.write(@raw_data) }
|
59
60
|
end
|
60
61
|
|
data/test/fixtures/acuse.xml
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
2
|
-
<RespuestaDTE version="1.0" xmlns="http://www.sii.cl/SiiDte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte"
|
2
|
+
<RespuestaDTE version="1.0" xmlns="http://www.sii.cl/SiiDte" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sii.cl/SiiDte">
|
3
|
+
<Resultado ID="ID68392657">
|
3
4
|
<Caratula version="1.0">
|
4
5
|
<RutResponde>81537600-5</RutResponde>
|
5
6
|
<RutRecibe>94528000-K</RutRecibe>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?><RespuestaDTE xmlns="http://www.sii.cl/SiiDte" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
|
2
|
+
<Resultado ID="ID_635670218106091797">
|
3
|
+
<Caratula version="1.0">
|
4
|
+
<RutResponde>78481770-9</RutResponde>
|
5
|
+
<RutRecibe>96726970-0</RutRecibe>
|
6
|
+
<IdRespuesta>8106091797</IdRespuesta>
|
7
|
+
<NroDetalles>1</NroDetalles>
|
8
|
+
<NmbContacto>Andr�s Raddatz</NmbContacto>
|
9
|
+
<FonoContacto>+56954059469</FonoContacto>
|
10
|
+
<MailContacto>c.soto@wyr.cl</MailContacto>
|
11
|
+
<TmstFirmaResp>2015-05-12T01:03:30</TmstFirmaResp>
|
12
|
+
</Caratula>
|
13
|
+
<ResultadoDTE>
|
14
|
+
<TipoDTE>33</TipoDTE>
|
15
|
+
<Folio>1970747</Folio>
|
16
|
+
<FchEmis>2015-05-11</FchEmis>
|
17
|
+
<RUTEmisor>96726970-0</RUTEmisor>
|
18
|
+
<RUTRecep>78481770-9</RUTRecep>
|
19
|
+
<MntTotal>153043</MntTotal>
|
20
|
+
<CodEnvio>8106091797</CodEnvio>
|
21
|
+
<EstadoDTE>0</EstadoDTE>
|
22
|
+
<EstadoDTEGlosa>Documento aceptado conforme</EstadoDTEGlosa>
|
23
|
+
</ResultadoDTE>
|
24
|
+
</Resultado><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" /><Reference URI="#ID_635670218106091797"><Transforms><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /><DigestValue>28bNEJHRE6LYUZiCNCjqFHmiESg=</DigestValue></Reference></SignedInfo><SignatureValue>
|
25
|
+
VbReTbsDc9VQ4ijn36kG+ofCzZenA2TnCOSl9ErIVp5aRcThLVcaxA9wLIiI3vHg
|
26
|
+
eP2JB+I25cDEheOiPD3MTDpxAJpuN5+x1dAgs8YQsRkRNYKPpZCOK87aj3RgP34p
|
27
|
+
o1SY7otFVZX0SxcBqg9g4mVXsEe0r5kttFqHH2wG9+8=
|
28
|
+
</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>
|
29
|
+
rgrKNQKvjJR1++ruo3gDcyyu8rChzIReNgrTTr5sIobajyyR6ed1zXlseRTdqbK6
|
30
|
+
A3XWk3kdHlIlvW95beIiUl67e57YHqMOoQE5+M33D8AZFTyqpXBu8vl9czgftzYq
|
31
|
+
7D1NWQnhnvCkCUbUpl+Aln/G3pXip07cH66SCL/rU3E=
|
32
|
+
</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>
|
33
|
+
MIIF7DCCBNSgAwIBAgIKbx2f5QAAAACw4zANBgkqhkiG9w0BAQUFADCB0jELMAkG
|
34
|
+
A1UEBhMCQ0wxHTAbBgNVBAgTFFJlZ2lvbiBNZXRyb3BvbGl0YW5hMREwDwYDVQQH
|
35
|
+
EwhTYW50aWFnbzEUMBIGA1UEChMLRS1DRVJUQ0hJTEUxIDAeBgNVBAsTF0F1dG9y
|
36
|
+
aWRhZCBDZXJ0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
|
+
</RespuestaDTE>
|
@@ -0,0 +1,160 @@
|
|
1
|
+
Received: from cloud.gdexpress.cl (unknown [200.6.115.103])
|
2
|
+
by zimbra.entel.entelcorp.com (Postfix) with ESMTP id BA75B350479
|
3
|
+
for <chilemat@facturanet.cl>; Tue, 12 May 2015 10:45:12 -0300 (CLT)
|
4
|
+
Received: from PDXAPP03 ([172.30.30.40])
|
5
|
+
by cloud.gdexpress.cl (cloud.gdexpress.cl)
|
6
|
+
(MDaemon PRO v11.0.3)
|
7
|
+
with ESMTP id md50004222660.msg
|
8
|
+
for <chilemat@facturanet.cl>; Tue, 12 May 2015 10:43:24 -0300
|
9
|
+
X-Spam-Processed: cloud.gdexpress.cl, Tue, 12 May 2015 10:43:24 -0300
|
10
|
+
(not processed: spam filter heuristic analysis disabled)
|
11
|
+
X-MDRemoteIP: 172.30.30.40
|
12
|
+
X-Return-Path: delivery@gdexpress.cl
|
13
|
+
X-Envelope-From: delivery@gdexpress.cl
|
14
|
+
X-MDaemon-Deliver-To: chilemat@facturanet.cl
|
15
|
+
MIME-Version: 1.0
|
16
|
+
From: "GDExpress"
|
17
|
+
<delivery@gdexpress.cl>
|
18
|
+
To: chilemat@facturanet.cl
|
19
|
+
Date: 12 May 2015 09:44:01 -0400
|
20
|
+
Subject: =?utf-8?B?Tm90aWZpY2FjacOzbiBkZSByZWNpYm8u?=
|
21
|
+
Content-Type: multipart/mixed;
|
22
|
+
boundary=--boundary_19888_c6c1aa6a-443d-4103-b53b-03c95362aeeb
|
23
|
+
Message-Id: <20150512134512.BA75B350479@zimbra.entel.entelcorp.com>
|
24
|
+
|
25
|
+
|
26
|
+
----boundary_19888_c6c1aa6a-443d-4103-b53b-03c95362aeeb
|
27
|
+
Content-Type: text/plain; charset=utf-8
|
28
|
+
Content-Transfer-Encoding: base64
|
29
|
+
|
30
|
+
77u/PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAg
|
31
|
+
VHJhbnNpdG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zwvdGQ+
|
46
|
+
DQogICAgICAgICAgICA8L3RyPg0KICAgICAgICAgICAgPHRyPg0KICAgICAgICAg
|
47
|
+
ICAgICAgIDx0ZD4mbmJzcDs8L3RkPg0KICAgICAgICAgICAgICAgIDx0ZD48dGFi
|
48
|
+
bGUgd2lkdGg9IjEwMCUiPg0KICAgICAgICAgICAgICAgICAgICA8dHI+DQogICAg
|
49
|
+
ICAgICAgICAgICAgICAgICAgICA8dGQgc3R5bGU9ImxpbmUtaGVpZ2h0OjIwcHgi
|
50
|
+
Pg0KCQkJCTxwPlNlIGFkanVudGEgZWwgYXJjaGl2byBkZSByZWNpYm8gZWxlY3Ry
|
51
|
+
w7NuaWNvIHBhcmEgZWwgZG9jdW1lbnRvIGNvbiBmb2xpbyAxOTcwNzQ3IC48L3A+
|
52
|
+
DQoJCQk8L3RkPg0KICAgICAgICAgICAgICAgICAgICA8L3RyPg0KICAgICAgICAg
|
53
|
+
ICAgICAgICAgICA8dHI+DQogICAgICAgICAgICAgICAgICAgICAgICA8dGQgc3R5
|
54
|
+
bGU9ImNvbG9yOiM2NjY2NjY7IHBhZGRpbmctdG9wOjEwcHgiPg0KCQkJCQkJCUF0
|
55
|
+
ZW50YW1lbnRlIDxiciAvPg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3
|
56
|
+
dy5nZGV4cHJlc3MuY2wNCgkJCQkJCTwvdGQ+DQogICAgICAgICAgICAgICAgICAg
|
57
|
+
IDwvdHI+DQogICAgICAgICAgICAgICAgPC90YWJsZT48L3RkPg0KICAgICAgICAg
|
58
|
+
ICAgICAgIDx0ZD4mbmJzcDs8L3RkPg0KICAgICAgICAgICAgPC90cj4NCiAgICAg
|
59
|
+
ICAgICAgIDx0cj4NCiAgICAgICAgICAgICAgICA8dGQ+Jm5ic3A7PC90ZD4NCiAg
|
60
|
+
ICAgICAgICAgICAgICA8dGQ+Jm5ic3A7PC90ZD4NCiAgICAgICAgICAgICAgICA8
|
61
|
+
dGQ+Jm5ic3A7PC90ZD4NCiAgICAgICAgICAgIDwvdHI+DQogICAgICAgIDwvdGFi
|
62
|
+
bGU+PC90ZD4NCiAgICA8L3RyPg0KPC90YWJsZT4NCjwvYm9keT4NCjwvaHRtbD4g
|
63
|
+
----boundary_19888_c6c1aa6a-443d-4103-b53b-03c95362aeeb
|
64
|
+
Content-Type: text/xml; name=e782aea3-aaf5-46e6-b8c8-09350250f6fe.xml
|
65
|
+
Content-Transfer-Encoding: base64
|
66
|
+
Content-Disposition: attachment
|
67
|
+
|
68
|
+
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxSZXNw
|
69
|
+
dWVzdGFEVEUgeG1sbnM9Imh0dHA6Ly93d3cuc2lpLmNsL1NpaUR0ZSIgeG1sbnM6
|
70
|
+
ZHM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiIHhtbG5zOnhz
|
71
|
+
aT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHZl
|
72
|
+
cnNpb249IjEuMCI+DQogIDxSZXN1bHRhZG8gSUQ9IklEXzYzNTY3MDIxODEwNjA5
|
73
|
+
MTc5NyI+DQogICAgPENhcmF0dWxhIHZlcnNpb249IjEuMCI+DQogICAgICA8UnV0
|
74
|
+
UmVzcG9uZGU+Nzg0ODE3NzAtOTwvUnV0UmVzcG9uZGU+DQogICAgICA8UnV0UmVj
|
75
|
+
aWJlPjk2NzI2OTcwLTA8L1J1dFJlY2liZT4NCiAgICAgIDxJZFJlc3B1ZXN0YT44
|
76
|
+
MTA2MDkxNzk3PC9JZFJlc3B1ZXN0YT4NCiAgICAgIDxOcm9EZXRhbGxlcz4xPC9O
|
77
|
+
cm9EZXRhbGxlcz4NCiAgICAgIDxObWJDb250YWN0bz5BbmRy6XMgUmFkZGF0ejwv
|
78
|
+
Tm1iQ29udGFjdG8+DQogICAgICA8Rm9ub0NvbnRhY3RvPis1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jcFA5ZmcNCkZUbGh0RU1aWmdReCthdXVyWmEzREpBV240eGdt
|
151
|
+
QlNOVjZKWmoxZ3hDTGdIbHlHdmFEVkx1N1dHbHl0WDRDd0ENClpEQkJ6OHYzd1Yv
|
152
|
+
NXpDei93MllBZUE0NVMwKzNlNlNFZ0RwMWdLUW4yYU13Um9BWWdPTGVrSEZFTVg4
|
153
|
+
MEg0bmENClpwck1OU3BnV042dzZFNHNPL3ZFOFc3cE5RRlQ3bk1UVTNBYUZzZmt0
|
154
|
+
OW11YWRGVHBUQU4zYnpJRHZRK2lrNUINCmo0UkltY3U1cUdOdURnM2hFMi9kZm9q
|
155
|
+
WmwrNWRPblAwVWtoaE4yMngrZ1U9DQo8L1g1MDlDZXJ0aWZpY2F0ZT48L1g1MDlE
|
156
|
+
YXRhPjwvS2V5SW5mbz48L1NpZ25hdHVyZT4NCjwvUmVzcHVlc3RhRFRFPg==
|
157
|
+
----boundary_19888_c6c1aa6a-443d-4103-b53b-03c95362aeeb--
|
158
|
+
|
159
|
+
|
160
|
+
|
data/test/test_dte.rb
CHANGED
@@ -5,8 +5,10 @@ class TestDte < Minitest::Test
|
|
5
5
|
def setup
|
6
6
|
@resultado = File.open("./test/fixtures/acuse.xml", "rb")
|
7
7
|
@envio = File.open("./test/fixtures/envio_dte_33.xml", "rb")
|
8
|
+
@resultado_problema = File.open("./test/fixtures/acuse_2.xml", "rb")
|
8
9
|
@dte_resultado = CarterdteSmtpFilter::Dte.new @resultado
|
9
10
|
@dte_envio = CarterdteSmtpFilter::Dte.new @envio
|
11
|
+
@dte_problema = CarterdteSmtpFilter::Dte.new @resultado_problema
|
10
12
|
end
|
11
13
|
|
12
14
|
def teardown
|
@@ -19,11 +21,13 @@ class TestDte < Minitest::Test
|
|
19
21
|
assert(!dte.valid?, "Should be false")
|
20
22
|
assert(@dte_resultado.valid?, "Failure message.")
|
21
23
|
assert(@dte_envio.valid?, "Failure message.")
|
24
|
+
assert(@dte_problema.valid?, "Failure message.")
|
22
25
|
end
|
23
26
|
|
24
27
|
def test_root_should_return_the_root_element
|
25
|
-
assert_equal("
|
26
|
-
assert_equal("
|
28
|
+
assert_equal("RespuestaDTE", @dte_resultado.root_name)
|
29
|
+
assert_equal("RespuestaDTE", @dte_problema.root_name)
|
30
|
+
assert_equal("EnvioDTE", @dte_envio.root_name)
|
27
31
|
end
|
28
32
|
|
29
33
|
def test_return_msg_type
|
@@ -34,33 +38,46 @@ class TestDte < Minitest::Test
|
|
34
38
|
def test_return_setdte_id
|
35
39
|
assert_equal("SETDTE94528000X33X7597817X94141763", @dte_resultado.setdte_id)
|
36
40
|
assert_equal("SETDTE96529310X33X3152118X94141243", @dte_envio.setdte_id)
|
41
|
+
assert_equal(nil, @dte_problema.setdte_id)
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_return_folio
|
45
|
+
assert_equal("7597817", @dte_resultado.folio)
|
46
|
+
assert_equal("3152118", @dte_envio.folio)
|
47
|
+
assert_equal("1970747", @dte_problema.folio)
|
37
48
|
end
|
38
49
|
|
39
50
|
def test_rut_emisor
|
40
51
|
assert_equal("94528000-K", @dte_resultado.rut_emisor)
|
41
52
|
assert_equal("96529310-8", @dte_envio.rut_emisor)
|
53
|
+
assert_equal("96726970-0", @dte_problema.rut_emisor)
|
42
54
|
end
|
43
55
|
|
44
56
|
def test_rut_receptor
|
45
57
|
assert_equal("81537600-5", @dte_resultado.rut_receptor)
|
46
58
|
assert_equal("81201000-K", @dte_envio.rut_receptor)
|
59
|
+
assert_equal("78481770-9", @dte_problema.rut_receptor)
|
47
60
|
end
|
48
61
|
|
49
62
|
def test_dte_type
|
50
63
|
assert_equal("33", @dte_resultado.dte_type)
|
51
64
|
assert_equal("33", @dte_envio.dte_type)
|
65
|
+
assert_equal("33", @dte_problema.dte_type)
|
52
66
|
end
|
53
67
|
|
54
68
|
def test_dte_fecha_emision
|
55
69
|
date_envio = Time.parse("2015-05-09T11:10:10").to_date
|
56
70
|
date_resultado = Time.parse("2015-05-09T12:30:11").to_date
|
71
|
+
date_problema = Time.parse("2015-05-12T01:03:30").to_date
|
57
72
|
assert_equal(date_resultado, @dte_resultado.fecha_emision)
|
58
73
|
assert_equal(date_envio, @dte_envio.fecha_emision)
|
74
|
+
assert_equal(date_problema, @dte_problema.fecha_emision)
|
59
75
|
end
|
60
76
|
|
61
77
|
def test_dte_fecha_recepcion
|
62
78
|
date_resultado = Time.parse("2015-05-09T12:30:11").to_date
|
63
79
|
assert_equal(date_resultado, @dte_resultado.fecha_recepcion)
|
80
|
+
assert_equal(nil, @dte_problema.fecha_recepcion)
|
64
81
|
assert_equal(nil, @dte_envio.fecha_recepcion)
|
65
82
|
end
|
66
83
|
|
@@ -76,4 +93,15 @@ class TestDte < Minitest::Test
|
|
76
93
|
assert_equal("81537600-5", json["rut_receptor"])
|
77
94
|
end
|
78
95
|
|
96
|
+
def test_return_json_even_for_fking_wrong_dtes
|
97
|
+
assert(@dte_problema.rut_receptor, "rut_receptor")
|
98
|
+
assert(@dte_problema.rut_emisor, "rut_emisor")
|
99
|
+
assert(@dte_problema.msg_type, "msg_type")
|
100
|
+
assert_nil(@dte_problema.setdte_id, "setdte_id")
|
101
|
+
assert(@dte_problema.dte_type, "dte_type")
|
102
|
+
assert(@dte_problema.folio, "folio")
|
103
|
+
json = JSON.parse @dte_problema.to_json
|
104
|
+
assert_equal("78481770-9", json["rut_receptor"])
|
105
|
+
end
|
106
|
+
|
79
107
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carterdte_smtp_filter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3.
|
4
|
+
version: 0.0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patricio Bruna
|
@@ -14,168 +14,168 @@ dependencies:
|
|
14
14
|
name: mail
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: midi-smtp-server
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rest-client
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '1.
|
47
|
+
version: '1.7'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '1.
|
54
|
+
version: '1.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: json
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.8'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.8'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.6'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: nokogiri
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.6'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.6'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '10.4'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '10.4'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: guard
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ~>
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '2.12'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ~>
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.12'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: guard-minitest
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ~>
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '2.4'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ~>
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '2.4'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: minitest-reporters
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - ~>
|
144
144
|
- !ruby/object:Gem::Version
|
145
145
|
version: '1.0'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - ~>
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '1.0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: sinatra
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ~>
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '1.4'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - ~>
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '1.4'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: webmock
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - ~>
|
172
172
|
- !ruby/object:Gem::Version
|
173
173
|
version: '1.20'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - ~>
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '1.20'
|
181
181
|
description: Description - Postfix SMTP Filter to parse DTE files to CarterDTE Platform
|
@@ -186,7 +186,7 @@ executables:
|
|
186
186
|
extensions: []
|
187
187
|
extra_rdoc_files: []
|
188
188
|
files:
|
189
|
-
-
|
189
|
+
- .gitignore
|
190
190
|
- Gemfile
|
191
191
|
- LICENSE.txt
|
192
192
|
- README.md
|
@@ -204,7 +204,9 @@ files:
|
|
204
204
|
- o-ri/bundler
|
205
205
|
- test/fake_api.rb
|
206
206
|
- test/fixtures/acuse.xml
|
207
|
+
- test/fixtures/acuse_2.xml
|
207
208
|
- test/fixtures/config.yml
|
209
|
+
- test/fixtures/email_problem_dte.eml
|
208
210
|
- test/fixtures/email_with_attachment_no_dte.eml
|
209
211
|
- test/fixtures/envio_dte_33.xml
|
210
212
|
- test/fixtures/guia_despacho.xml
|
@@ -230,24 +232,26 @@ require_paths:
|
|
230
232
|
- lib
|
231
233
|
required_ruby_version: !ruby/object:Gem::Requirement
|
232
234
|
requirements:
|
233
|
-
- -
|
235
|
+
- - '>='
|
234
236
|
- !ruby/object:Gem::Version
|
235
237
|
version: '0'
|
236
238
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
239
|
requirements:
|
238
|
-
- -
|
240
|
+
- - '>='
|
239
241
|
- !ruby/object:Gem::Version
|
240
242
|
version: '0'
|
241
243
|
requirements: []
|
242
244
|
rubyforge_project:
|
243
|
-
rubygems_version: 2.
|
245
|
+
rubygems_version: 2.0.2
|
244
246
|
signing_key:
|
245
247
|
specification_version: 4
|
246
248
|
summary: Postfix SMTP Filter to parse DTE files to CarterDTE Platform
|
247
249
|
test_files:
|
248
250
|
- test/fake_api.rb
|
249
251
|
- test/fixtures/acuse.xml
|
252
|
+
- test/fixtures/acuse_2.xml
|
250
253
|
- test/fixtures/config.yml
|
254
|
+
- test/fixtures/email_problem_dte.eml
|
251
255
|
- test/fixtures/email_with_attachment_no_dte.eml
|
252
256
|
- test/fixtures/envio_dte_33.xml
|
253
257
|
- test/fixtures/guia_despacho.xml
|