pupa 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6deee32d18def9fda78da75c183a4bee5b67c00e
4
- data.tar.gz: 5fd982a4e5445d3c25df91f161d7f41fbc6e5772
3
+ metadata.gz: c06be9f93589b34b71f5b7037ab75cecbfaa43da
4
+ data.tar.gz: 44b4ab787cc85352b84d6edf8d502adc8a7d6b79
5
5
  SHA512:
6
- metadata.gz: 962075b24c71d2f46648c691b211619a32a96a9edf35bfcb68699c3cf98eeb93681c38c52a69e8ce99bf1bbe1723ec11ca5af33cc1489233cd66365eb6f00502
7
- data.tar.gz: cbf8b00824dab5ae285bd225057ebd86a355722761f5c362d807184f8e43a384277cf26915c889108ea3d901643586c8666580ceac4355ea9601a8f06745d5a8
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
- connection.use FaradayMiddleware::ParseXml, content_type: /\bxml$/
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)
@@ -1,3 +1,3 @@
1
1
  module Pupa
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pupa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Open North