correios_sigep 2.1.1 → 2.2.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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38673fbcbaa83bac9016c233887356a3314b1ca9
4
- data.tar.gz: a3238d5f29752410f317c469de74b3bbe44e1bf2
3
+ metadata.gz: 843216a68a938b1a62b4d84dd437b049db5f55d8
4
+ data.tar.gz: 2f2aaaa9bdbe5c25c7823e1a5218d806a8567a4f
5
5
  SHA512:
6
- metadata.gz: 6da1c0dcfcb8c4e92272e780dd30b0c2a5eb6b5d53489e274db8c2a5d6ddafa918cbde983729edd6a8ee528dd8fd5bd71a969dbba221a7754940016b0bc5280a
7
- data.tar.gz: f1f2f1b95ca92d479fe1fa7799db1a1002afc2a0dd4123c767c86b60093272e4e1c55df48d68c14e146e1b07eed7c197ca793aea9f74157728bf27b16702b445
6
+ metadata.gz: 466ce82ae72af9cfa60ba8ea240a55b5f68b3c97a922271871dbfb3790428b92f29854141f272e83a1c163ab24ccc0e20d5e6b02612885bc7ad88086aa80f991
7
+ data.tar.gz: b51833314c20b1bad9b24236cf14a2f50e97a9b9d2473745c54d7b7c19f08e28ab03c250662fa24b4367295fd6dd0308747d94346bd063626acef3167451ac06
data/README.md CHANGED
@@ -42,6 +42,12 @@ CorreiosSigep.configure do |config|
42
42
  end
43
43
  ```
44
44
 
45
+ Para utilizar o ambiente de homologação dos correios, adicione essa configuração:
46
+
47
+ ```ruby
48
+ config.development = true
49
+ ```
50
+
45
51
  Se for necessário, é possível adicionar também um proxy.
46
52
 
47
53
  ```ruby
@@ -1,6 +1,6 @@
1
1
  module CorreiosSigep
2
2
  class Configuration
3
- attr_accessor :administrative_code, :card, :service_code, :wsdl_base_url,
3
+ attr_accessor :administrative_code, :card, :development, :service_code, :wsdl_base_url,
4
4
  :proxy, :timeout, :user, :password
5
5
 
6
6
  def administrative_fields
@@ -10,5 +10,9 @@ module CorreiosSigep
10
10
  service_code: service_code)
11
11
 
12
12
  end
13
+
14
+ def development?
15
+ @development
16
+ end
13
17
  end
14
18
  end
@@ -23,7 +23,7 @@ module CorreiosSigep
23
23
  end
24
24
 
25
25
  def wsdl
26
- @wsdl ||= if ENV['GEM_ENV'] == 'test'
26
+ @wsdl ||= if ENV['GEM_ENV'] == 'test' || CorreiosSigep.configuration.development?
27
27
  'https://apphom.correios.com.br/logisticaReversaWS/logisticaReversaService/logisticaReversaWS?wsdl'
28
28
  else
29
29
  'https://cws.correios.com.br/logisticaReversaWS/logisticaReversaService/logisticaReversaWS?wsdl'
@@ -1,3 +1,3 @@
1
1
  module CorreiosSigep
2
- VERSION = '2.1.1'.freeze
2
+ VERSION = '2.2.0'.freeze
3
3
  end
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: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Ribeiro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-05 00:00:00.000000000 Z
12
+ date: 2018-08-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net-http-persistent
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: '0'
222
222
  requirements: []
223
223
  rubyforge_project:
224
- rubygems_version: 2.6.13
224
+ rubygems_version: 2.6.14
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: A gem that integrates with Correios SIGEP WEB.