aranha-parsers 0.12.1 → 0.13.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: 46d8f5c357e5bedf69c56ee590df3efec25f5eaf814af3456442d9b3d6323e9d
4
- data.tar.gz: 1c0f0f1642003a1bb3d742b61f6d1d796fa27bc3518ac72c0bac83cbe43104f8
3
+ metadata.gz: 2ec41f5c85e077409458835a5cbd8d244a2f74ee4edb5e3c8d02ae9a3919f66b
4
+ data.tar.gz: 1a64b3f50994e1ed230b36a90861895faea86875963693ff95256d49d563ec09
5
5
  SHA512:
6
- metadata.gz: 61aae78c8114ba83cc4b4d9c81731dd478b1f0df851abcd9a0068309d79488ac4e639cdea78a358aebc66034547211ec46761aaa366b0d48c2cfb4162fe8f26e
7
- data.tar.gz: a8fab9c04756953d1fd680f636067f14d4eff15396c99de585da710362a5d88e42bdf83be84169524e821a67fb23fae2617249ed9cf51e54bcaa125927071b37
6
+ metadata.gz: cfca3d50399e38f7eccdf8173e8f630ce7b05f255619bc603a65a1a0ca34c5534582b791e1d6e67a5dd91536e053dcb99df1acf32270e7b7ca12724e7fbbe302
7
+ data.tar.gz: 1deb6e809fe03032f681f79194e058709e822b31771293f6c796ab22ccc543836201771fccfc03ab6e1f3421370eefa1e28787a613972e248cb0ba6d3814bf40
@@ -26,6 +26,8 @@ module Aranha
26
26
  DEFAULT_HEADERS = {}.freeze
27
27
  DEFAULT_PARAMS = {}.freeze
28
28
 
29
+ enable_simple_cache
30
+
29
31
  common_constructor :source do
30
32
  self.source = source.with_indifferent_access
31
33
  end
@@ -58,13 +60,6 @@ module Aranha
58
60
  end
59
61
  end
60
62
 
61
- def faraday_request
62
- faraday_connection.send(self.class.http_method, url) do |req|
63
- headers.if_present { |v| req.headers = v }
64
- body.if_present { |v| req.body = v }
65
- end
66
- end
67
-
68
63
  def content
69
64
  req = faraday_request
70
65
  return req.body if req.status == 200
@@ -80,6 +75,15 @@ module Aranha
80
75
  def params
81
76
  source[:params].if_present(DEFAULT_PARAMS)
82
77
  end
78
+
79
+ private
80
+
81
+ def faraday_request_uncached
82
+ faraday_connection.send(self.class.http_method, url) do |req|
83
+ headers.if_present { |v| req.headers = v }
84
+ body.if_present { |v| req.body = v }
85
+ end
86
+ end
83
87
  end
84
88
  end
85
89
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Parsers
5
- VERSION = '0.12.1'
5
+ VERSION = '0.13.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.12.1
4
+ version: 0.13.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: 2022-05-18 00:00:00.000000000 Z
11
+ date: 2022-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport