grell 1.6.6 → 1.6.7

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
  SHA1:
3
- metadata.gz: 98ea3ab2a0070ed58b888f4776894e391a6d59fa
4
- data.tar.gz: 478b4fe3cd8326d52543ba38961ac4318434ee44
3
+ metadata.gz: 416346b7f2b8e8fe95ce0269599227929be4360f
4
+ data.tar.gz: 98b06e25d9d87e926a263d28023a2e0f5a22c24e
5
5
  SHA512:
6
- metadata.gz: dc7b0b0bf90b51ee8d7c881e5eec6ce3a8d7d3058eac99ed5f1f4ed8cfb55f34b41c6f2bacbd9fc836e889eb67af0555996211b7411754e006951a48dcd9dccf
7
- data.tar.gz: de50bdceca2dd0177fe20bcc9127018723859bb727b827cf464553d4cd5e598436dbb53fdafcead8184faeb0e9d2b2f3c0c6cd24c809c777277fcc7bc0264d07
6
+ metadata.gz: c435a95ee0d6a6116999e7d916db607ae16eab5f6cdad379d04fdc6e7160b1ff5420460b6c06c87bd39f1ee27a4451e22f10c565ea756690b1833afb093a8c4d
7
+ data.tar.gz: 65766dbde21e449906daaf5661d2a74064f05b286033461461196db11345df31bb7a7ca130e6d9b29e6384019fc32d6ea2b27fbe87215f9fb18111e5f475c0f9
@@ -1,3 +1,6 @@
1
+ # 1.6.7
2
+ * Increment '@times_visited' first to avoid infinite retries when rescuing errors
3
+
1
4
  # 1.6.6
2
5
  * Updated phantomjs_logger not to open '/dev/null'
3
6
 
@@ -33,11 +33,12 @@ module Grell
33
33
  end
34
34
  @result_page = VisitedPage.new(@rawpage)
35
35
  @timestamp = Time.now
36
- @times_visited += 1
37
36
  rescue Capybara::Poltergeist::BrowserError, Capybara::Poltergeist::DeadClient,
38
37
  Capybara::Poltergeist::JavascriptError, Capybara::Poltergeist::StatusFailError,
39
38
  Capybara::Poltergeist::TimeoutError, Errno::ECONNRESET, URI::InvalidURIError => e
40
39
  unavailable_page(404, e)
40
+ ensure
41
+ @times_visited += 1
41
42
  end
42
43
 
43
44
  # Number of times we have retried the current page
@@ -1,3 +1,3 @@
1
1
  module Grell
2
- VERSION = "1.6.6".freeze
2
+ VERSION = "1.6.7".freeze
3
3
  end
@@ -102,6 +102,7 @@ RSpec.describe Grell::Page do
102
102
  expect(page).to be_visited
103
103
  expect(page.timestamp).to eq(now)
104
104
  expect(page.error?).to eq(true)
105
+ expect(page.instance_variable_get(:@times_visited)).to eq(1)
105
106
  end
106
107
  end
107
108
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.6
4
+ version: 1.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo Carres
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-11 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara