aboutsummaryrefslogtreecommitdiffstats
path: root/Library
AgeCommit message (Collapse)Author
2013-04-30Update HOMEBREW_DEBUG in man page.Adam Vandenberg
Closes Homebrew/homebrew#17344.
2013-04-30completion: avoid unnecessary `brew` invocationsJack Nagel
2013-04-29info: try blacklist for unknown formula namesAdam Vandenberg
Closes Homebrew/homebrew#17399.
2013-04-27Avoid capturing groups when unnusedJack Nagel
2013-04-27Combine GitHub version regexesJack Nagel
2013-04-27Only remove DS_Store on ENOTEMPTYJack Nagel
2013-04-27Don't test error messageJack Nagel
Now that we are testing for a custom exception type, we don't need to make any assertion about the message.
2013-04-27Allow `brew versions` to work with underspecified formulaeJack Nagel
2013-04-26audit: fix interpolation checkJack Nagel
Fixes Homebrew/homebrew#19363.
2013-04-26brew-tests: install deps before tests.Mike McQuaid
2013-04-26Add deps target to tests Rakefile for needed gems.Mike McQuaid
2013-04-25doctor: don't shell out in coreutils checkMisty De Meo
2013-04-25doctor: add default-names findutils checkMisty De Meo
Fixes Homebrew/homebrew#19265.
2013-04-24Add a couple more version testsJack Nagel
2013-04-24Split up big version detection testJack Nagel
2013-04-22audit: warn about top-level methodsJack Nagel
2013-04-21Remove global methods from formulaeSimon Sigurdhsson
Removes any global methods from formulae, and moves #kext_prefix (which seems to be at least somewhat abstractable) into the Formula class. The only formula with global methods is now aspell; it (and its generating script in contrib) has been changed to prefix that method with `aspell_`, to minimize the risk of name collisions. Closes Homebrew/homebrew#19331. Closes Homebrew/homebrew#19343. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-04-20Avoid calling to_s on the same Pathname multiple timesJack Nagel
2013-04-18Don't accept Formula objects as dep specsJack Nagel
It was pointed out that this isn't used at all.
2013-04-17Reorder dep spec types by frequencyJack Nagel
2013-04-17Add :hg build requirement.Adam Vandenberg
Closes Homebrew/homebrew#19074.
2013-04-16Fix download strategy for SVN HEADXiyue Deng
After converting to Pathname to create paths, using '+=' will result in path concatenation by '/', which result in weird path like 'gcc--svn/-HEAD'. This patch should fix this. Closes Homebrew/homebrew#19233. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-04-16VersionElement: attempt most likely match firstJack Nagel
2013-04-16Only call Pathname#to_s once per Version objectJack Nagel
2013-04-16Only dup and shift when specs hash is populatedJack Nagel
2013-04-16Reduce repeated array inclusion checkJack Nagel
Currently we check if "tag" is present in LANGUAGE_MODULES for every String dep, even if tag is nil. Stop doing this, and make the LANGUAGE_MODULES array into a Set instead to improve lookup performance.
2013-04-16Add tests for FormulaPin and simplify implementationJack Nagel
2013-04-15Update for Xcode 4.6.2Ashley Towns
Closes Homebrew/homebrew#19227. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-04-15Don't create MacOS.version multiple timesJack Nagel
2013-04-15Optimize Version#<=>Jack Nagel
2013-04-15Avoid expensive Pathname concatenationJack Nagel
2013-04-15Clean up remaining DownloadStrategy initializersJack Nagel
2013-04-14Avoid repeated interpolation here tooJack Nagel
2013-04-14Style nitJack Nagel
2013-04-14Performance fix for Pathname#prepend_prefixJack Nagel
See 05a456c231dc6da7cb0f7c70cb21feaf9a0d803c; same story.
2013-04-14Performance fix for Pathname#chop_basenameJack Nagel
This is an internal method, but is called a bunch of times in performance-critical codepaths, and is ultra slow because the constant is interpoplated into the Regexp each time the method is called. Alas, this has been fixed in Ruby 1.9+.
2013-04-14Avoid slow operations in FormulaPin#initializeJack Nagel
A FormulaPin object is created every time Formula is instantiated, so don't do filesystem operations or Pathname concatenation eagerly.
2013-04-14Don't use Pathname#/ in performance-critical codeJack Nagel
This method (well, really, #join) is *twice* as slow as simple concatenation, and shouldn't really be used at all in non-Formula code.
2013-04-14Optimization: avoid repeated interpolation in regexpJack Nagel
Benchmark.bm do |b| b.report("before") do 100_000.times { /(\.#{MacOS.cat}\.bottle\.(\d+\.)?tar\.gz)$/ } end b.report("after ") do 100_000.times { /(\.#{MacOS.cat}\.bottle\.(\d+\.)?tar\.gz)$/o } end end user system total real before 35.400000 0.140000 35.540000 ( 35.619674) after 0.020000 0.000000 0.020000 ( 0.016662)
2013-04-14Keg requires OpenStructJack Nagel
2013-04-14Only prune taps if taps exist.Adam Vandenberg
Closes Homebrew/homebrew#19192.
2013-04-13New visualization for brew deps --treeJaime Marquínez Ferrándiz
Closes Homebrew/homebrew#18835. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-04-13Remove extra requireJack Nagel
2013-04-13Use assert_operatorJack Nagel
2013-04-13Remove obsolete testsJack Nagel
This behavior is now tested at more appropriate levels in test_software_spec, test_formula_spec_selection, and test_formula_validation.
2013-04-13Make a specific assertion in this testJack Nagel
2013-04-13Raise a useful exception for incomplete formulaeJack Nagel
2013-04-13Add tests for formula spec selectionJack Nagel
These tests document the relative precedence of the stable, bottle, devel, and head specifications, and the conditions that can influence which is selected (e.g. command-line flags).
2013-04-13Allow "devel-only" formulaeJack Nagel
It seems only natural that this should be possible, or at the very least, it should not result in calling methods on nil.
2013-04-13Improved formula attribute validationJack Nagel
The initializer for Formula does a number of validations, but it does them in a weird order, and some attributes aren't validated under certain circumstances. This became even more of a mess when most software package attributes were moved into the SoftwareSpec class. This commit removes the last vestiges of storing these attributes as instance variables. In particular, it eliminates #set_instance_variable and #validate_variable, replacing them with methods that operate on SoftwareSpec instances, and generate more useful errors. Doing these validations unconditionally in the initializer means we bail out much earlier if the formula has invalid attributes or is not fully specified, and no longer need to validate in #prefix. Technically we don't need to validate in #brew either, but we continue to do so anyway as a safety measure, and because we cannot enforce calls to super in subclasses.