9 Commits

Author SHA1 Message Date
Caleb Xu
0552dcff62 extract: accept tap as a non-flagged argument 2018-08-21 10:17:23 -04:00
Caleb Xu
6018968f91 Further collapse monkeypatches 2018-08-21 10:17:23 -04:00
Caleb Xu
713aedb6ed Fix code review requests 2018-08-21 10:17:23 -04:00
Caleb Xu
260867627b Switch back to monkey-patching
Also gsub! some particular formula contents to work around older
formulae ("brewkit" isn't around anymore, and url is expected to
be a method, not an instance variable).
2018-08-21 10:17:23 -04:00
Caleb Xu
95abdf9662 Use refinements instead of general monkey-patching 2018-08-21 10:17:23 -04:00
Caleb Xu
ff8b5f8c5a extract: rework to search through old/deleted formulae
- Removed use of FormulaVersions - it's generally too brittle for our uses. We
  now interface directly with the Git repo via utils/git and monkeypatch the
  formula loading process where needed.

- Really old formulae (that specify fields as instance vars instead of methods)
  still need more work to be supported; they don't work here quite yet.

- Properly handles deleted/removed formulae from Homebrew/homebrew-core.
  Additional work is still needed to search through Homebrew/legacy-homebrew if
  this functionality is desired.
2018-08-21 10:17:23 -04:00
Caleb Xu
1003aa72c9 Additional fixups for extract command
- Rework command line options
- Make specifying a version optional
- Remove stdout option and require a tap to be specified
- Do not allow user to extract into homebrew/core
- Rework new class name generation to use existing Formulary tools
2018-08-21 10:17:23 -04:00
Caleb Xu
bd2ac70c0f Fix style issues in extract command 2018-08-21 10:17:23 -04:00
Caleb Xu
055460884b Fix up extract command
- Move from cmd to dev-cmd
- Add --stdout flag
- Add sanity checks for args/flags
- Minor rewording on error messages
2018-08-21 10:17:23 -04:00