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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a38a9c6325cff5880b71ef2095e4796a44d080f8
4
- data.tar.gz: cb26f649795c0a05867fe4392d9ab5ca17da7dcf
3
+ metadata.gz: 6e87b1143d22ee0a5d40c9d1a3e8d97e613cd98a
4
+ data.tar.gz: 0f1019fa5cdee6d965cd05102973319ad9071334
5
5
  SHA512:
6
- metadata.gz: 54ad4436c2bb40fea58a7dcbca379658e3926c01a9e5275c77495450499d176a11fa77b2cbade1a0732bb0262dfd594800e0b4d10d5f091c77fdf2b2016c85e6
7
- data.tar.gz: 04164103cae7ffbd5c7fd65fbd0f4be600df172abce903094e652dc309ec17f34429bb3da2b78f51aa287001602ad58e0e212b619c520cf3d2cbb4d6fab4807f
6
+ metadata.gz: 34088780441f5712484d8c9ff362ea0413edf02ce4caa36e00fdd75ed9831cc0d72cc967585eba0a75d74add781806d66d503fc64731b5e0747a697210283755
7
+ data.tar.gz: 148e19c2a82d6906433ecc91445fb93e45159f7cee3421234632003a0c916ff7a520842593c3131a5ac319aed1b9ddc917171ef4698400dc8df0af4ccdd34868
@@ -14,7 +14,7 @@ module Gnawrnip
14
14
  # Close tempfiles.
15
15
  #
16
16
  def discard!
17
- frames.each(&:close!)
17
+ frames.compact.each(&:close!)
18
18
  reset!
19
19
  end
20
20
 
@@ -32,9 +32,15 @@ module Gnawrnip
32
32
  rescue Capybara::NotSupportedByDriverError => e
33
33
  raise e
34
34
  rescue => e
35
- raise e if (Time.now - start_time) >= wait_second
36
- sleep(0.3)
37
- retry
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
 
@@ -1,3 +1,3 @@
1
1
  module Gnawrnip
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -32,11 +32,11 @@ module Gnawrnip
32
32
  end
33
33
 
34
34
  it 'should raise Timeout Error' do
35
- expect {
36
- Capybara.using_wait_time 2 do
37
- Screenshot.take
38
- end
39
- }.to raise_error Timeout::Error
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
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-27 00:00:00.000000000 Z
11
+ date: 2014-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara