aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-04-06 23:40:54 -0500
committerJack Nagel2012-04-06 23:54:41 -0500
commitddfbaab578d6de65b74b26793cd8e40964f9f4f9 (patch)
tree92f59168987aee6b28eb77f6ef2ae664a53614b2 /Library
parent8f95bb1d2afa1125a71a2c8ac85213f8b0b5ac59 (diff)
downloadhomebrew-ddfbaab578d6de65b74b26793cd8e40964f9f4f9.tar.bz2
info: output correct URL for tapped dupes
Tapped formulae that dupe those in core now display the correct URL when invoked like `brew info homebrew/dupes/openssl`. This also fixes the broken `brew info` test. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/info.rb8
-rw-r--r--Library/Homebrew/test/testball.rb1
2 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 383ba4138..3edb6abce 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -28,8 +28,8 @@ module Homebrew extend self
end
end
- def github_info name
- path = Formula.path(name).realpath
+ def github_info f
+ path = f.path.realpath
if path.to_s =~ %r{#{HOMEBREW_REPOSITORY}/Library/Taps/(\w+)-(\w+)/(.*)}
user = $1
@@ -47,7 +47,7 @@ module Homebrew extend self
end
def info_formula f
- exec 'open', github_info(f.name) if ARGV.flag? '--github'
+ exec 'open', github_info(f) if ARGV.flag? '--github'
puts "#{f.name} #{f.version}"
puts f.homepage
@@ -77,7 +77,7 @@ module Homebrew extend self
puts "Not installed"
end
- history = github_info f.name
+ history = github_info(f)
puts history if history
the_caveats = (f.caveats || "").strip
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
index a77d7709c..15069033d 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/testball.rb
@@ -6,6 +6,7 @@ class TestBall <Formula
@url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
@homepage = 'http://example.com/'
super "testball"
+ @path = Pathname.new(__FILE__)
end
def install
prefix.install "bin"