Commit Graph
29 Commits
Author SHA1 Message Date
Adam Vandenberg 3730c0636f use separate args in brew create 2013-04-03 11:24:45 -07:00
Mike McQuaid 9e49a9a8ba brew create: use test DSL 2013-02-23 08:42:45 +00:00
Jack Nagel 5a34e80675 Don't use deprecated form of attr
The form "attr :name, true" is deprecated and causes Ruby to emit a
warning in verbose mode. Using attr_{reader,writer,accessor} is more
clear anyway, so do so.
2013-02-18 12:13:34 -06:00
Mike McQuaid 9f2782812c brew-create: don't insert autodetected versions. 2013-02-18 10:42:32 +00:00
Jack Nagel 82a2fdcd33 Respect BROWSER environment variable 2012-12-27 23:41:44 -06:00
Adam Vandenberg d0656a938b create: allow --set-name and --set-version
Closes #10873.
Closes #14401.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-08-26 08:39:36 -07:00
Misty De Meo 69e2e7c7e5 create: Fix indentation for :x11 dep 2012-08-09 16:33:49 -05:00
Jack Nagel 886f64a53c Give SoftwareSpec an initializer
Tools like `brew create` need to create and manipulate SoftwareSpec
objects. It is useful to be able to do this directly, rather than by
proxy through the special methods that serve the main formula DSL.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel f6a67ea017 Teach download strategies to take a SoftwareSpec
Now that a URL, version, and the (for lack of a better term) "specs"
associated with said URL (e.g. the VCS revision, or a download strategy
hint) are neatly bundled up in a SoftwareSpec object, it doesn't make
sense to pass them individually to download strategy constructors. These
constructors now take only the formula name and a SoftwareSpec as
parameters.

This allows us to move mirror handling out out of Formula#fetch and into
the download strategies themselves. While doing so, we adjust the mirror
implementation a bit; mirrors now assume the same "specs" as their
owner's URL. They are still only useable by the CurlDownloadStrategy,
but this provides a basis for extending mirror support to other
strategies.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:35 -05:00
Jack Nagel 078cfc5158 Refactor download strategy detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel d68131523b Update formula template for new X11 dependency
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-01 14:32:28 -05:00
Adam Vandenberg ff96f4cd9f Use sha1 as the default checksum for new formulae
See: https://github.com/mxcl/homebrew/pull/12587
2012-06-06 07:04:51 -07:00
Jack Nagel 88ccd16ce5 create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Max Howell 57c8539ee2 Assist more in the template from brew create 2012-03-01 13:25:10 +00:00
Max Howell f78970f6b9 Some additional aid for brew create 2012-02-29 02:03:26 +00:00
Jack Nagel 173719ed07 create: homepage comes before url and checksum
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-06 17:19:54 -06:00
Jack Nagel dde7901b94 create: punt on bad URLs
When we can't detect a name from the URL, just ask the user.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-31 17:57:20 -06:00
Misty De Meo 8a980d509b Correct cmake syntax in formula template
Closes #8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Max Howell 6ad9225ab7 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Max Howell 46c38bf6dd Force contributors to define a test by adding it to the create template
A little cheeky but it should help us to maintain higher quality.
2011-08-25 00:53:37 +01:00
Jack Nagel d3d8a916cf Fix misspelled method name: Formula.canonical_name
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-05-07 21:50:37 -07:00
Martin Kühl 413cd1e1d3 Fix formula paths for manually specified names.
When the name of a new formula can't be autodetected, it defaults to the empty
string. When it then gets read from user input later on, the new name is used
but the formula path, based on the name, stays empty.

This change sets the path after a new name was read.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-04-09 09:43:48 -07:00
Adam Vandenberg 7e7d6edb31 brew create: remind people to 'brew audit' 2011-04-05 08:37:59 -07:00
Adam Vandenberg 1f6f0ee7f3 brew create: ensure CACHE folder exists 2011-04-05 08:31:05 -07:00
Max Howell c281011e5b Remove unused exception; Closes #4652
If version cannot be determined, then instruct the user to add one.
2011-03-13 16:16:17 +00:00
Max Howell 6530586046 Replace create --cache with create --no-fetch
Because since 0.8 we do the opposite, ie. download by default.
2011-03-13 12:52:41 +00:00
Adam Vandenberg 0476235ce0 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Max Howell c051e2d91a Refactor the blacklists
Also don't abort searches if the query matches a blacklist. Eg.
`brew search vim` should return macvim and the information that vim itself is
not packaged.
2011-03-12 11:55:02 -08:00
Max Howell 9afc85ad33 Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00