spieker 0.0.8 → 0.0.9

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: 1efbda5b0c8acddf71421f0a398fe81147bba156
4
- data.tar.gz: b8d089ba60167155d2f502e6bbe6f06110d55a58
3
+ metadata.gz: 97a34a590f7122fb4a85c4ecdbae4f275ba8de3f
4
+ data.tar.gz: ecdad843017e8d2a0730e4c637492c9e95d762c2
5
5
  SHA512:
6
- metadata.gz: 33cbdaa59a122b8572c84e6697dd8f2e3c066248a0a770bee2766ec8a0de261eda9f90591f4ae3fc2539a39e402bac78286bec9e5bc0df4f77ac224f4fc61e3a
7
- data.tar.gz: 68074bacc9d188afcaf4ce2ac896b6684c3dcea36034b16760a53a564262999628bdf2fedc31a1e2ff3c90e415e7fb286a3f6ace046ecd4e392eff64a4584da1
6
+ metadata.gz: f8f4bd887fab6904bdd7fa95b4145ddf190f765782f1d11cc1184eb6190888a746b3ccaf8cc98e45788da5fe2c22e9181d4e2146846730a1bada585f622d1c66
7
+ data.tar.gz: 40012f786528bf8b8898f30f44d7715584c311df96140c70dabfeac5679a4e02693e62a310dbb97dbcee7d5839941641dd872c82c96657dfdc6498013d65241d
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ 0.0.9
2
+ * Net::ReadTimeouts can occur if other JS blocks the page/evaluate. Fallback
3
+ to regular selecting
4
+
1
5
  0.0.8
2
6
  * Handle query params like a boss
3
7
  * Fix small bug with language not always being set
@@ -47,7 +47,12 @@ module Spieker
47
47
  visit @url.path + query + "#!lang=#{@lang}"
48
48
  # Capybara + selenium causes some links not to be found. There doesn't seem to be any method to that.
49
49
  # Cool is tho, in JS it's a lot faster as well
50
- links = page.evaluate_script('document.getElementsByTagName(\'a\')').map { |el| el['href'] }
50
+ links = begin
51
+ page.evaluate_script('document.getElementsByTagName(\'a\')').map { |el| el['href'] }
52
+ rescue Net::ReadTimeout
53
+ page.all('a').map { |el| el['href'] }
54
+ end
55
+
51
56
  begin
52
57
  # Our javascript adds a class if the content has been succesfully submitted
53
58
  page.find(:css, 'html.tolq-content-updated')
@@ -1,3 +1,3 @@
1
1
  module Spieker
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spieker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timon Vonk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-03 00:00:00.000000000 Z
11
+ date: 2013-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler