biro 0.3.0 → 0.4.0

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
2
  SHA1:
3
- metadata.gz: 25ed9cb317e35b3d1b4449096c3a1a8fbcc1cd70
4
- data.tar.gz: ff5c2959c620f23d9d10e241973bd557188bbdbb
3
+ metadata.gz: 3ca951f0a2f79478e5b794b8e85dd4cb39e0479c
4
+ data.tar.gz: 5ce9bb704ac282dbdecae7920f47ee53007b6fd3
5
5
  SHA512:
6
- metadata.gz: ea53b932c6a55bc74a32b4de3cafc1545d5681dbfd3bc99d5c362d419677efab4aa22e5cef5bb5a1b2b011d6c25aa3ca65b7b5ddba50c1507220d29dad04dd29
7
- data.tar.gz: da9ee4ad133385f986e13609ce35ff0b88f530139e6e13174ead501c6d1233f75f3d64f78c9dcc89bb3d667b206116354659953195b400ee7c2f44dbab1a1b13
6
+ metadata.gz: 058e7e5db0b1c293548481edd2891f8e7822a584ff1c9f133c80ee74edc4efc734fcb3a4da3f2abeba569672a41febf43aa5b2fd1a71e603a06b900ffdaa526d
7
+ data.tar.gz: 190bf9527d768230a0c64c49d35e0cbccb34038cd64931b88a8cd6e7e7a532d86d66f51d1f3290b199eed7963f504463b126f8cefe1311db8ce0b226049bf67a
@@ -11,11 +11,13 @@ module Biro
11
11
  'https://ws.databusca.com.br/DataHistory.svc?wsdl'
12
12
  end
13
13
 
14
+
14
15
  def required_params
15
16
  [:username, :password, :domain]
16
17
  end
17
18
 
18
19
  def find(document)
20
+ require 'pry'; binding.pry
19
21
  raise AuthenticationError.new('Invalid authentication credentials') if token.blank?
20
22
 
21
23
  begin
@@ -25,6 +27,7 @@ module Biro
25
27
  Response.new(response)
26
28
  rescue => e
27
29
  Biro.log(:warn, "Unable to process Ph3a request")
30
+ raise AuthenticationError.new("Error at PH3A request: #{e.message}") if e.message.include?("User not authenticated")
28
31
  raise StandardError.new("Error at PH3A request: #{e.message}")
29
32
  end
30
33
  end
@@ -1,3 +1,3 @@
1
1
  module Biro
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noverde Team
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2017-06-29 00:00:00.000000000 Z
14
+ date: 2017-07-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: savon