correios_sigep 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/correios_sigep.gemspec +1 -0
- data/lib/correios_sigep.rb +1 -0
- data/lib/correios_sigep/logistic_reverse/base_client.rb +1 -1
- data/lib/correios_sigep/version.rb +1 -1
- data/spec/correios_sigep/logistic_reverse/base_client_spec.rb +4 -3
- data/spec/spec_helper.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzY0MjRkOGFlNTE0NmY5YjE2ZjA4NTdlZTNhZDljMWNjNDg3ZTE0Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWE4NmIzOWJhNTk4NThhNmRjYzBlZDRiMzdhNzAxMTllNWZiNDlhOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWZhYTFmNmQyOTA4NmNhOGYxZjljMWZkYWM1NzYyZWI0MGZiNTYwMjY0MTE2
|
10
|
+
NjUyMmQyZGY3NTIxODg5MmMxYjAwN2QwN2VjMWRkMjRkNWZlYjk2ZTgwNjY0
|
11
|
+
MjhlNGVlMzNkMjk0M2MyOTUwOTU2MjZkYjBiY2YyOWRmOWNhMDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODBiOGNlOGJhNTRmMmVhYmRmNDBhZGQxZmY3NjYzM2QzMjQ4OWNkYjE1YWUx
|
14
|
+
M2FjNDA2ZmNkZGRiMzNhMTcxZjRiNTI3NGNhNjE0NDU1ODJlNTI1NWIyYmQ5
|
15
|
+
MjQ1YmI1YTllYzc1YzkwYzE3ZmU3OTAwZGJiNjVjNzhmYjg3YmI=
|
data/correios_sigep.gemspec
CHANGED
@@ -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'
|
data/lib/correios_sigep.rb
CHANGED
@@ -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 = {
|
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)
|
@@ -10,8 +10,9 @@ module CorreiosSigep
|
|
10
10
|
before { CorreiosSigep.configuration.proxy = 'http://localhost' }
|
11
11
|
let(:params) do
|
12
12
|
{
|
13
|
-
|
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 }
|
data/spec/spec_helper.rb
CHANGED
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.
|
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-
|
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
|