Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Check Launchy version as suggested by @levity in #415 #562

Merged
merged 1 commit into from

2 participants

@joliss
Collaborator

Launchy versions older than 2.0.0 (like 0.4.0) are not compatible.
Capybara now complains if it finds such a Launchy version. (I tested all
of this.)

@joliss joliss Check Launchy version as suggested by @levity in #415
Launchy versions older than 2.0.0 (like 0.4.0) are not compatible.
Capybara now complains if it finds such a Launchy version. (I tested all
of this.)
53b5c2e
@joliss joliss referenced this pull request
Merged

Update to launchy-2.0 #415

@jnicklas
Owner

Nice!

@jnicklas jnicklas merged commit 9ed30f0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 8, 2011
  1. @joliss

    Check Launchy version as suggested by @levity in #415

    joliss authored
    Launchy versions older than 2.0.0 (like 0.4.0) are not compatible.
    Capybara now complains if it finds such a Launchy version. (I tested all
    of this.)
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/capybara/util/save_and_open_page.rb
View
5 lib/capybara/util/save_and_open_page.rb
@@ -22,10 +22,11 @@ def save_and_open_page(html, file_name=nil)
protected
def open_in_browser(path) # :nodoc
- require "launchy"
+ require "launchy" # could raise LoadError
+ raise LoadError unless Launchy::Version::MAJOR >= 2
Launchy.open(path)
rescue LoadError
- warn "Sorry, you need to install launchy (`gem install launchy`) and " <<
+ warn "Sorry, you need to install launchy >=2.0.0 (`gem install launchy`) and " <<
"make sure it's available to open pages with `save_and_open_page`."
end
Something went wrong with that request. Please try again.