1111 Commits

Author SHA1 Message Date
Mike McQuaid
645e82df83 Remove {start,stop}doc as we're using Yard now. 2014-12-06 09:14:20 +00:00
Jack Nagel
3b1a1962f7 Remove outdated comment 2014-11-06 17:55:04 -06:00
Jack Nagel
1a487fa2b3 Add predicate methods for specs and stop testing internals 2014-10-29 23:32:38 -05:00
Mike McQuaid
356e75487e Point to a tap when installing or fetching.
When installing or fetching and stuff goes wrong we can't always catch
the error and redirect to the tap. Instead, point to the tap before we
do anything failure-prone and hopefully that'll encourage people to
file issues in the right place. If not we can say that explicitly.

Closes Homebrew/homebrew#33220.
2014-10-21 23:04:55 +01:00
Mike McQuaid
d0240e7cd4 formula: add spec deprecated_option DSL. 2014-10-19 13:58:52 +01:00
Jack Nagel
2349a0ea36 Provide a method to access test fixtures
Formulae should not require knowledge of Homebrew's internal directory
structure, and we should be able to alter it without modifying
individual formulae.
2014-10-19 01:18:26 -05:00
Jack Nagel
b3ed5a367d Remove redundant comments 2014-10-10 20:30:29 -05:00
Mike McQuaid
05739585d1 Generate RDoc documentation.
This is currently still very messy and we probably want to work out the
best way to declare what parts of our DSL/what files are "public".

Still, even if this is a WIP I'd rather get something committed sooner
rather than later and start iterating on this as a replacement for
`example_formula.rb` and the formula cookbook.

To test:
```bash
cd $(brew --prefix)/Library/Homebrew && \
  rdoc formula.rb requirement.rb utils.rb &&\
  open doc/index.html
```

Closes Homebrew/homebrew#32470.
2014-09-24 15:08:10 -07:00
Jack Nagel
ae88549797 Remove fails_with? from the formula instance 2014-09-18 15:50:54 -05:00
Jack Nagel
79a6e59e6e Implement brew test --debug 2014-09-18 14:16:07 -05:00
Jack Nagel
1abcb0b348 Remove workaround for old debugger 2014-09-18 14:16:07 -05:00
Jack Nagel
a607c71123 Pass the ENV hash into the BuildError constructor 2014-09-13 19:47:30 -05:00
Jack Nagel
691f962b0d Fix file descriptor leak in Formula#system 2014-09-07 20:41:18 -05:00
Jack Nagel
d0ecd08c90 Avoid intermediate array 2014-09-07 14:07:06 -05:00
Jack Nagel
23c73e2147 Remove unnecessary closed? guard
The debugger can't jump back to this point, so we don't have to worry
about this code executing twice.
2014-09-05 16:56:07 -05:00
Jack Nagel
fd0ba6904f Less code in begin block 2014-09-05 15:36:08 -05:00
Jack Nagel
638363ac8b Ensure log file is closed 2014-09-05 15:23:00 -05:00
Jack Nagel
7c47060702 Flush log stream before exec 2014-09-05 15:13:53 -05:00
Jack Nagel
b9c796999b Cache result of ARGV.verbose? on the stack 2014-09-05 15:13:53 -05:00
Jack Nagel
a3409a179e Reduce branches and effective scope of some variables 2014-09-05 15:13:53 -05:00
Jack Nagel
34ea00783c Skip allocating a pipe entirely in non-verbose mode 2014-09-05 15:13:52 -05:00
Jack Nagel
a211b61441 Don't pass the read end of the pipe to exec_cmd 2014-09-05 15:13:52 -05:00
Jack Nagel
2efe4cc3b5 Log directly to the log file in non-verbose mode 2014-09-05 15:13:52 -05:00
Jack Nagel
effddda4f9 Promote log stream to a local 2014-09-05 15:13:52 -05:00
Jack Nagel
479ad0265b Reduce effective scope of pipe variables 2014-09-05 15:13:52 -05:00
Jack Nagel
659896fda2 Extract body of child process to a method 2014-09-05 15:13:52 -05:00
Jack Nagel
bbf79f5d85 Make logging cheaper in the non-verbose case 2014-09-05 01:22:01 -05:00
Jack Nagel
03abf83472 Add timestamp and argument list to log files 2014-09-05 00:36:39 -05:00
Misty De Meo
4743fc1662 Add Go language module, resources
This introduces a new GoResource category of resource. GoResources
have a specialized stage method which allows a resource to stage
itself into a gopath.

The new Go language module provides a one-liner to stage all
GoResources present in the formula.
2014-09-01 19:56:43 -07:00
Jack Nagel
d18c016a27 Use cp because install warns on empty arrays 2014-08-29 22:51:10 -05:00
Jack Nagel
1ec1d36301 Copy config.log even if the build succeeds 2014-08-29 22:35:41 -05:00
Jack Nagel
023f02b90a Make fails_with available in spec blocks
Closes Homebrew/homebrew#31706.
2014-08-19 17:14:02 -05:00
Jack Nagel
92eb96aca0 Use the build accessor rather than metaprogramming 2014-08-16 23:04:48 -05:00
Jack Nagel
281646b089 Define the test_defined? method dynamically 2014-08-16 17:44:22 -05:00
Jack Nagel
c0ef3d1541 Use the keg_only_reason instance method in keg_only? 2014-08-16 15:41:14 -05:00
Jack Nagel
95aef55110 Simplify cxxstdlib_check implementation
The cxxstdlib_check method currently only supports one value, so we can
just define the accompanying instance method when necessary. If we ever
add more options we can back it with a data structure.
2014-08-16 02:16:05 -05:00
Jack Nagel
e6498f4dfc Remove the universal accessor from BuildOptions
BuildOptions is now immutable (finally).
2014-08-16 01:39:33 -05:00
Jack Nagel
c7444d34f7 Use the as_flags method instead of map 2014-08-14 01:00:23 -05:00
Jack Nagel
0b468c528c Allow build to be set externally 2014-08-11 17:48:30 -05:00
Jack Nagel
045a02aa74 Use public api when adding legacy options 2014-08-10 23:17:53 -05:00
Jack Nagel
2f1d40a764 Disconnect defined options from the build object 2014-08-10 21:45:24 -05:00
Jack Nagel
8fc4bba03a Remove user-defined options method after evaluation
Now we can use the superclass options method for our own purposes.
2014-08-10 21:45:23 -05:00
Jack Nagel
d122ae8eea Handle legacy options in the method_added hook
We only need to process the legacy options at load time, not each time
the class is instantiated, and only when there is an options method
defined.
2014-08-10 21:45:23 -05:00
Jack Nagel
dfe1de7acd Delegate homepage to the class instead of storing it on the instance 2014-08-08 10:53:00 -05:00
Jack Nagel
392407c5f1 Default description to the empty string in top-level option DSL 2014-08-08 01:34:45 -05:00
Jack Nagel
af804f7475 Remove another unnecessary default argument 2014-08-08 01:34:45 -05:00
Jack Nagel
efd63447d8 Move management of options collection to the spec object 2014-08-07 10:45:32 -05:00
Jack Nagel
8e8b9acc01 Move compiler failure matching logic into failure object 2014-08-03 10:47:47 -05:00
Jack Nagel
e5d6247ae7 Rename compiler attribute to name 2014-08-03 10:47:47 -05:00
Jack Nagel
fded4d0385 Remove an is_a check 2014-08-03 10:47:47 -05:00