18 Commits

Author SHA1 Message Date
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