pupa 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pupa/processor/client.rb +9 -1
- data/lib/pupa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c06be9f93589b34b71f5b7037ab75cecbfaa43da
|
4
|
+
data.tar.gz: 44b4ab787cc85352b84d6edf8d502adc8a7d6b79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d605b3a6e98b3bdf94161e88904653b7e6facdf25ffff29d0d8d5170c4066196772d2c7d9c2736d2789325a66715423078a1b3761a7a41b065f366eba379735
|
7
|
+
data.tar.gz: db7166154329a552a9a8ed9d8c1486077536590cff961173f64a595513d4cdfb522db47c11a56d9d5c9faa65a9fe51d745defb4e7d0033f84484b5a8d256bf53
|
@@ -6,6 +6,12 @@ require 'pupa/processor/middleware/logger'
|
|
6
6
|
require 'pupa/processor/middleware/parse_html'
|
7
7
|
require 'pupa/refinements/faraday_middleware'
|
8
8
|
|
9
|
+
begin
|
10
|
+
require 'multi_xml'
|
11
|
+
rescue LoadError
|
12
|
+
# pass
|
13
|
+
end
|
14
|
+
|
9
15
|
module Pupa
|
10
16
|
class Processor
|
11
17
|
# An HTTP client factory.
|
@@ -26,7 +32,9 @@ module Pupa
|
|
26
32
|
# @see http://tools.ietf.org/html/rfc4627
|
27
33
|
connection.use FaradayMiddleware::ParseJson, content_type: /\bjson$/
|
28
34
|
# @see http://tools.ietf.org/html/rfc3023
|
29
|
-
|
35
|
+
if defined?(MultiXml)
|
36
|
+
connection.use FaradayMiddleware::ParseXml, content_type: /\bxml$/
|
37
|
+
end
|
30
38
|
if cache_dir
|
31
39
|
connection.response :caching do
|
32
40
|
ActiveSupport::Cache::FileStore.new(cache_dir, expires_in: expires_in)
|
data/lib/pupa/version.rb
CHANGED