snoopy_afip 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA512:
3
- data.tar.gz: cc38b0368056ee06c4dc5356d4d28266f85b398dd213255594ca2a1abbf18bab472707a1e530823c5d609d2243d4c89de375584719bbc209ee68972309eea1e9
4
- metadata.gz: 8ebd13756ee6fc97af51cc5bcea676c059e117e2fa5cc1695a0438d469daa8003aa19975d778ad88a9fcea9204d57d31cb7c2d6b9471c58a588b6335c3c30650
5
2
  SHA1:
6
- data.tar.gz: 5e690eecae91ab18eae8e224f63c96ffdf883da8
7
- metadata.gz: 6ba0173aef930a56479a87d58e60ac13708090c9
3
+ metadata.gz: 69fd34c79d31a288a7822c0ba478cf1d5bda68ac
4
+ data.tar.gz: 69e75aee2b567db3f0c43a311f9c4dc9eb3a52b8
5
+ SHA512:
6
+ metadata.gz: 9c13cdf0caa26e03b36fa3898e95e699524cf38888f0ca17d6a251ea22f24eaad51967ae4a4e23cca879ce989608c454f48ea839f806792b85f6fbee1a8eb45b
7
+ data.tar.gz: 485a48f5a5936f0e83b291e18bdafaaf1b0e0dee3f9017a4e9fdf4e533584a67f2ed3ff8718d150abd3da5737bcf92bf2badc184f096a87cc9a23ff1cc0581cb
data/CHANGELOG CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [3.0.2] - July 14, 2017
8
+ ### Added
9
+ - `Cms Builder exception`.
10
+
7
11
  ## [3.0.0] - June 29, 2017
8
12
  ### Added
9
13
  - `Authentication Class` destinada a la comunicación con el **WSAA**.
@@ -107,6 +107,8 @@ module Snoopy
107
107
  crt = OpenSSL::X509::Certificate.new(File.read(cert))
108
108
  pkcs7 = OpenSSL::PKCS7::sign(crt, key, build_tra)
109
109
  @cms = pkcs7.to_pem.lines.to_a[1..-2].join
110
+ rescue => e
111
+ raise Snoopy::Exception::AuthenticationAdapter::CmsBuilder.new(e)
110
112
  end
111
113
 
112
114
  def client_configuration
@@ -168,8 +168,8 @@ module Snoopy
168
168
  :headers => { "Accept-Encoding" => "gzip, deflate", "Connection" => "Keep-Alive" },
169
169
  :namespaces => {"xmlns" => "http://ar.gov.afip.dif.FEV1/"},
170
170
  :ssl_version => :TLSv1,
171
- :read_timeout => 90,
172
- :open_timeout => 90,
171
+ :read_timeout => Snoopy.read_timeout,
172
+ :open_timeout => Snoopy.open_timeout,
173
173
  :ssl_cert_file => cert,
174
174
  :ssl_cert_key_file => pkey,
175
175
  :pretty_print_xml => true }
@@ -7,7 +7,7 @@ module Snoopy
7
7
  end
8
8
 
9
9
  def call service, args={}
10
- Timeout::timeout(5) do
10
+ Timeout::timeout(Snoopy.open_timeout) do
11
11
  savon.call(service, args).body
12
12
  end
13
13
  rescue Timeout::Error
@@ -20,6 +20,8 @@ module Snoopy
20
20
  end
21
21
 
22
22
  module AuthenticationAdapter
23
+ class CmsBuilder < Exception
24
+ end
23
25
  end
24
26
 
25
27
  module AuthorizeAdapter
@@ -1,3 +1,3 @@
1
1
  module Snoopy
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.2"
3
3
  end
data/lib/snoopy_afip.rb CHANGED
@@ -16,7 +16,12 @@ module Snoopy
16
16
  autoload :AuthenticationAdapter, 'snoopy_afip/authentication_adapter'
17
17
 
18
18
  extend self
19
- attr_accessor :cuit, :sale_point, :service_url, :default_document_type, :pkey, :cert, :default_concept, :default_currency, :own_iva_cond, :verbose, :auth_url
19
+ attr_accessor :cuit, :sale_point, :service_url, :default_document_type, :pkey, :cert,
20
+ :default_concept, :default_currency, :own_iva_cond, :verbose, :auth_url,
21
+ :open_timeout, :read_timeout
22
+
23
+ self.open_timeout ||= 30
24
+ self.read_timeout ||= 30
20
25
 
21
26
  def auth_hash
22
27
  {"Token" => Snoopy::TOKEN, "Sign" => Snoopy::SIGN, "Cuit" => Snoopy.cuit}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snoopy_afip
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - g.edera