aranha-parsers 0.15.1 → 0.16.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
  SHA256:
3
- metadata.gz: 5e2646a8b42684dd23fd8575393c03a4ad3edb7fd2e5f53a61cd2436801b2f43
4
- data.tar.gz: 733b5d09e5a42e1e140070ed353e8acdf6f8e1c7d1de19d54d9ed2c395850c94
3
+ metadata.gz: 7b411d37103346c68691d1ac9e76c9fe6677e872bd295a4e7867ea4165b0f588
4
+ data.tar.gz: 5d75fea05464975630f0dd8777bdfd140011a8a641a2086c18e223c3dabd2985
5
5
  SHA512:
6
- metadata.gz: f5eeda2f1d9e0232e2dca70aed3c4c86c8b1037dd9ed3b415c9a472ff11143f2afce9bd14d093137c6561048c7cacb7e93aa03dcc6fb76c8c34df401d5138b49
7
- data.tar.gz: bd993877f55018c0745fcb81eee0a52b452b64ade0463263c7c59f51be95916b80d191e18863d9e9bcef35c90c43995e3e182c17d19af3d65225175c7272380d
6
+ metadata.gz: 5656a1c5ba1c00908bb183ad1bf3a6ecc2c1bea254492ea33c0733cb58380cc748a9b23d8d677b61e82aa418889d22995580585198f337dd05ba288ca23cda7b
7
+ data.tar.gz: d44b6f14e521c2853b660bddcafab29c4f3e64e4f85030840c5414370188ec7fc5bc6254a20de8b532105cf77d9b99b1223b7cc5d37183d76f86bd09f32ba2d5
@@ -4,6 +4,12 @@ module Aranha
4
4
  module Parsers
5
5
  class SourceAddress
6
6
  class FetchContentError < ::RuntimeError
7
+ attr_reader :request
8
+
9
+ def initialize(msg, request)
10
+ super(msg)
11
+ @request = request
12
+ end
7
13
  end
8
14
  end
9
15
  end
@@ -67,8 +67,9 @@ module Aranha
67
67
  req = faraday_request
68
68
  return req.body if req.status == 200
69
69
 
70
- raise ::Aranha::Parsers::SourceAddress::FetchContentError,
71
- "Get #{url} returned #{req.status.to_i}"
70
+ raise ::Aranha::Parsers::SourceAddress::FetchContentError.new(
71
+ "Get #{url} returned #{req.status.to_i}", req
72
+ )
72
73
  end
73
74
 
74
75
  def param(key, default_value)
@@ -3,6 +3,7 @@
3
3
  require 'addressable'
4
4
  require 'aranha/parsers/source_address/fetch_content_error'
5
5
  require 'faraday'
6
+ require 'faraday/retry'
6
7
 
7
8
  module Aranha
8
9
  module Parsers
@@ -45,8 +46,9 @@ module Aranha
45
46
  c = conn.get(url)
46
47
  return c.body if c.status == 200
47
48
 
48
- raise ::Aranha::Parsers::SourceAddress::FetchContentError,
49
- "Get #{url} returned #{c.status.to_i}"
49
+ raise ::Aranha::Parsers::SourceAddress::FetchContentError.new(
50
+ "Get #{url} returned #{c.status.to_i}", c
51
+ )
50
52
  end
51
53
 
52
54
  def serialize
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.15.1'
5
+ VERSION = '0.16.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranha-parsers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-13 00:00:00.000000000 Z
11
+ date: 2023-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -106,6 +106,20 @@ dependencies:
106
106
  - - "~>"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0.1'
109
+ - !ruby/object:Gem::Dependency
110
+ name: faraday-retry
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '2.1'
116
+ type: :runtime
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '2.1'
109
123
  - !ruby/object:Gem::Dependency
110
124
  name: nokogiri
111
125
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +127,9 @@ dependencies:
113
127
  - - "~>"
114
128
  - !ruby/object:Gem::Version
115
129
  version: '1.14'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 1.14.2
116
133
  type: :runtime
117
134
  prerelease: false
118
135
  version_requirements: !ruby/object:Gem::Requirement
@@ -120,6 +137,9 @@ dependencies:
120
137
  - - "~>"
121
138
  - !ruby/object:Gem::Version
122
139
  version: '1.14'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 1.14.2
123
143
  - !ruby/object:Gem::Dependency
124
144
  name: ofx-parser
125
145
  requirement: !ruby/object:Gem::Requirement