ae_page_objects 1.0.1 → 1.0.2

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: 21bb3ce2ec7cab7d29ee0c2d1f820351283fa949
4
- data.tar.gz: 25d73f3965d7e6fe0ef3c9997b96c3cdd1414299
3
+ metadata.gz: 7a18e3851747da830279cb221c6e8396be49bd7f
4
+ data.tar.gz: d928b79a0cf1c1803fe6fe5dfaa11bdf09be89da
5
5
  SHA512:
6
- metadata.gz: fb4b1ad7f3389aa64a2cdc8e3215a345af964a015d6394d1d6db2734ecdaae88344e878e6e86530ddd0f6729aea1ea8bfd3b26aec77c3fe0e3648d9f2a8690e3
7
- data.tar.gz: 737667a88d09c4d8c8447b36c28d0d4ad214c6b65d2e7e6334edd4fb002f06c53cf73e654cb9b81d6d5e3a255d44b43249ed9bdfb2dcf8fe75df7d39393bdabb
6
+ metadata.gz: d3c1e84440a35294ddb0b75e980c604e76f79bfdc79161cbd37808afa0c59e35ba43d6024c2babe4e4cd5f24584787c2d610d1225ede69dc1ff567f95f28d0bb
7
+ data.tar.gz: de8501df5e1f010dc72ef281fbc5038fca1cf683b8ba61c3c62b84585537afbe8811ac2cfdf8e4a6d0147d91a6a068b2e8deaeb589568a03e1609bebc1905588
@@ -1,12 +1,20 @@
1
1
  module AePageObjects
2
2
  module Waiter
3
3
  def self.wait_for(&block)
4
- Timeout.timeout(Capybara.default_wait_time) do
5
- sleep(0.05) until value = Capybara.using_wait_time(0, &block)
6
- value
4
+ seconds_to_wait = Capybara.default_wait_time
5
+ start_time = Time.now
6
+
7
+ until result = Capybara.using_wait_time(0, &block)
8
+ delay = seconds_to_wait - (Time.now - start_time)
9
+
10
+ if delay <= 0
11
+ return false
12
+ end
13
+
14
+ sleep(0.05)
7
15
  end
8
- rescue Timeout::Error
9
- false
16
+
17
+ result
10
18
  end
11
19
  end
12
- end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module AePageObjects
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_page_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Donnie Tognazzini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara