425 Commits

Author SHA1 Message Date
Jack Nagel
568c878b0a Print loader class name in debug mode 2014-03-07 17:33:02 -06:00
Jack Nagel
d476a84f4f FormulaLoader: pull shared behavior into superclass 2014-03-07 17:30:39 -06:00
Jack Nagel
bb95660a4d Use File.expand_path 2014-02-28 16:27:25 -06:00
Jack Nagel
3872f78d66 Add custom exception for untapped formulae 2014-02-28 15:58:20 -06:00
Jack Nagel
751d997202 Use constant 2014-02-28 15:58:20 -06:00
Jack Nagel
d31bee2e5b Avoid ancestors.include?, klass1 < klass2 is faster 2014-02-21 00:46:03 -05:00
Jack Nagel
da87bdc2e5 Cache generated class names 2014-02-21 00:46:03 -05:00
Jack Nagel
41a9ba8259 Move Formula.class_s to Formulary 2014-02-21 00:46:03 -05:00
Jack Nagel
3aa06a701d Consistently pass path into Formula constructor 2014-02-20 13:31:37 -05:00
Jack Nagel
abbed076f0 Pass path into the Formula constructor
When the path argument to the Formula constructor is omitted, the
instance's path attribute is created using the Formula.path class
method. However, we have already done this work, so we can just pass it
into the constructor.

This translates to one less call to Pathname#to_s per formula, or about
2600 calls when running `brew readall`.
2014-02-19 16:53:18 -05:00
Jack Nagel
1f39d6c2d1 Eliminate some Pathname -> String -> Pathname conversions 2014-02-19 16:53:18 -05:00
Jack Nagel
7591b79d7d Push expand_path call down into FromPathLoader 2014-02-19 16:53:18 -05:00
Jack Nagel
a933b58507 versions: restore original constant
Before:

  f1 = Formula.factory('tree')
  f1.versions
  f2 = Formula.factory('tree')
  f1.class == f2.class # => false

After:

  f1 = Formula.factory('tree')
  f1.versions
  f2 = Formula.factory('tree')
  f1.class == f2.class # => true
2013-12-09 21:13:45 -06:00
Jack Nagel
1fb9f85c5f Simplify setup for local bottle installation
Closes Homebrew/homebrew#22833.
2013-09-26 10:04:45 -05:00
Camillo Lugaresi
6a8387ad4a better debugging of failed formula loading
Closes Homebrew/homebrew#21680.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-05 14:03:20 -07:00
Mike McQuaid
5104fd21a5 bottles: update version regex messaging. 2013-08-04 08:25:51 -07:00
Mike McQuaid
4f2725cde3 Move getting formula names from bottles to method. 2013-07-18 09:56:55 -07:00
Mike McQuaid
9d12b917ec Formulary: fix incorrect bottle variable usage. 2013-07-04 11:20:59 +01:00
Adam Vandenberg
5db5740cc2 allow installation of formulae from the current folder
Closes Homebrew/homebrew#19177.
2013-07-02 09:23:48 -07:00
Adam Vandenberg
1c1b7ed683 Fix appending .rb to local formulae names
Closes Homebrew/homebrew#20926.
2013-06-30 14:36:12 -07:00
Adam Vandenberg
b40615d66a Catch another name error
Closes Homebrew/homebrew#20920.
2013-06-30 10:26:12 -07:00
Adam Vandenberg
8e944d5728 Add 'unload' 2013-06-29 16:44:45 -07:00
Adam Vandenberg
5c27f0ccb9 Formulary.factory always expects a string 2013-06-29 16:44:45 -07:00
Adam Vandenberg
c2a5e3608c Use Formula Loaders 2013-06-29 16:44:45 -07:00
Adam Vandenberg
099a62c95b Move Formula.factory into new Formulary module 2013-06-29 16:44:44 -07:00