watir-webdriver 0.6.6 → 0.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b9c0e2e49fd1adf8c00dfc403d75c2e094fe1943
4
- data.tar.gz: af1f8e6931a85648b791a7b1d63882366c4101b3
3
+ metadata.gz: e372a1f6959d978774865329265a8384bcb5392f
4
+ data.tar.gz: 62aa15e1de0949782b07234848810e9f1ada78d2
5
5
  SHA512:
6
- metadata.gz: 7a25e42aefc24fa435a2b26d38cb37a9a21c00e65771c3454303b8799dbe39d3a00f1a1402841f59a5a6244843bd0c6f740e47e5c352a377a9f2a2ffeb9e44fd
7
- data.tar.gz: 6f46fa5f3eb38248e74c3aaa75dd9d15240571cfcf13ad6df6dbf4ee3e178217029144e56fed72ca7fd45af4f6a8b3ff0873649283a87a51935dc9175082cf2a
6
+ metadata.gz: cf81b7db2c3f76b325aea31d4b200928ed210033c2017c0a777a8df8f5903841b35fb278ea1b0214bf955a1c1a8f28c25245d0801158388605f51c4577443e25
7
+ data.tar.gz: 90b8cba253f40574f08781ad83ca52220c3091c412d9dac432216377be2f74725c837b1092780259c40ba3a8d62a9de817bcf25fd01e3cdfc66c217a18310d4a
@@ -36,11 +36,11 @@ module Watir
36
36
  def always_locate=(bool)
37
37
  @always_locate = bool
38
38
  end
39
-
39
+
40
40
  def default_timeout
41
41
  @default_timeout ||= 30
42
42
  end
43
-
43
+
44
44
  #
45
45
  # Default wait time for wait methods.
46
46
  #
@@ -1,3 +1,3 @@
1
1
  module Watir
2
- VERSION = "0.6.6"
2
+ VERSION = "0.6.7"
3
3
  end
@@ -9,7 +9,6 @@ module Watir
9
9
  INTERVAL = 0.1
10
10
 
11
11
  class << self
12
-
13
12
  #
14
13
  # Waits until the block evaluates to true or times out.
15
14
  #
@@ -23,7 +22,9 @@ module Watir
23
22
 
24
23
  def until(timeout = nil, message = nil, &block)
25
24
  timeout ||= Watir.default_timeout
26
- wait(timeout) do
25
+ end_time = ::Time.now + timeout
26
+
27
+ until ::Time.now > end_time
27
28
  result = yield(self)
28
29
  return result if result
29
30
  sleep INTERVAL
@@ -45,7 +46,9 @@ module Watir
45
46
 
46
47
  def while(timeout = nil, message = nil, &block)
47
48
  timeout ||= Watir.default_timeout
48
- wait(timeout) do
49
+ end_time = ::Time.now + timeout
50
+
51
+ until ::Time.now > end_time
49
52
  return unless yield(self)
50
53
  sleep INTERVAL
51
54
  end
@@ -62,10 +65,6 @@ module Watir
62
65
  err
63
66
  end
64
67
 
65
- def wait(timeout, &block)
66
- (timeout / INTERVAL).to_i.times &block
67
- end
68
-
69
68
  end # self
70
69
  end # Wait
71
70
 
data/spec/browser_spec.rb CHANGED
@@ -115,7 +115,7 @@ describe Watir::Browser do
115
115
  describe "#inspect" do
116
116
  it "works even if browser is closed" do
117
117
  browser.should_receive(:url).and_raise(Errno::ECONNREFUSED)
118
- expect(browser.inspect).to_not raise_error
118
+ expect { browser.inspect }.to_not raise_error
119
119
  end
120
120
  end
121
121
 
data/support/travis.sh CHANGED
@@ -4,7 +4,7 @@ set -e
4
4
  set -x
5
5
 
6
6
  export CHROME_REVISION=228611
7
- export CHROMEDRIVER_VERSION=2.4
7
+ export CHROMEDRIVER_VERSION=2.9
8
8
 
9
9
  sh -e /etc/init.d/xvfb start
10
10
  git submodule update --init
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-29 00:00:00.000000000 Z
11
+ date: 2014-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver