aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/options.rb
AgeCommit message (Collapse)Author
2014-11-15Ensure that equals options get parsed properlyElliot Saba
Options such as --userimg=<path> should be parsed as an option with an equals in its name ("userimg=") and without the path argument in Option.name Closes #34219. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-10-19Add deprecated_option to software_spec.Mike McQuaid
Allows remapping one option name to another and updates build options and flags accordingly.
2014-10-19Add DeprecatedOption class.Mike McQuaid
Used to capture options that are being renamed.
2014-08-29Collapse iteration to a mapJack Nagel
2014-08-29Options internals no longer need to support switchesJack Nagel
2014-08-29Move handling of leading dashes to Options.createJack Nagel
2014-08-27Remove to_str from OptionJack Nagel
We no longer need implicit conversion of options to strings.
2014-08-20Options no longer needs deep-copy semanticsJack Nagel
Follow-up to 23d90a6a187a57fbdf4eeac146993e3b37c3d4d9.
2014-08-13Avoid hardcoding the class nameJack Nagel
2014-08-13Remove Options#concatJack Nagel
2014-08-13Replace Options.coerce with an alternate constructorJack Nagel
2014-08-13Remove unused branches from Options.coerceJack Nagel
2014-08-13Revert "Remove unused branches from Options.coerce"Mike McQuaid
This reverts commit cee42c339e7632eab15111e2c4e6c121ace6f9e2.
2014-08-13Revert "Replace Options.coerce with an alternate constructor"Mike McQuaid
This reverts commit 8d2ef974a3a87bf4207f71ccb8a7b4776e16a016.
2014-08-12Replace Options.coerce with an alternate constructorJack Nagel
2014-08-12Remove unused branches from Options.coerceJack Nagel
2014-08-07Default to the empty string instead of nilJack Nagel
2014-07-07Merge instead of calling << in a loopJack Nagel
2014-07-03Option does not need to be ComparableJack Nagel
2014-07-01Use to_a definition from EnumerableJack Nagel
2014-07-01Always use class.name to build inspect stringsJack Nagel
2014-06-09Fix warning under Ruby 2.2Jack Nagel
2014-02-27Add set union to OptionsJack Nagel
2013-08-22Add an accessor to make the intent more clear hereJack Nagel
2013-08-22Options: ensure copies do not share the underlying collectionJack Nagel
2013-06-27Fix some #eql? correctness issuesJack Nagel
The implementation of #eql? and #hash should ensure that if a.eql?(b), then a.hash == b.hash, but #eql? itself should not *depend* on #hash. For example, given class Thingy def eql? instance_of?(other.class) && hash == other.hash end def hash [name, *tags].hash end end if #hash produces a collision for different values of [name, *tags], two Thingy objects will appear to be eql?, even though this is not the case. Instead, #eql? should depend on the equality of name and tags directly.
2013-06-22Use OkJson directlyJack Nagel
2013-06-07Simplify Options#inspectJack Nagel
2013-05-24Define inspect on Option and OptionsJack Nagel
2013-05-06Avoid extra array allocationsJack Nagel
2013-02-17Don't shadow outer local variableJack Nagel
2013-01-30Fix passing multiple switches as a single word to the buildJack Nagel
Fixes #17434.
2013-01-26FormulaInstaller: construct new ARGV from an Options collectionJack Nagel
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
2013-01-26Refactor option handling internalsJack Nagel
Currently we handle options in several ways, and it is hard to remember what code needs an option string ("--foo"), what needs only the name ("foo") and what needs an Option object. Now that Option objects can act as strings and be converted to JSON, we can start using them instead of passing around strings between Formula objects, Tab objects, and ARGV-style arrays. The Options class is a special collection that can be queried for the inclusion of options in any form: '--foo', 'foo', or Option.new("foo").