capybara-slow_finder_errors 0.1.3 → 0.1.4

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: 6ce36307cee7746e4fafa92087bffca0eeff4d85
4
- data.tar.gz: 92002cd4ed5e83f08f0e668e6b5bc2fc996e304f
3
+ metadata.gz: 83b95fc3a71fcb5953019ca03ffe222b6cc2ef46
4
+ data.tar.gz: ca60466e5c5015ad56969b8658ef97476f89252b
5
5
  SHA512:
6
- metadata.gz: 470bd8ffc3d5b3d072fbbb076f821509d3506e0d11d076abdec878d4270ca173c361fc5cc0a908edda6bf9e002548f08c4625ad32d34267d1cc019328ba936ca
7
- data.tar.gz: 29ef8d0202285a7d1222d06242b0fe48b6cf0e8357a4856bbf9ca1ee4adf950b8557283e36ebdc883fe9c512959228f4ddbbc281edabb3232d7776fd648d86c1
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.3"
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
- class SlowFinderError < CapybaraError; end
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
- if seconds > 0 && Time.now-start_time > seconds
13
- raise SlowFinderError, "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"
14
- end
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.3
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-05 00:00:00.000000000 Z
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler