correios-sro-xml 0.3.1 → 0.4.0
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 +5 -13
- data/.travis.yml +5 -0
- data/CHANGELOG.rdoc +3 -0
- data/README.rdoc +1 -0
- data/bin/console +14 -0
- data/lib/correios-sro-xml.rb +1 -0
- data/lib/correios/sro/object.rb +6 -0
- data/lib/correios/sro/parser.rb +2 -3
- data/lib/correios/sro/request_builder.rb +55 -0
- data/lib/correios/sro/tracker.rb +3 -3
- data/lib/correios/sro/version.rb +1 -1
- data/lib/correios/sro/web_service.rb +8 -13
- data/misc/Guia_Tecnico_Rastreamento_XML_Cliente-Versao_e-commerce_v_1.7.pdf +0 -0
- data/spec/correios/sro/parser_spec.rb +14 -19
- data/spec/correios/sro/tracker_spec.rb +7 -5
- data/spec/correios/sro/web_service_spec.rb +4 -2
- data/spec/correios/sro/xml_builder_spec.rb +51 -0
- data/spec/fixtures/cassettes/sro_found_last.yml +43 -35
- data/spec/fixtures/sro_many_objects.xml +222 -186
- data/spec/fixtures/sro_not_found.xml +17 -6
- data/spec/fixtures/sro_one_object.xml +118 -87
- metadata +18 -14
- data/spec/fixtures/sro_many_objects_international.xml +0 -110
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: correios-sro-xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prodis a.k.a. Fernando Hamasaki de Amorim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: log-me
|
@@ -56,42 +56,42 @@ dependencies:
|
|
56
56
|
name: coveralls
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pry
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
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: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
@@ -141,7 +141,8 @@ description: Tracking Objects System from Correios - SRO (Sistema de Rastreament
|
|
141
141
|
50 orders simultaneously.
|
142
142
|
email:
|
143
143
|
- prodis@gmail.com
|
144
|
-
executables:
|
144
|
+
executables:
|
145
|
+
- console
|
145
146
|
extensions: []
|
146
147
|
extra_rdoc_files: []
|
147
148
|
files:
|
@@ -152,6 +153,7 @@ files:
|
|
152
153
|
- Gemfile
|
153
154
|
- README.rdoc
|
154
155
|
- Rakefile
|
156
|
+
- bin/console
|
155
157
|
- correios-sro-xml.gemspec
|
156
158
|
- lib/correios-sro-xml.rb
|
157
159
|
- lib/correios/sro.rb
|
@@ -160,19 +162,21 @@ files:
|
|
160
162
|
- lib/correios/sro/event.rb
|
161
163
|
- lib/correios/sro/object.rb
|
162
164
|
- lib/correios/sro/parser.rb
|
165
|
+
- lib/correios/sro/request_builder.rb
|
163
166
|
- lib/correios/sro/timeout.rb
|
164
167
|
- lib/correios/sro/tracker.rb
|
165
168
|
- lib/correios/sro/version.rb
|
166
169
|
- lib/correios/sro/web_service.rb
|
170
|
+
- misc/Guia_Tecnico_Rastreamento_XML_Cliente-Versao_e-commerce_v_1.7.pdf
|
167
171
|
- misc/correios_sro_xml_manual_v1.5.pdf
|
168
172
|
- spec/correios/sro/event_spec.rb
|
169
173
|
- spec/correios/sro/parser_spec.rb
|
170
174
|
- spec/correios/sro/tracker_spec.rb
|
171
175
|
- spec/correios/sro/web_service_spec.rb
|
176
|
+
- spec/correios/sro/xml_builder_spec.rb
|
172
177
|
- spec/correios/sro_spec.rb
|
173
178
|
- spec/fixtures/cassettes/sro_found_last.yml
|
174
179
|
- spec/fixtures/sro_many_objects.xml
|
175
|
-
- spec/fixtures/sro_many_objects_international.xml
|
176
180
|
- spec/fixtures/sro_not_found.xml
|
177
181
|
- spec/fixtures/sro_one_object.xml
|
178
182
|
- spec/spec_helper.rb
|
@@ -187,17 +191,17 @@ require_paths:
|
|
187
191
|
- lib
|
188
192
|
required_ruby_version: !ruby/object:Gem::Requirement
|
189
193
|
requirements:
|
190
|
-
- -
|
194
|
+
- - '>='
|
191
195
|
- !ruby/object:Gem::Version
|
192
196
|
version: 1.9.3
|
193
197
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
198
|
requirements:
|
195
|
-
- -
|
199
|
+
- - '>='
|
196
200
|
- !ruby/object:Gem::Version
|
197
201
|
version: '0'
|
198
202
|
requirements: []
|
199
203
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.4.
|
204
|
+
rubygems_version: 2.4.8
|
201
205
|
signing_key:
|
202
206
|
specification_version: 4
|
203
207
|
summary: Tracking Objects System from Correios - SRO (Sistema de Rastreamento de Objetos
|
@@ -207,10 +211,10 @@ test_files:
|
|
207
211
|
- spec/correios/sro/parser_spec.rb
|
208
212
|
- spec/correios/sro/tracker_spec.rb
|
209
213
|
- spec/correios/sro/web_service_spec.rb
|
214
|
+
- spec/correios/sro/xml_builder_spec.rb
|
210
215
|
- spec/correios/sro_spec.rb
|
211
216
|
- spec/fixtures/cassettes/sro_found_last.yml
|
212
217
|
- spec/fixtures/sro_many_objects.xml
|
213
|
-
- spec/fixtures/sro_many_objects_international.xml
|
214
218
|
- spec/fixtures/sro_not_found.xml
|
215
219
|
- spec/fixtures/sro_one_object.xml
|
216
220
|
- spec/spec_helper.rb
|
@@ -1,110 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1" ?>
|
2
|
-
<sroxml>
|
3
|
-
<versao>1.0</versao>
|
4
|
-
<qtd>1</qtd>
|
5
|
-
<TipoPesquisa>Lista de Objetos</TipoPesquisa>
|
6
|
-
<TipoResultado>Todos os eventos</TipoResultado>
|
7
|
-
<objeto>
|
8
|
-
<numero>EC688801478US</numero>
|
9
|
-
<evento>
|
10
|
-
<tipo>RO</tipo>
|
11
|
-
<status>01</status>
|
12
|
-
<data>09/04/2012</data>
|
13
|
-
<hora>13:32</hora>
|
14
|
-
<descricao>Encaminhado</descricao>
|
15
|
-
<local>UNIDADE TRAT INTERNACIONAL SAO PAULO</local>
|
16
|
-
<codigo>05314980</codigo>
|
17
|
-
<cidade>SAO PAULO</cidade>
|
18
|
-
<uf>SP</uf>
|
19
|
-
<sto>99999999</sto>
|
20
|
-
<destino>
|
21
|
-
<local>RFB - FISCALIZAÇÃO/CUSTOMS</local>
|
22
|
-
<codigo>00002999</codigo>
|
23
|
-
<cidade></cidade>
|
24
|
-
<bairro></bairro>
|
25
|
-
<uf></uf>
|
26
|
-
</destino>
|
27
|
-
</evento>
|
28
|
-
<evento>
|
29
|
-
<tipo>RO</tipo>
|
30
|
-
<status>01</status>
|
31
|
-
<data>09/04/2012</data>
|
32
|
-
<hora>13:32</hora>
|
33
|
-
<descricao>Encaminhado</descricao>
|
34
|
-
<local>UNIDADE TRAT INTERNACIONAL SAO PAULO</local>
|
35
|
-
<codigo>05314980</codigo>
|
36
|
-
<cidade>SAO PAULO</cidade>
|
37
|
-
<uf>SP</uf>
|
38
|
-
<sto>99999999</sto>
|
39
|
-
<destino>
|
40
|
-
<local>RFB - FISCALIZAÇÃO/CUSTOMS</local>
|
41
|
-
<codigo>00002999</codigo>
|
42
|
-
<cidade></cidade>
|
43
|
-
<bairro></bairro>
|
44
|
-
<uf></uf>
|
45
|
-
</destino>
|
46
|
-
</evento>
|
47
|
-
<evento>
|
48
|
-
<tipo>PAR</tipo>
|
49
|
-
<status>16</status>
|
50
|
-
<data>09/04/2012</data>
|
51
|
-
<hora>13:30</hora>
|
52
|
-
<descricao>Conferido</descricao>
|
53
|
-
<local>UNIDADE TRAT INTERNACIONAL SAO PAULO</local>
|
54
|
-
<codigo>05314980</codigo>
|
55
|
-
<cidade>SAO PAULO</cidade>
|
56
|
-
<uf>SP</uf>
|
57
|
-
<sto>99999999</sto>
|
58
|
-
</evento>
|
59
|
-
<evento>
|
60
|
-
<tipo>RO</tipo>
|
61
|
-
<status>01</status>
|
62
|
-
<data>05/04/2012</data>
|
63
|
-
<hora>10:06</hora>
|
64
|
-
<descricao>Encaminhado</descricao>
|
65
|
-
<local>ESTADOS UNIDOS DA AMÉRICA</local>
|
66
|
-
<codigo>00840000</codigo>
|
67
|
-
<cidade></cidade>
|
68
|
-
<uf></uf>
|
69
|
-
<sto>99999999</sto>
|
70
|
-
<destino>
|
71
|
-
<local>UNIDADE DE TRATAMENTO INTERNACIONAL</local>
|
72
|
-
<codigo>00500001</codigo>
|
73
|
-
<cidade>BRASIL</cidade>
|
74
|
-
<bairro></bairro>
|
75
|
-
<uf></uf>
|
76
|
-
</destino>
|
77
|
-
</evento>
|
78
|
-
<evento>
|
79
|
-
<tipo>RO</tipo>
|
80
|
-
<status>01</status>
|
81
|
-
<data>04/04/2012</data>
|
82
|
-
<hora>14:23</hora>
|
83
|
-
<descricao>Encaminhado</descricao>
|
84
|
-
<local>ESTADOS UNIDOS DA AMÉRICA</local>
|
85
|
-
<codigo>00840000</codigo>
|
86
|
-
<cidade></cidade>
|
87
|
-
<uf></uf>
|
88
|
-
<sto>99999999</sto>
|
89
|
-
<destino>
|
90
|
-
<local>UNIDADE DE TRATAMENTO INTERNACIONAL</local>
|
91
|
-
<codigo>00500001</codigo>
|
92
|
-
<cidade>BRASIL</cidade>
|
93
|
-
<bairro></bairro>
|
94
|
-
<uf></uf>
|
95
|
-
</destino>
|
96
|
-
</evento>
|
97
|
-
<evento>
|
98
|
-
<tipo>PAR</tipo>
|
99
|
-
<status>18</status>
|
100
|
-
<data>04/04/2012</data>
|
101
|
-
<hora>14:22</hora>
|
102
|
-
<descricao>Conferido</descricao>
|
103
|
-
<local>ESTADOS UNIDOS DA AMÉRICA</local>
|
104
|
-
<codigo>00840000</codigo>
|
105
|
-
<cidade></cidade>
|
106
|
-
<uf></uf>
|
107
|
-
<sto>99999999</sto>
|
108
|
-
</evento>
|
109
|
-
</objeto>
|
110
|
-
</sroxml>
|