diff options
| author | Mike McQuaid | 2014-09-20 16:07:55 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-09-24 15:08:10 -0700 |
| commit | b4edc15cb7510af52e1728eb91a1b3f3b1edf471 (patch) | |
| tree | db7a48abec7285641eafa4132d8f4e9eb0652521 /Library/Homebrew/utils.rb | |
| parent | 91be9f5344d5931ddae6e4f905c18a607fa9e9f1 (diff) | |
| download | homebrew-b4edc15cb7510af52e1728eb91a1b3f3b1edf471.tar.bz2 | |
Generate RDoc documentation.
This is currently still very messy and we probably want to work out the
best way to declare what parts of our DSL/what files are "public".
Still, even if this is a WIP I'd rather get something committed sooner
rather than later and start iterating on this as a replacement for
`example_formula.rb` and the formula cookbook.
To test:
```bash
cd $(brew --prefix)/Library/Homebrew && \
rdoc formula.rb requirement.rb utils.rb &&\
open doc/index.html
```
Closes #32470.
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 9a95b3c3f..6dc5db45e 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -42,6 +42,8 @@ class Tty end end +# :startdoc: + def ohai title, *sput title = Tty.truncate(title) if $stdout.tty? && !ARGV.verbose? puts "#{Tty.blue}==>#{Tty.white} #{title}#{Tty.reset}" @@ -71,6 +73,8 @@ def odie error exit 1 end +# :stopdoc: + def pretty_duration s return "2 seconds" if s < 3 # avoids the plural problem ;) return "#{s.to_i} seconds" if s < 120 |
