aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/gist-logs.rb
diff options
context:
space:
mode:
authorJack Nagel2015-04-25 22:07:06 -0400
committerJack Nagel2015-04-25 23:14:05 -0400
commit16dfe3dd4000ce3d97cb2a0087946c9b2ead5665 (patch)
tree7ad33cac510a78e8d925c54e09be88294bdf39ab /Library/Homebrew/cmd/gist-logs.rb
parentf5d6d80d5bac2c83a89021481812b461c54cfba3 (diff)
downloadbrew-16dfe3dd4000ce3d97cb2a0087946c9b2ead5665.tar.bz2
Add Formula#logs
Diffstat (limited to 'Library/Homebrew/cmd/gist-logs.rb')
-rw-r--r--Library/Homebrew/cmd/gist-logs.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index 463fcc35c..768de6714 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -6,7 +6,7 @@ require 'stringio'
module Homebrew
def gistify_logs f
- files = load_logs(f.name)
+ files = load_logs(f.logs)
s = StringIO.new
Homebrew.dump_verbose_config(s)
@@ -58,9 +58,8 @@ module Homebrew
request.basic_auth(user, password)
end
- def load_logs name
+ def load_logs(dir)
logs = {}
- dir = HOMEBREW_LOGS/name
dir.children.sort.each do |file|
contents = file.size? ? file.read : "empty log"
logs[file.basename.to_s] = { :content => contents }