capybara-slow_finder_errors 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/capybara-slow_finder_errors.gemspec +1 -1
- data/lib/capybara/slow_finder_errors.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83b95fc3a71fcb5953019ca03ffe222b6cc2ef46
|
4
|
+
data.tar.gz: ca60466e5c5015ad56969b8658ef97476f89252b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77bc831b6e8c034530e452eaf01969a1d52c993bd77e24f407dec58a3a1f1ca800edb5cff50ad0082e98ab4d910f020149ef5748afcf6ab08ff0e55ec9bd1359
|
7
|
+
data.tar.gz: 5d8a29c1d967cf406ffb59223e81adb6b9237ee6c7d1b9724ed3ad333b09e1f60750b4222947bc0c89f34753b9cea5bdd640a10ab92d1c55bb5d16cd28376ea2
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "capybara-slow_finder_errors"
|
5
|
-
spec.version = "0.1.
|
5
|
+
spec.version = "0.1.4"
|
6
6
|
spec.authors = ["Nick Gauthier"]
|
7
7
|
spec.email = ["ngauthier@gmail.com"]
|
8
8
|
spec.summary = %q{Raises an error when you use a Capybara finder improperly}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'capybara'
|
2
2
|
module Capybara
|
3
|
-
|
3
|
+
ADDITIONAL_MESSAGE = 'Timeout reached while running a *waiting* Capybara finder...perhaps you wanted to return immediately? Use a non-waiting Capybara finder. More info: http://blog.codeship.com/faster-rails-tests?utm_source=gem_exception'
|
4
4
|
|
5
5
|
module Node
|
6
6
|
class Base
|
@@ -9,10 +9,9 @@ module Capybara
|
|
9
9
|
synchronize_without_timeout_error(*args, &block)
|
10
10
|
rescue Capybara::ElementNotFound => e
|
11
11
|
seconds = args.first || Capybara.default_max_wait_time
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
raise
|
12
|
+
raise e unless seconds > 0 && Time.now-start_time > seconds
|
13
|
+
|
14
|
+
raise e, "#{$!}\n\n#{ADDITIONAL_MESSAGE}", e.backtrace
|
16
15
|
end
|
17
16
|
alias_method :synchronize_without_timeout_error, :synchronize
|
18
17
|
alias_method :synchronize, :synchronize_with_timeout_error
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-slow_finder_errors
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Gauthier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|