gamera 0.1.1 → 0.1.2
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/gamera/page.rb +7 -5
- data/lib/gamera/page_sections/form.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f13eaba24a296c7793fb3cc76ac3abdb950da0
|
4
|
+
data.tar.gz: eb5c7cffd2cf05cfc1ecec94f566230cadb22f3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 979cf06a2b3d3ce6dc45336d7b7027452d32f24d4cf94c1250b05dce0be79f99ff7a6e9be0a6c0f6cd8182ec98147aaa8b57517c4194e51a7146b4d146c19b88
|
7
|
+
data.tar.gz: f2a999c63b0465aa37287fa51852db74d9f7b10630dea93197c82e44b72195f1c5152a680309e900bfb39cde1bbe52341be77b4924947761f7e027884dbcd0cc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/gamera/page.rb
CHANGED
@@ -141,11 +141,13 @@ module Gamera
|
|
141
141
|
|
142
142
|
# Open the page url in the browser specified in your Capybara configuration
|
143
143
|
#
|
144
|
-
# @
|
145
|
-
#
|
146
|
-
def visit
|
144
|
+
# @param fail_on_redirect [Boolean] Whether to fail if the site redirects to a page that does not match the url_matcher regex
|
145
|
+
# @raise [WrongPageVisited] if the site redirects to URL that doesn't match the url_matcher regex and fail_on_redirect is true
|
146
|
+
def visit(fail_on_redirect = true)
|
147
147
|
super(url)
|
148
|
-
|
148
|
+
if fail_on_redirect
|
149
|
+
fail WrongPageVisited, "Expected URL '#{url}', got '#{page.current_url}'" unless displayed?
|
150
|
+
end
|
149
151
|
end
|
150
152
|
|
151
153
|
# Check to see if we eventually land on the right page
|
@@ -197,7 +199,7 @@ module Gamera
|
|
197
199
|
# @param elements [String] duck types
|
198
200
|
# @return [String] of elements joined by single "/" characters.
|
199
201
|
def path_join(*elements)
|
200
|
-
"/#{elements.join('/')}".gsub(%r(//+
|
202
|
+
"/#{elements.join('/')}".gsub(%r(//+), '/')
|
201
203
|
end
|
202
204
|
end
|
203
205
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dobbs
|
@@ -32,7 +32,7 @@ cert_chain:
|
|
32
32
|
464gGOxiLBQhgi5LrYOx/4oHzyd9o7ZEC/rFUw6RlYq/Zy91Y68MQG3R4q54FSDr
|
33
33
|
JCSrp1wI+0CJRVpPuS6W3r3h8/lBfq6wPTmg3MzlDTDYHTnh7poY3EqC6x7+xA==
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date: 2015-06-
|
35
|
+
date: 2015-06-12 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rspec
|
metadata.gz.sig
CHANGED
Binary file
|