45 Commits

Author SHA1 Message Date
Jack Nagel
41a9ba8259 Move Formula.class_s to Formulary 2014-02-21 00:46:03 -05:00
Christian Moritz
3651c0cb58 create: fix typos
Closes Homebrew/homebrew#25709.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-01-07 12:10:11 +00:00
Mike McQuaid
cb0b6a0fa3 create: always use double quotes. 2014-01-07 08:11:02 +00:00
Josh Tilles
410121d8ed Replace template’s j1 with deparallelize
Solely because I think `ENV.deparallelize` is *way* clearer than
`ENV.j1`, at least to the uninitiated.

Also, updating the template will reduce the number of `ENV.j1`s that
persist because the Homebrew maintainers want clean histories of
formulae. Ideally, this change should prevent any more cases from being
introduced!

Closes Homebrew/homebrew#25431.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-12-27 16:58:55 -06:00
Mike McQuaid
4c2e7b1659 Update docs, comment mxcl/homebrew refs. 2013-12-14 18:18:35 +00:00
Mike McQuaid
d9d2443d5d Cleanup use of some global constants. 2013-10-30 13:20:48 -07:00
Jack Nagel
91dfb60805 create: escape example interpolation
Fixes Homebrew/homebrew#23643.
2013-10-26 18:30:39 -05:00
Adam Vandenberg
6857e2ed34 add note about test path to create template 2013-10-26 15:39:39 -07:00
Mike McQuaid
90a630dcad create: detect name from GitHub archives. 2013-10-25 21:12:29 +01:00
Jack Nagel
c464c7549f Clean up SoftwareSpec and Resource initializers 2013-09-23 21:39:33 -05:00
Jack Nagel
28cb9978ee create: use resource for checksum detection 2013-09-17 21:29:54 -05:00
Jack Nagel
7c0f474d26 Rephrase conditional 2013-09-16 16:12:25 -05:00
Xiyue Deng
45d5471a43 Enable verbose compile command in create template.
* Add "--disable-silent-rules" option to autotools-based configure
  options.
  - Also add comments to notify user removing unrecognized configure
    options.
* Add "-DCMAKE_VERBOSE_MAKEFILE=ON" to cmake-based configure options.
2013-09-06 17:59:58 -07:00
Samuel John
c4d7e21df5 brew create: Mention the example-formula 2013-08-20 15:44:12 +02:00
Ches Martin
7d30e4445e brew-create: don't break when given --set-version
Since 9f2782812cbaf2, specifying a version breaks with:

    Error: undefined method `detected_from_url?' for "1.2.2":String

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-03 10:11:11 -07:00
Jack Nagel
cf5c97bbcb Don't use 'obj == nil' 2013-06-26 18:47:00 -05:00
Adam Vandenberg
b1bc967f23 use separate args in brew create 2013-04-03 11:24:45 -07:00
Mike McQuaid
b1241bb3a1 brew create: use test DSL 2013-02-23 08:42:45 +00:00
Jack Nagel
f172d3a6eb 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
beff735d3f brew-create: don't insert autodetected versions. 2013-02-18 10:42:32 +00:00
Jack Nagel
9362a7c897 Respect BROWSER environment variable 2012-12-27 23:41:44 -06:00
Adam Vandenberg
4d7069ed6f create: allow --set-name and --set-version
Closes Homebrew/homebrew#10873.
Closes Homebrew/homebrew#14401.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-08-26 08:39:36 -07:00
Misty De Meo
ab80dfc5b7 create: Fix indentation for :x11 dep 2012-08-09 16:33:49 -05:00
Jack Nagel
c235395fd7 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
56fe164e95 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
b2ff74372e Refactor download strategy detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-07-04 22:47:34 -05:00
Jack Nagel
168ccb2821 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
73d047d3ac 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
01bcf58e6a create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Max Howell
b6a5b3f3a3 Assist more in the template from brew create 2012-03-01 13:25:10 +00:00
Max Howell
85e05b27dd Some additional aid for brew create 2012-02-29 02:03:26 +00:00
Jack Nagel
a743f8d862 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
66388b7a43 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
af457fb200 Correct cmake syntax in formula template
Closes Homebrew/homebrew#8879.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-11-29 14:20:38 -08:00
Max Howell
28aef26a47 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Max Howell
36596de68c 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
4e65175564 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
dafe97b047 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
035b216e90 brew create: remind people to 'brew audit' 2011-04-05 08:37:59 -07:00
Adam Vandenberg
bc3225a348 brew create: ensure CACHE folder exists 2011-04-05 08:31:05 -07:00
Max Howell
4abf493670 Remove unused exception; Closes Homebrew/homebrew#4652
If version cannot be determined, then instruct the user to add one.
2011-03-13 16:16:17 +00:00
Max Howell
e0639f1588 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
9ed51082c2 Use ruby style for inheritance. 2011-03-12 11:55:09 -08:00
Max Howell
719e6c8999 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
768910283a 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