Skip to content

Commit

Permalink
Merge branch 'master' of github.com:defunkt/gist
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Apr 18, 2010
2 parents 8c90180 + cdb6aff commit a15c518
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/gist.rb
Expand Up @@ -115,10 +115,13 @@ def read(gist_id)
end

# Given a url, tries to open it in your browser.
# TODO: Linux, Windows
# TODO: Linux
def browse(url)
if RUBY_PLATFORM =~ /darwin/
`open #{url}`
elsif ENV[:OS] == 'Windows_NT' or
RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw|wince/i
`start "" "#{url}"`
end
end

Expand Down

0 comments on commit a15c518

Please sign in to comment.