correios-frete 1.9.5 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +11 -4
- data/CHANGELOG.rdoc +3 -0
- data/correios-frete.gemspec +1 -1
- data/lib/correios-frete.rb +0 -1
- data/lib/correios/frete/parser.rb +1 -1
- data/lib/correios/frete/version.rb +1 -1
- data/spec/correios/frete/parser_spec.rb +1 -1
- metadata +2 -3
- data/lib/correios/frete/string.rb +0 -10
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjVlMDgyZTg5NTlmMzFmYTI2YjQ4OWUwZTJiYTAwOGNjZWY0OTlkMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MGI1NDJmNzYzOGM4OWViMGI1NTEyNWU1ZWQzNTdhMTk3ZTMxODYwNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjI0NjEyMTA3YWVlMzU5MzY2MGQ3ZDBhMTEyNzhmZjZlM2M0MDU1OTBiMjA0
|
10
|
+
NWE4ZTljYjYzYzc0YzJmMTEzNWQ1MzNkYmIxNTQ3ODUzNjBkZWM5ZWQ5MzRj
|
11
|
+
ZDljYzJiNjdlZGExZTdlMmI1MDEyNmMzMTMyYzFhNDU5MTBiMjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjJjNzI1NTdiNGVmMzMyOWFlOTNmODY5YTA1YzE0ZmI5ZTA3MDgyOWY4OWUz
|
14
|
+
ZTZjMjVkMDNkZGIwZDVhOGU4OTM5NjdjN2Y2OWJiMDlmZTNiNDViZmU3M2Q1
|
15
|
+
MDIxNThlZmYwMGY2NDAxMWU3YTFmMWUxYzM3MzNmYzk0OThhMTA=
|
data/.travis.yml
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
language: ruby
|
2
|
+
|
2
3
|
rvm:
|
3
|
-
- 1.8.7
|
4
|
-
- 1.9.3
|
5
4
|
- 2.0.0
|
6
|
-
- 2.1.
|
7
|
-
- 2.2.
|
5
|
+
- 2.1.10
|
6
|
+
- 2.2.5
|
7
|
+
- 2.3.1
|
8
|
+
- ruby-head
|
9
|
+
|
10
|
+
matrix:
|
11
|
+
allow_failures:
|
12
|
+
- rvm: ruby-head
|
13
|
+
fast_finish: true
|
14
|
+
|
8
15
|
script: bundle exec rspec
|
9
16
|
cache: bundler
|
10
17
|
sudo: false
|
data/CHANGELOG.rdoc
CHANGED
data/correios-frete.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
20
|
gem.platform = Gem::Platform::RUBY
|
21
|
-
gem.required_ruby_version = Gem::Requirement.new(">= 1.
|
21
|
+
gem.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
|
22
22
|
|
23
23
|
gem.add_dependency "log-me", "~> 0.0.10"
|
24
24
|
gem.add_dependency "nokogiri", "~> 1.6.8.1"
|
data/lib/correios-frete.rb
CHANGED
@@ -6,7 +6,7 @@ module Correios
|
|
6
6
|
class Parser
|
7
7
|
def servicos(xml)
|
8
8
|
servicos = {}
|
9
|
-
xml = xml.
|
9
|
+
xml = xml.encode("UTF-8", "ISO-8859-1")
|
10
10
|
|
11
11
|
Nokogiri::XML(xml).root.elements.each do |element|
|
12
12
|
servico = Correios::Frete::Servico.new.parse(element.to_xml)
|
@@ -5,7 +5,7 @@ describe Correios::Frete::Parser do
|
|
5
5
|
let(:parser) { Correios::Frete::Parser.new }
|
6
6
|
|
7
7
|
it "encodes from ISO-8859-1 to UTF-8" do
|
8
|
-
expect(xml).to receive(:
|
8
|
+
expect(xml).to receive(:encode).with("UTF-8", "ISO-8859-1").and_return(xml)
|
9
9
|
parser.servicos(xml)
|
10
10
|
end
|
11
11
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: correios-frete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Prodis a.k.a. Fernando Hamasaki de Amorim
|
@@ -135,7 +135,6 @@ files:
|
|
135
135
|
- lib/correios/frete/pacote_item.rb
|
136
136
|
- lib/correios/frete/parser.rb
|
137
137
|
- lib/correios/frete/servico.rb
|
138
|
-
- lib/correios/frete/string.rb
|
139
138
|
- lib/correios/frete/version.rb
|
140
139
|
- lib/correios/frete/web_service.rb
|
141
140
|
- misc/correios_frete_manual_v1.7.pdf
|
@@ -163,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
162
|
requirements:
|
164
163
|
- - ! '>='
|
165
164
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
165
|
+
version: 1.9.3
|
167
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
167
|
requirements:
|
169
168
|
- - ! '>='
|