Skip to content
Snippets Groups Projects
Commit 3762bbf5 authored by Max Howell's avatar Max Howell
Browse files

Fix brew info

Removed DEFAULT_USER, etc. constants, as code is clearer with actual values IMO, in this case.
parent 02208387
No related branches found
No related tags found
No related merge requests found
......@@ -47,9 +47,6 @@ Mercurial can be install thusly:
end
end
DEFAULT_USER = 'mxcl'
DEFAULT_BRANCH = 'master'
def __make url, name
require 'formula'
......@@ -167,20 +164,16 @@ def github_info name
branch = ($1 || '').chomp
end
user = DEFAULT_USER if user.empty?
branch = DEFAULT_BRANCH if user.empty?
user = 'mxcl' if user.empty?
branch = 'master' if user.empty?
history="http://github.com/#{user}/homebrew/commits/#{branch}/Library/Formula/#{formula_name}"
exec 'open', history
return "http://github.com/#{user}/homebrew/commits/#{branch}/Library/Formula/#{formula_name}"
end
def info name
require 'formula'
if ARGV.flag? '--github'
github_info name
return
end
exec 'open', github_info(name) if ARGV.flag? '--github'
f=Formula.factory name
puts "#{f.name} #{f.version}"
......@@ -205,6 +198,7 @@ def info name
puts
end
history = github_info
puts history if history
rescue FormulaUnavailableError
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment