spreewald 1.2.12 → 1.2.13

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: 56ca44775ab807ae4ea9786a8109b350cd65a441
4
- data.tar.gz: 30ab6e1e86e09f5aa087545a1e6cf496f0be1c45
3
+ metadata.gz: be55354f05cdab6f79c35d3168a71a85e23a3cd0
4
+ data.tar.gz: 608bf81f6b1e19e960f0b8cab16b9bb6c35d779b
5
5
  SHA512:
6
- metadata.gz: 7068d9eb34a9ba641580fb389a3ad158ab8a811fb435f0e9c41e596359865b6c908ab08368c7ee3c1a45a825e7e26854e0413d362ae998eddc660f9dcde7e0c3
7
- data.tar.gz: 2a44bba5a13f1692863703bb90fba52504ec2d7196304d6e52e906d654459da9c1dc043c4d5dc0444fece7993a7f45f65c47d787156cb6b064b21606da792b4b
6
+ metadata.gz: 22e1905d359a5b1b86d892e032c39bf2814fd52fb98e00df5a11658106d3df6480e103556d92fe7f03deb839dd3ba6a050ea87cee7a28483604adc574461b0e4
7
+ data.tar.gz: 585a0bd2e1c25af6609e360f0e16c2d499a39631d029a1341e8f450cdb70aa671eff2b11c90769a00b5b80491b2b44791726af52140bd8313963f6dbb89d290c
@@ -16,11 +16,29 @@ module ToleranceForSeleniumSyncIssues
16
16
  Selenium::WebDriver::Error::JavascriptError
17
17
  ]
18
18
 
19
+ class CapybaraWrapper
20
+ def self.default_max_wait_time
21
+ if Capybara.respond_to?(:default_max_wait_time)
22
+ Capybara.default_max_wait_time
23
+ else
24
+ Capybara.default_wait_time
25
+ end
26
+ end
27
+
28
+ def self.default_max_wait_time=(value)
29
+ if Capybara.respond_to?(:default_max_wait_time=)
30
+ Capybara.default_max_wait_time = value
31
+ else
32
+ Capybara.default_wait_time = value
33
+ end
34
+ end
35
+ end
36
+
19
37
  # This is similiar but not entirely the same as Capybara::Node::Base#wait_until or Capybara::Session#wait_until
20
- def patiently(seconds=Capybara.default_wait_time, &block)
21
- old_wait_time = Capybara.default_wait_time
38
+ def patiently(seconds = CapybaraWrapper.default_max_wait_time, &block)
39
+ old_wait_time = CapybaraWrapper.default_max_wait_time
22
40
  # dont make nested wait_untils use up all the alloted time
23
- Capybara.default_wait_time = 0 # for we are a jealous gem
41
+ CapybaraWrapper.default_max_wait_time = 0 # for we are a jealous gem
24
42
  if page.driver.wait?
25
43
  start_time = Time.now
26
44
  begin
@@ -36,7 +54,7 @@ module ToleranceForSeleniumSyncIssues
36
54
  block.call
37
55
  end
38
56
  ensure
39
- Capybara.default_wait_time = old_wait_time
57
+ CapybaraWrapper.default_max_wait_time = old_wait_time
40
58
  end
41
59
  end
42
60
 
@@ -1,3 +1,3 @@
1
1
  module Spreewald
2
- VERSION = '1.2.12'
2
+ VERSION = '1.2.13'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- spreewald (1.2.12)
4
+ spreewald (1.2.13)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- spreewald (1.2.12)
4
+ spreewald (1.2.13)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- spreewald (1.2.12)
4
+ spreewald (1.2.13)
5
5
  capybara
6
6
  cucumber
7
7
  cucumber-rails
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spreewald
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.12
4
+ version: 1.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-17 00:00:00.000000000 Z
11
+ date: 2015-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber-rails