correios_sigep 0.2.5 → 0.3.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGI0YjllYmVmNWNmMjI5MmEzYjdkOWQ3MDc4Yzc0ZmEwY2QzNzZlNA==
4
+ MzY0MjRkOGFlNTE0NmY5YjE2ZjA4NTdlZTNhZDljMWNjNDg3ZTE0Mg==
5
5
  data.tar.gz: !binary |-
6
- NmRkZDgxODAyYzYxMzY5MTMzMDVlZDNhMzk2ZDYxYjhmNzgxMjMzMA==
6
+ YWE4NmIzOWJhNTk4NThhNmRjYzBlZDRiMzdhNzAxMTllNWZiNDlhOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZGFiOTMwMDRmMmJkNzE2MDMxNjg5OGM5YzQ1NmE0NDUzZDc5ZGY2ZDY2ZDg3
10
- ZGYyOTM2YjY3YWZlODViNjRkYWZlMGY0MWJkOTc0ZmYwNDA1OTI1NjNlMzUw
11
- YzQwOTEyZDE2ODk5YmQ5OGU3MDZjYjVmZWY5NTM4MWYwZjE1Yzg=
9
+ MWZhYTFmNmQyOTA4NmNhOGYxZjljMWZkYWM1NzYyZWI0MGZiNTYwMjY0MTE2
10
+ NjUyMmQyZGY3NTIxODg5MmMxYjAwN2QwN2VjMWRkMjRkNWZlYjk2ZTgwNjY0
11
+ MjhlNGVlMzNkMjk0M2MyOTUwOTU2MjZkYjBiY2YyOWRmOWNhMDM=
12
12
  data.tar.gz: !binary |-
13
- OWY2ZTFhNDBhZTJjOTdiODUyM2NhYzNkMTU4MWQ4ZGVmMTQzZTBkYzg1ZmIy
14
- YjFhY2VjMTkyZDc4NWRhOTViNTc3NWE4MjM2NGM2NjBmYTUxZjQ5YTgwZDIy
15
- Y2E5NGM1YTczMjI2ZTA0NmZiMTk0YmJjZTAyMzYxY2FkODEwODM=
13
+ ODBiOGNlOGJhNTRmMmVhYmRmNDBhZGQxZmY3NjYzM2QzMjQ4OWNkYjE1YWUx
14
+ M2FjNDA2ZmNkZGRiMzNhMTcxZjRiNTI3NGNhNjE0NDU1ODJlNTI1NWIyYmQ5
15
+ MjQ1YmI1YTllYzc1YzkwYzE3ZmU3OTAwZGJiNjVjNzhmYjg3YmI=
@@ -18,6 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
+ spec.add_dependency 'net-http-persistent', '~> 2.9.4'
21
22
  spec.add_dependency 'savon', '~> 2.0'
22
23
 
23
24
  spec.add_development_dependency 'bundler', '~> 1.7'
@@ -33,6 +33,7 @@ require 'correios_sigep/models/errors/collect_number_not_found'
33
33
  require 'correios_sigep/logistic_reverse/base_client'
34
34
  require 'correios_sigep/logistic_reverse/request_collect_number'
35
35
  require 'correios_sigep/logistic_reverse/request_sro'
36
+ require 'net/http/persistent'
36
37
  require 'nokogiri'
37
38
  require 'savon'
38
39
 
@@ -2,7 +2,7 @@ module CorreiosSigep
2
2
  module LogisticReverse
3
3
  class BaseClient
4
4
  def initialize
5
- options = { wsdl: wsdl, proxy: CorreiosSigep.configuration.proxy }
5
+ options = { adapter: :net_http_persistent, proxy: CorreiosSigep.configuration.proxy, wsdl: wsdl }
6
6
  options.delete(:proxy) unless options[:proxy]
7
7
 
8
8
  @client = Savon.client(options)
@@ -1,3 +1,3 @@
1
1
  module CorreiosSigep
2
- VERSION = '0.2.5'
2
+ VERSION = '0.3.0'
3
3
  end
@@ -10,8 +10,9 @@ module CorreiosSigep
10
10
  before { CorreiosSigep.configuration.proxy = 'http://localhost' }
11
11
  let(:params) do
12
12
  {
13
- wsdl: described_class.new.wsdl,
14
- proxy: CorreiosSigep.configuration.proxy
13
+ adapter: :net_http_persistent,
14
+ proxy: CorreiosSigep.configuration.proxy,
15
+ wsdl: described_class.new.wsdl
15
16
  }
16
17
  end
17
18
 
@@ -23,7 +24,7 @@ module CorreiosSigep
23
24
 
24
25
  context 'without a proxy' do
25
26
  before { CorreiosSigep.configuration.proxy = nil }
26
- let(:params) { { wsdl: described_class.new.wsdl } }
27
+ let(:params) { { adapter: :net_http_persistent, wsdl: described_class.new.wsdl } }
27
28
 
28
29
  it 'initializes @client without proxy' do
29
30
  expect(Savon).to receive(:client).with(params) { true }
@@ -1,4 +1,5 @@
1
1
  ENV['GEM_ENV'] = 'test'
2
+ require 'pry'
2
3
  require 'simplecov'
3
4
  require 'support/logistic_reverse_helper'
4
5
  require 'support/fixture_helper'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: correios_sigep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Ribeiro
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-20 00:00:00.000000000 Z
12
+ date: 2015-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: net-http-persistent
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ~>
19
+ - !ruby/object:Gem::Version
20
+ version: 2.9.4
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ version: 2.9.4
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: savon
16
30
  requirement: !ruby/object:Gem::Requirement