32 Commits

Author SHA1 Message Date
Jack Nagel
dd3d8a9060 Use better assertions 2014-12-01 11:22:58 -05:00
Mike McQuaid
d0240e7cd4 formula: add spec deprecated_option DSL. 2014-10-19 13:58:52 +01:00
Mike McQuaid
02e10beb7c Add deprecated_option to software_spec.
Allows remapping one option name to another and updates build options
and flags accordingly.
2014-10-19 13:58:52 +01:00
Jack Nagel
f3b7c3236b Consistently call name on formula instead of relying on to_s 2014-09-14 11:19:30 -05:00
Jack Nagel
0c51cf1245 Use predefined options for universal, cxx11, and 32-bit options
:universal and :cxx11 are now handled directly, so we don't need to
always convert symbols to strings in this method. Symbols should be
reserved for future use.
2014-08-07 10:45:32 -05:00
Jack Nagel
acc1c35f35 Raise ArgumentError for argument errors 2014-08-07 00:48:13 -05:00
Jack Nagel
20452f3edc Add more test coverage for option descriptions 2014-08-07 00:48:13 -05:00
Jack Nagel
fa88b9697c Add a test for cxx11 option special case 2014-08-07 00:03:32 -05:00
Jack Nagel
f4ae1c9e1b Hide the options data structure better 2014-07-31 19:59:09 -05:00
Jack Nagel
abdff27cd7 Make options available on the spec objects 2014-07-31 19:37:39 -05:00
Jack Nagel
bc937f56e7 Rename resource? to resource_defined? 2014-07-30 18:56:37 -05:00
Jack Nagel
74ae43c690 Use accessor method in test 2014-07-13 13:07:36 -05:00
Jack Nagel
89d74ec475 Move test helpers into Homebrew::TestCase 2014-06-18 20:32:51 -05:00
Jack Nagel
982e9239b8 Use a custom test class so we can avoid monkeypatching 2014-06-18 20:32:51 -05:00
Jack Nagel
f1601f6d8a Stop jumping through hoops to get at the collector object 2014-04-01 16:03:07 -05:00
Jack Nagel
45bdeadd94 Set bottle download strategy directly
We know what strategy we want, so going through DownloadStrategyDetector
is wasted work. Now we can remove those patterns from the detector and
have two fewer branches each time through.
2014-03-18 21:28:33 -05:00
Jack Nagel
bc6e4a1894 New patch implementation and DSL
This commit introduces a new patch implementation that supports
checksums and caching.

Patches are declared in blocks:

  patch do
    url ...
    sha1 ...
  end

A strip level of -p1 is assumed. It can be overridden using a symbol
argument:

  patch :p0 do
    url ...
    sha1 ...
  end

Patches can be declared in stable, devel, and head blocks. This form is
preferred over using conditionals.

  stable do
    # ...

    patch do
      url ...
      sha1 ...
    end
  end

Embedded (__END__) patches are declared like so:

  patch :DATA
  patch :p0, :DATA

Patches can also be embedded by passing a string. This makes it possible
to provide multiple embedded patches while making only some of them
conditional.

  patch :p0, "..."
2014-03-13 21:35:41 -05:00
Jack Nagel
7da459874f Make bottle implementation more generic 2014-03-10 14:56:02 -05:00
Jack Nagel
4928b4e02c Set owner ivar in SoftwareSpec 2014-02-27 14:50:22 -06:00
Misty De Meo
e2af1cbeeb Use BottleCollector in Bottle SoftwareSpec 2013-12-05 18:24:51 -08:00
Jack Nagel
1bab14418c Add test for 5c1ee9c1aeee00e512919f37d3fa66fcf637e070 2013-11-26 23:31:53 -06:00
Jack Nagel
567f3448c9 Set owner of resources to SoftwareSpec object 2013-09-23 21:39:33 -05:00
Jack Nagel
5511a8b3f5 Move dependencies to SoftwareSpec 2013-09-21 19:27:24 -05:00
Jack Nagel
a8d3aca169 Move options to SoftwareSpec 2013-09-21 19:27:24 -05:00
Jack Nagel
9c7a18bdcb Make spec-scoped resources override top-level resources 2013-09-17 21:29:53 -05:00
Jack Nagel
3793c05845 SoftwareSpec tests are now Resource tests 2013-09-17 21:29:50 -05:00
Jack Nagel
a31fcb554c Move SoftwareSpec to a separate file 2013-09-14 10:16:52 -05:00
Jack Nagel
f6536e9c8b Reject versions that aren't strings 2013-06-28 21:18:04 -05:00
Jack Nagel
033ef09518 Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891.
2013-06-28 21:17:23 -05:00
Jack Nagel
41af459205 Require hardware where it is needed 2013-06-01 19:38:48 -05:00
Jack Nagel
e5eaa6696c Remove obsolete tests
This behavior is now tested at more appropriate levels in
test_software_spec, test_formula_spec_selection, and
test_formula_validation.
2013-04-13 18:23:06 -05:00
Jack Nagel
a90259b690 Tests for SoftwareSpec and subclasses 2013-04-08 00:55:44 -05:00