polipus 0.3.6 → 0.3.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 +8 -8
- data/lib/polipus/http.rb +1 -1
- data/lib/polipus/page.rb +2 -2
- data/lib/polipus/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmMzMzJiMDQ1NGQzYTRhNTRmMGZiZWNhY2Y4YTgwNTU2OTljNzdkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDQyNTBiNjkzYzQ0ZDc3ODc3N2MxMTcxOTAzOWFkZjliZGZlYzFjZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWMwNjYzMzY5ZmYzYzNiMTdlMTFkOTNhNGYzNTViZmQ4ZjdkYWFkMjE1YTMz
|
10
|
+
MDc3ZDA1Y2JlN2FiNjVmZGZmYWRlNDU2YjcwYjdlNjFiYjViY2NiZTA1OTNm
|
11
|
+
M2JhYjVhYjkwMzlhNWIxMmM2MzhmNWM5YmY5ZTQ1ZjE2OWY5MGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODlkYzUyNTI1MTVmOTI1YzI2ZjFkMzY1NTMyZWIzMWEwYjI4MGFmODc4Y2Yx
|
14
|
+
ZGVkZTA2NmM2OGU5ZThkOTg1ODJjYjMxNTJiNGZkZDVhYzkwZjkzOWI1ZGI2
|
15
|
+
OTcxOGViODEwZDBiYmQ1ZDU4NmRmZWI2NWZkMTFlNzIzYjdlMjc=
|
data/lib/polipus/http.rb
CHANGED
@@ -196,7 +196,7 @@ module Polipus
|
|
196
196
|
response = connection(url).request(req)
|
197
197
|
finish = Time.now
|
198
198
|
response_time = ((finish - start) * 1000).round
|
199
|
-
cookie_jar.parse(response['Set-Cookie'], url) if accept_cookies?
|
199
|
+
cookie_jar.parse(response['Set-Cookie'], url) if accept_cookies? && response['Set-Cookie']
|
200
200
|
return response, response_time
|
201
201
|
rescue *RESCUABLE_ERRORS => e
|
202
202
|
puts e.inspect if verbose?
|
data/lib/polipus/page.rb
CHANGED
@@ -126,7 +126,7 @@ module Polipus
|
|
126
126
|
# otherwise.
|
127
127
|
#
|
128
128
|
def redirect?
|
129
|
-
(300
|
129
|
+
(300...400).include?(@code)
|
130
130
|
end
|
131
131
|
|
132
132
|
#
|
@@ -228,7 +228,7 @@ module Polipus
|
|
228
228
|
def self.from_hash(hash)
|
229
229
|
page = new(URI(hash['url']))
|
230
230
|
{
|
231
|
-
'@headers' => hash['headers'] ? Marshal.load(hash['headers']) : { 'content-type' => [''] },
|
231
|
+
'@headers' => hash['headers'] && !hash['headers'].empty? ? Marshal.load(hash['headers']) : { 'content-type' => [''] },
|
232
232
|
'@body' => hash['body'],
|
233
233
|
'@links' => hash['links'] ? hash['links'].map { |link| URI(link) } : [],
|
234
234
|
'@code' => hash['code'].to_i,
|
data/lib/polipus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polipus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Laurita
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-bloomfilter
|