Xu Cheng 3b520cf195 cache taps
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.

Some benchmark:

$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total

Closes Homebrew/homebrew#44377.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-30 16:25:30 +08:00
..
2015-09-30 16:25:30 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-09-04 20:19:34 +01:00
2015-09-10 23:10:26 -07:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-29 15:43:16 +01:00
2015-08-28 17:15:29 +08:00
2015-09-04 16:03:48 +08:00
2015-08-03 13:22:35 +01:00
2015-08-29 15:43:16 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-09-30 16:25:30 +08:00
2015-09-30 16:25:30 +08:00
2015-08-06 22:33:46 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-29 15:43:16 +01:00
2015-01-13 16:35:24 -05:00
2015-08-03 14:34:12 -07:00
2015-08-03 13:22:35 +01:00
2015-03-12 15:19:02 +00:00
2015-08-03 13:22:35 +01:00
2015-04-15 19:51:54 +08:00
2015-08-29 15:43:16 +01:00
2015-09-01 19:19:13 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-09-30 03:49:52 +01:00
2015-09-30 16:25:30 +08:00
2015-08-03 13:22:35 +01:00
2015-09-09 12:19:17 +08:00

Homebrew's Formula API

This is the (partially) documented public API for Homebrew. It's currently a work in progress. Sorry about that!

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!