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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWFlNjNhMWQ3MzYyZDZjZTlmZDcyMTNmMzhkMGViNTFiM2FiN2M4OQ==
4
+ MjVlMDgyZTg5NTlmMzFmYTI2YjQ4OWUwZTJiYTAwOGNjZWY0OTlkMA==
5
5
  data.tar.gz: !binary |-
6
- MmI3Nzg0MTE5MDZiMzA0N2ZhMDEzNGM0MGFlMjBhYzg5ZDliOGVlNg==
6
+ MGI1NDJmNzYzOGM4OWViMGI1NTEyNWU1ZWQzNTdhMTk3ZTMxODYwNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2UzMDNjYWQzODVkZjgwMWM0MzcwYWYyMjhkZDhmMGFiYTkwNDkwNDY2ZGFh
10
- ODBkYmE5MWU0NzQ3ZjIxOWQxNTFjNTQ3ZjdiZmFlZWEyZWFkMzExYzI0MDNj
11
- M2EzODNhZGFlNjVhMjg0YTJhOWRmYWUwY2ZlZjMzYTlhZTM5OTU=
9
+ NjI0NjEyMTA3YWVlMzU5MzY2MGQ3ZDBhMTEyNzhmZjZlM2M0MDU1OTBiMjA0
10
+ NWE4ZTljYjYzYzc0YzJmMTEzNWQ1MzNkYmIxNTQ3ODUzNjBkZWM5ZWQ5MzRj
11
+ ZDljYzJiNjdlZGExZTdlMmI1MDEyNmMzMTMyYzFhNDU5MTBiMjc=
12
12
  data.tar.gz: !binary |-
13
- NDJjZWFkZjIyNWMwMGM5ZGM2NGIwNWI0YWU4NmVlZTVmYmY4ODc3NmNkZjhi
14
- MTAzOWQwNjZlNzY1NTI1MTY2ZjVlOWUxNTc3YTk0Nzk2MzM4NGI1YjYzNGU5
15
- ZDgxYTY1OTY4NTVkMzk1ODIxOTA0Y2FjNmM4Mjk0M2E5ZmIwZDM=
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.5
7
- - 2.2.3
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
@@ -1,3 +1,6 @@
1
+ == Versão 1.10.0
2
+ - Novo: Versão mínima do Ruby é 1.9.3 a partir de agora.
3
+
1
4
  == Versão 1.9.5
2
5
  - Atualização: nokogiri e sax-machine gems.
3
6
 
@@ -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.8.7")
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"
@@ -6,5 +6,4 @@ require 'correios/frete/pacote'
6
6
  require 'correios/frete/pacote_item'
7
7
  require 'correios/frete/parser'
8
8
  require 'correios/frete/servico'
9
- require 'correios/frete/string'
10
9
  require 'correios/frete/web_service'
@@ -6,7 +6,7 @@ module Correios
6
6
  class Parser
7
7
  def servicos(xml)
8
8
  servicos = {}
9
- xml = xml.backward_encode("UTF-8", "ISO-8859-1")
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)
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
  module Correios
3
3
  module Frete
4
- VERSION = "1.9.5"
4
+ VERSION = "1.10.0"
5
5
  end
6
6
  end
@@ -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(:backward_encode).with("UTF-8", "ISO-8859-1").and_return(xml)
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.9.5
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.8.7
165
+ version: 1.9.3
167
166
  required_rubygems_version: !ruby/object:Gem::Requirement
168
167
  requirements:
169
168
  - - ! '>='
@@ -1,10 +0,0 @@
1
- class String
2
- def backward_encode(to, from)
3
- if self.respond_to?(:encode)
4
- self.encode(to, from)
5
- else
6
- require 'iconv'
7
- Iconv.conv(to, from, self)
8
- end
9
- end
10
- end