aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formulary.rb
AgeCommit message (Collapse)Author
2016-12-14formulary: call tap not formulaUladzislau Shablinski
Fixes #1668
2016-12-11Merge pull request #1646 from MikeMcQuaid/report-deprecations-to-tapMike McQuaid
Tell people to report URL/tap deprecations to the tap.
2016-12-10Tell people to report URL/tap deprecations to the tap.Mike McQuaid
Rather than Homebrew/brew or Homebrew/homebrew-core.
2016-12-09formulary: remap deprecated options from keg.Mike McQuaid
When reading a building a formula from a keg (rather than e.g. from name) then the deprecation options were not remapped correctly as they are only done in `Tab.for_formula` and not `Tab.for_keg`. Ensure that after we’ve created the formula that the `used_options` are remapped correctly.
2016-11-11formulary: don't warn on old formula name from keg/rack.Mike McQuaid
If there’s an old installation of e.g. `apple-gcc42` from when it was part of `homebrew/core` then the tab will say it was from the `homebrew/core` tap and then we’ll complain at the user (see #1459 for an example). Instead, we only want to complain when the user actually types in `homebrew/core/apple-gcc42` into a `brew` command. Closes #1459.
2016-11-02formulary: migrate fully-scoped formulae names.Mike McQuaid
e.g. allow `brew install some/tap/formula` to look that formula up in another tap if it has been migrated. Also, add a deprecation message to point people towards the correct naming.
2016-09-24RuboCop: Style/AccessorMethodNameMarkus Reiter
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Fix Style/IfUnlessModifier.Markus Reiter
2016-09-19Fix another `brew style` from #971.Mike McQuaid
2016-09-19Fix `brew style` from #971.Mike McQuaid
2016-09-18upgrade, outdated: follow alias changesAlyssa Ross
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-09-05Replace install_name/install_ref with alias_pathAlyssa Ross
2016-09-05Switch to hash rocketsAlyssa Ross
2016-09-03Preserve alias when installing formulaeAlyssa Ross
Part of #567
2016-08-29formulary: tweak @ translationDominyk Tiller
2016-08-28formulary: translate @ to AT for classnameDominyk Tiller
2016-08-10formulary: fix to_rack for fully-scoped referencesMike McQuaid
Fixes the case where I have `mysql56` installed but do `brew uninstall foo/bar/mysql56` which isn't a valid formula. Fixes https://github.com/Homebrew/legacy-homebrew/issues/39883.
2016-08-06Fix update commit for non-HEAD kegs with head spec (#644)Uladzislau Shablinski
If we try to call `Formulary.from_keg(f, :head)` on the keg that is not HEAD-keg itself, we don't need to update commit of returned formula and should use just HEAD version with nil commit. Same is true for `ARGV.resolved_formulae`
2016-07-17Update commit when resolving the formula (#536)Uladzislau Shablinski
2016-07-15formulary: add missing keg.rackXu Cheng
2016-07-15add Formulary#from_kegXu Cheng
2016-07-15ARGV#resolved_formulae: also load build optionsXu Cheng
2016-06-01Prefer $stderr over STDERR for consistency (#304)Martin Afanasjew
Prior to this change there were only 3 instances of `STD(IN|OUT|ERR)` versus 74 instances of `$std(in|out|err)` in the Homebrew code base. The latter variant is also strongly suggested by bbatsov's Ruby Style Guide.
2016-05-28Use JSON files for bottle upload data. (#166)Mike McQuaid
This means that we do not need to read formulae or evaluate Ruby at upload time.
2016-05-22formulary: fix comment typo.Mike McQuaid
2016-05-08Make bottle code cross-platform.Mike McQuaid
2016-04-17formulary: use FormulaClassUnavailableErrorMartin Afanasjew
Present a more helpful error message if a formula file was loaded, but the class(es) therein didn't match the expected formula class name.
2016-04-02various: Homebrew/core is the core tapXu Cheng
Also make `Homebrew/homebrew` as an alias of this tap to keep backward compatibility.
2016-03-07rename CoreFormulaRepository to CoreTapXu Cheng
Core tap will be separated from core code in the near future. It makes sense to rename it to CoreTap.
2016-02-26various: use Tap abstractionXu Cheng
formula_rename and tap_migrations are now handled inside Tap. Closes Homebrew/homebrew#49549. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-24TapLoader: improve load logicXu Cheng
* Use `Tap#formula_dir` instead of `Tap#formula_files` to find formula file to have better performance and avoid caching issue. * Change the loader logic to search name -> search alias -> search old name. This is more consistence with what we do when loading core formula file. Closes Homebrew/homebrew#49484. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-19move CoreFormulaRepository into separate fileXu Cheng
For users whose local brew is at around 2015-06-11 to 2015-08-06, running `brew update` will emit following error: Error: uninitialized constant Formulary::CoreFormulaRepository This is caused by the same bug described in Homebrew/homebrew#42553. This commit workarounds this issue and restores `brew update` compatibility for users mentioned above. Also cleanup legacy `require "cmd/tap"`.
2015-12-19formulary: use CoreFormulaRepositoryXu Cheng
Let's hide implementation detail on where to find core formulae alias directory. This will benefit future core code and formulae separation.
2015-12-13Formulary: explicitly require tapAlex Dunn
Fixes Homebrew/homebrew#46984.
2015-12-09avoid using FORMULA_RENAMES directlyXu Cheng
2015-12-09Formulary: use same logic to handle core fully-qualified nameXu Cheng
2015-12-09Formulary.core_path: use CoreFormulaRepository#formula_dirXu Cheng
2015-12-09Formulary: use Tap#alias_dirXu Cheng
2015-12-03centralize the logic of handling `homebrew-` in Tap.fetchXu Cheng
Closes Homebrew/homebrew#46537. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-10Formulary.from_rack: better formula resolution strategyXu Cheng
The flow is as follow: * If tap is nil(DIY install), search using name. * If tap is found, search using full name. * If tap is found and full name searching failed, search using name. This usually means the formula may be migrated to different tap. Closes Homebrew/homebrew#44771. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-30cache tapsXu Cheng
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-13support alias for tapXu Cheng
2015-09-06FromUrlLoader: allow file:// schemeXu Cheng
2015-09-06add Formulary.from_contentsXu Cheng
2015-09-06Formulary: allow loading formula from contentsXu Cheng
2015-08-22core file style updateXu Cheng
2015-08-15Formulary.to_rack: follow the symlinkXu Cheng