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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cd4b15cf2cf48495a72937e2b22f206ec6cae92
4
- data.tar.gz: a9bbfe733ff0a023bf2ce044e54896672a6f4791
3
+ metadata.gz: c7f13eaba24a296c7793fb3cc76ac3abdb950da0
4
+ data.tar.gz: eb5c7cffd2cf05cfc1ecec94f566230cadb22f3d
5
5
  SHA512:
6
- metadata.gz: 5ce0314451330f9dc2365be2b7953899a5ab76b6099643d402f80ad5cd0db2abe9b88c265b24cc0210da1d54d212e1dd104972f891c74baaf8b4235920722d17
7
- data.tar.gz: 2722bd189c88971813e9eabd329a3d7f9251fceaff5dcde721e242d6501d1a0167eff75fe973c7d7131f4ce47aa52caf593f3251fcf16678240c3802448e1562
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
- # @raise [WrongPageVisited] if the site redirects to URL that doesn't match
145
- # the url_matcher regex
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
- fail WrongPageVisited, "Expected URL '#{url}', got '#{page.current_url}'" unless displayed?
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
@@ -93,7 +93,7 @@ module Gamera
93
93
  def fill_in_form(fields)
94
94
  fields.each do |field, value|
95
95
  f = send("#{field}_field")
96
- f.set(value.to_s) || Array(value).each { |val| f.select(val) }
96
+ f.set(value) || Array(value).each { |val| f.select(val) }
97
97
  end
98
98
  end
99
99
 
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.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-11 00:00:00.000000000 Z
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