watir-timecop 0.1.0 → 0.1.1

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: 8e6a8ea36e58cd31fb47d2e58265816306e4fcc3
4
- data.tar.gz: 093c859e3d893740361b1568c1d550aded4d05c7
3
+ metadata.gz: f51d046b43b49759cab309154bcd5056de9d13de
4
+ data.tar.gz: c14f6eaffb718bb9c1af4537b3661bc82071fb99
5
5
  SHA512:
6
- metadata.gz: b9dcf981f1ec966646c9ba4de0836583068ed5f8e7e64b04d60179e54b88054bc9d4a8526b973556320541a8986847c1ffc7a64930ff59124d138e940c190106
7
- data.tar.gz: 5dc475bd9058f16c9152345ff77c1f171429700ab9aac8dc05bea98787dcb6429bb927e2f039f70e12081006526e4683daa531a04e1ae3b130c01ccb408f6431
6
+ metadata.gz: c48563bb74db297b4d8c40c96946803e5e06a23b2c296ee83d20133bc59b9b2e6a14edbada5f7c5f7f9e3787dd5366a2f81dfca002da8b918cce1ed0684c94c1
7
+ data.tar.gz: 8b1c242ea78a4ba3803c005825c80c4ccb19c200bd576ba1babe52efb7c0e99970c51e679d0c32f80829d76a42a086ef4cc03b192a7a6a4f3c171ae8775651bb
@@ -1,25 +1,29 @@
1
1
  require 'timeout'
2
2
 
3
- class Watir::Timecop::Timer
3
+ module Watir
4
+ module Timecop
5
+ class Timer
4
6
 
5
- #
6
- # Executes given block until it returns true or exceeds timeout.
7
- # It is different from default Watir::Wait::Timer implementation
8
- # since we use `Timeout.timeour` rather than `Time.now` to determine if
9
- # waiting has exceeded timeout. Usage of `Time.now` is not compatible
10
- # with Timecop gem - we may never exceed the timeout if it's stubbed.
11
- #
12
- # @param [Fixnum] timeout
13
- # @yield block
14
- # @api private
15
- #
7
+ #
8
+ # Executes given block until it returns true or exceeds timeout.
9
+ # It is different from default Watir::Wait::Timer implementation
10
+ # since we use `Timeout.timeour` rather than `Time.now` to determine if
11
+ # waiting has exceeded timeout. Usage of `Time.now` is not compatible
12
+ # with Timecop gem - we may never exceed the timeout if it's stubbed.
13
+ #
14
+ # @param [Fixnum] timeout
15
+ # @yield block
16
+ # @api private
17
+ #
16
18
 
17
- def wait(timeout, &block)
18
- Timeout.timeout(timeout) do
19
- (timeout / Watir::Wait::INTERVAL).to_i.times &block
20
- end
21
- rescue Timeout::Error
22
- false
23
- end
19
+ def wait(timeout, &block)
20
+ Timeout.timeout(timeout) do
21
+ (timeout / Watir::Wait::INTERVAL).to_i.times(&block)
22
+ end
23
+ rescue Timeout::Error
24
+ false
25
+ end
24
26
 
25
- end # Watir::Timecop::Timer
27
+ end # Timer
28
+ end # Timecop
29
+ end # Watir
@@ -1,7 +1,7 @@
1
1
  module Watir
2
2
  module Timecop
3
3
 
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
 
6
6
  end # Timecop
7
7
  end # Watir
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-timecop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov