gnawrnip 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gnawrnip/photographer.rb +1 -1
- data/lib/gnawrnip/screenshot.rb +9 -3
- data/lib/gnawrnip/version.rb +1 -1
- data/spec/gnawrnip/screenshot_spec.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e87b1143d22ee0a5d40c9d1a3e8d97e613cd98a
|
4
|
+
data.tar.gz: 0f1019fa5cdee6d965cd05102973319ad9071334
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34088780441f5712484d8c9ff362ea0413edf02ce4caa36e00fdd75ed9831cc0d72cc967585eba0a75d74add781806d66d503fc64731b5e0747a697210283755
|
7
|
+
data.tar.gz: 148e19c2a82d6906433ecc91445fb93e45159f7cee3421234632003a0c916ff7a520842593c3131a5ac319aed1b9ddc917171ef4698400dc8df0af4ccdd34868
|
data/lib/gnawrnip/screenshot.rb
CHANGED
@@ -32,9 +32,15 @@ module Gnawrnip
|
|
32
32
|
rescue Capybara::NotSupportedByDriverError => e
|
33
33
|
raise e
|
34
34
|
rescue => e
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
if (Time.now - start_time) < wait_second
|
36
|
+
sleep(0.3)
|
37
|
+
retry
|
38
|
+
end
|
39
|
+
|
40
|
+
$stderr.puts "WARNING: Timeout!! Can't take screenshot"
|
41
|
+
$stderr.puts " #{e}"
|
42
|
+
|
43
|
+
nil
|
38
44
|
end
|
39
45
|
end
|
40
46
|
|
data/lib/gnawrnip/version.rb
CHANGED
@@ -32,11 +32,11 @@ module Gnawrnip
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'should raise Timeout Error' do
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
screenshot = Capybara.using_wait_time 2 do
|
36
|
+
Screenshot.take
|
37
|
+
end
|
38
|
+
|
39
|
+
expect(screenshot).to be_nil
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gnawrnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wataru MIYAGUNI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01
|
11
|
+
date: 2014-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|