Permalink
Browse files

use launchy for heroku open

  • Loading branch information...
1 parent 939e952 commit 9ff4debb4489e03f9a15c43dbcbb8e85743bb4e4 @adamwiggins committed Jan 31, 2009
Showing with 5 additions and 6 deletions.
  1. +1 −0 Rakefile
  2. +4 −6 lib/heroku/commands/app.rb
View
@@ -58,6 +58,7 @@ spec = Gem::Specification.new do |s|
s.bindir = "bin"
s.add_dependency('rest-client', '>=0.8.2')
+ s.add_dependency('launchy', '>=0.3.2')
end
Rake::GemPackageTask.new(spec) do |p|
View
@@ -1,4 +1,5 @@
require 'readline'
+require 'launchy'
module Heroku::Command
class App < Base
@@ -63,12 +64,9 @@ def info
def open
app = extract_app
- if system("which firefox > /dev/null 2>&1")
- puts "Opening #{web_url(app)}"
- system "firefox #{web_url(app)}"
- else
- puts "Use your browser to visit: #{web_url(app)}"
- end
+ url = web_url(app)
+ puts "Opening #{url}"
+ Launchy.open url
end
def rake

0 comments on commit 9ff4deb

Please sign in to comment.