6393 Commits

Author SHA1 Message Date
Jack Nagel
8039107afb Default to the empty string instead of nil 2014-08-07 00:48:13 -05:00
Jack Nagel
6718bc554f Spell out the empty string instead of calling to_s on nil 2014-08-07 00:48:13 -05:00
Jack Nagel
22d1f6516f Remove a defensive to_s call
This method is only used internally and we always pass strings.
2014-08-07 00:48:13 -05:00
Jack Nagel
dc9872eb83 Remove default argument
This method is called in two places, always with two arguments.
2014-08-07 00:48:13 -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
e34a497b3e Prefer interpolation 2014-08-07 00:11:14 -05:00
Jack Nagel
fa88b9697c Add a test for cxx11 option special case 2014-08-07 00:03:32 -05:00
Jack Nagel
9f6bd0798f Use opt_bin 2014-08-06 20:52:36 -05:00
Jack Nagel
1eecf1ac0b Don't use Hash#first
Fixes Homebrew/homebrew#31360.
2014-08-06 09:56:09 -05:00
Brandon Bennett
ed5eef82a8 cc: blacklist -fno-inline-functions-called-once.
Closes Homebrew/homebrew#31384.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-06 10:23:39 +01:00
Federico Bond
22a98624d2 utils: use the $stderr global variable.
For easier capturing.

Closes Homebrew/homebrew#31303.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-04 13:17:10 +01:00
Mike McQuaid
2559ee76b2 brew-test-bot: fix upload type bug. 2014-08-04 12:23:08 +01:00
Maurus Cuelenaere
e311583fe4 brew-test-bot: support taps.
Closes Homebrew/homebrew#30540.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-04 09:34:17 +01:00
Jack Nagel
f1cf62a4b5 Add predicate methods to Tab to match BuildOptions 2014-08-03 18:17:49 -05:00
Jack Nagel
cf3c12dd5b Add inspect to CxxStdlib 2014-08-03 15:28:51 -05:00
Jack Nagel
9aac71045c Add inspect to CompilerFailure 2014-08-03 15:28:51 -05:00
Jack Nagel
5a2ae61e66 Add another TODO 2014-08-03 15:28:51 -05:00
Jack Nagel
eb528fd7cd Eliminate a nil check 2014-08-03 13:14:50 -05:00
Jack Nagel
d54bce6a1a Remove dead code 2014-08-03 13:13:23 -05:00
Jack Nagel
b6e9600b9f Eliminate consideration of major_version
The major version is implicit in the compiler name. Since the name is
used when matching failures to compilers, we don't need to consider the
major version separately.
2014-08-03 11:15:39 -05:00
Jack Nagel
4580d86809 Use a separate class for GNU compiler failures
major_version is now only used internally by the failure object
2014-08-03 10:47:47 -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
2fedd5b09a Don't pass nil to fails_with? 2014-08-03 10:47:47 -05:00
Jack Nagel
fded4d0385 Remove an is_a check 2014-08-03 10:47:47 -05:00
Jack Nagel
5b38e89107 Simplify compatibility logic 2014-08-02 20:11:04 -05:00
Jack Nagel
fccfddb510 Partially revert e1f97e2 to pass new test cases 2014-08-02 20:03:42 -05:00
Jack Nagel
018aeb05ab Drop unnecessary parens 2014-08-02 19:43:13 -05:00
Jack Nagel
142beddd7a Use polymorphism to simplify stdlib compatibility check 2014-08-02 19:29:59 -05:00
Jack Nagel
90e370d2ef type is guaranteed to be a symbol by the factory method 2014-08-02 19:29:58 -05:00
Jack Nagel
cdf1a7b41c CxxStdlib should be immutable so remove writer methods 2014-08-02 19:29:58 -05:00
Jack Nagel
ffc5687fc2 Eagerly create and reuse cxx11 compiler failure objects 2014-08-01 20:15:58 -05:00
Jack Nagel
525e5f791f Remove knowledge of DSL implementation from initialize 2014-08-01 20:15:57 -05:00
Mike McQuaid
426737eb9e outdated: allow passing formulae as arguments.
If formulae names are passed as arguments check if just they are outdated. Additionally, return a failed code if they are outdated.

This will hopefully be able to stop people complaining about the outdated error code as they can now just run e.g.:
`brew outdated git && brew upgrade git`

Closes Homebrew/homebrew#31242.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-01 17:46:05 +02:00
Adam Vandenberg
c043a93bdf show cmd being executed 2014-08-01 07:58:09 -07:00
Adam Vandenberg
c003e805be add helpers for formula tests 2014-08-01 07:58:09 -07: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
fad2e26395 Reduce direct accesses of the args collection 2014-07-31 16:36:54 -05:00
Jack Nagel
b160cc9bb6 Handle tap file renames that remove a file from the formula directory 2014-07-31 15:58:03 -05:00
Jack Nagel
5a94cfc4a3 Use a module since the @build ivar is going away soon 2014-07-30 22:24:24 -05:00
Jack Nagel
fd86e6d636 Remove confusing implicit options handling
This code is supposed to allow

  depends_on "foo" => "with-bar"

to work when foo has only a "without-bar" option.

The options system was not designed to support this. Unfortunately, it
was bolted on anyway. The implementation is extremely difficult to
understand, and it only works for certain types of options, which is
confusing from a user's point of view. Luckily, no formulae in core or
the official taps rely on the behavior in order to function.

It is hindering progress in improving this code, so I am removing it.
2014-07-30 21:46:22 -05:00
Jack Nagel
5ccce044ca Use the tab in place of build during tests 2014-07-30 21:04:17 -05:00
Jack Nagel
331737ab25 Add without? to Tab 2014-07-30 21:04:17 -05:00
Jack Nagel
393e10849b Pass the build object into the Tab
Since the Tab is written in the build process, the formula's build
object will have the correct args attached to it already, so we don't
need to reconstruct it.
2014-07-30 20:27:46 -05:00
Jack Nagel
dd331245ab Remove unused accessor 2014-07-30 20:19:43 -05:00
Jack Nagel
0a605cbf8b Simplify BuildOptions copy tests 2014-07-30 20:15:18 -05:00
Jack Nagel
bc937f56e7 Rename resource? to resource_defined? 2014-07-30 18:56:37 -05:00
Jack Nagel
3451c2d67f Handle nonexistent files when constructing ConflictError
Closes Homebrew/homebrew#31051.
2014-07-30 16:29:10 -05:00