Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add config option underscore_flagslbriais-feature/add_config_for_underscore_switch | Laurent B | 2017-05-01 | 1 | -0/+4 |
| | | | | | | | | | | | | | | The default behaviour of translation flags-with-dashes is to underscore them so they're symbol friendly. This config option allows us to avoid this translation and simply return the flags verbatim: opts = Slop.parse(underscore_flags: false) do |o| o.on "--foo-bar" end opts.to_hash #=> { :"foo-bar" => true } closes #204 | ||||
* | Fix ridiculous minitest warning | Lee Jarvis | 2017-04-29 | 2 | -3/+3 |
| | | | | wat? | ||||
* | Avoid deleting args after '--' | Lee Jarvis | 2017-04-29 | 1 | -1/+2 |
| | | | | | | | | Everything after -- is sacred and shouldn't be mutated. So lets just remove it all straight away and add it to our arguments list after we're done parsing Closes #194 | ||||
* | Fix support for parsing -x5 | Lee Jarvis | 2017-01-29 | 1 | -0/+13 |
| | | | | | | | Thanks to @RickHull for the "smashing" terminology and various conversations Fixes #199 | ||||
* | Handle bad constant names in Slop.option_defined? | Lee Jarvis | 2016-08-21 | 1 | -0/+17 |
| | | | | Closes #198 | ||||
* | Support arguments to options with leading - | Andrew Clemons | 2016-04-04 | 1 | -0/+21 |
| | | | | | | | | This allows negative values as arguments to numeric options and strings starting with - for any other type. Fixes #170 Fixes #179 | ||||
* | Can specify a custom banner string in Options via config | Phil Rees | 2016-03-18 | 1 | -1/+12 |
| | |||||
* | Allow disabling the delimiter for array arguments | Mike Pastore | 2016-02-18 | 1 | -0/+6 |
| | |||||
* | Fix bug where true is passed to BoolOption block regardless of --no- prefix | Ben Brady | 2015-11-24 | 1 | -1/+7 |
| | |||||
* | Fix bug regarding --foo=bar style options | Naoki Mizuno | 2015-09-08 | 1 | -0/+5 |
| | | | | | | | | | | This fixes the bug introduced in ebe678b1639654604b3e54b08ca710c38682b83e where the argument after a flag is naively deleted. For example, with --foo=bar baz , both `--foo=bar' and `baz' are deleted when only `--foo=bar' should be deleted. | ||||
* | Fix arguments removed with option arguments | Naoki Mizuno | 2015-09-08 | 1 | -0/+5 |
| | | | | See #181. | ||||
* | #163 only raise MissingArgument if not default_value | Ben Brady | 2015-06-30 | 1 | -0/+3 |
| | |||||
* | Better handling of option names with multiple words | Tim Rogers | 2015-06-13 | 2 | -6/+18 |
| | |||||
* | Support --no- prefix for inverting boolean options | Lee Jarvis | 2015-05-21 | 1 | -4/+9 |
| | | | | closes #168 | ||||
* | Added support for Regexp | Laurent Arnoud | 2015-05-17 | 1 | -0/+13 |
| | | | | | Used to work on 3.6 See https://github.com/leejarvis/slop/commit/e2775e27d866ba85f6b6bf50536135ee4e93c93e | ||||
* | Rewrite UnknownOption.getUnknownOption() to flag | sigurdsvela | 2015-04-07 | 1 | -1/+1 |
| | | | | | | Rewrite the UnknownOption.getUnknownOption() to use attr_reader :flags. And rename the initialize parameter unknownOption to flag. | ||||
* | Rewrite MissingOption.getFlags() to flags | sigurdsvela | 2015-04-07 | 1 | -1/+1 |
| | | | | | | Removes the MissingOption.getFlags() function and replaces it with attr_reader :flags | ||||
* | Implement getFlags in MissingArgument | sigurdsvela | 2015-04-06 | 1 | -0/+7 |
| | | | | | | A function in MissingArgument that returns and array of all the flags that matches the option missing an argument | ||||
* | Remove semi-colons to conform to the code style | sigurdsvela | 2015-04-06 | 1 | -1/+1 |
| | |||||
* | Fix typo in comment | sigurdsvela | 2015-04-06 | 1 | -1/+1 |
| | |||||
* | Implement getUnknownMessage in UnknownOption | sigurdsvela | 2015-04-06 | 1 | -0/+7 |
| | | | | | | | This allows to retrive the unknown option in question when catching the error. This can be useful to, for example, taylor a spesific output for common errors amongst users. | ||||
* | Add explicit value setter to Result class | Lee Jarvis | 2015-02-04 | 1 | -0/+14 |
| | | | | closes #162 | ||||
* | Remove "--" from the unprocessed arguments | David RodrÃguez | 2015-01-11 | 1 | -0/+5 |
| | | | | | The double dash is a valid (special) option for Slop, so like the rest of the options successfully processed, should be removed. | ||||
* | Support `tail: true` config option | Lee Jarvis | 2015-01-02 | 1 | -0/+6 |
| | |||||
* | Reset parser every time parse is called | Lee Jarvis | 2014-12-30 | 3 | -14/+14 |
| | |||||
* | Support a limit config to ArrayOption | Lee Jarvis | 2014-12-30 | 1 | -0/+6 |
| | |||||
* | add Float support | Rick Hull | 2014-12-29 | 1 | -0/+18 |
| | | | | | | - in lib/ - in test/ - in README | ||||
* | Add result/parser `arguments` method | Lee Jarvis | 2014-12-19 | 1 | -0/+6 |
| | |||||
* | Add NullOption and default to using it | Lee Jarvis | 2014-12-17 | 2 | -13/+28 |
| | | | | | | | | | | | | | | | | | | | | | | | | | A NullOption is one whos return value we don't care about. For example, you might just want a `--version` option which simply prints the version and exits. In this case, having a `true` value in `to_hash` is really just noise. We probably don't care about it, using NullOption discards it. I think using this for Options#on makes sense because this is logical: opts.on '--version' do puts VERSION exit end Rather than: opts.add '--version' do puts VERSION exit end And defaulting to a StringOption. This also means you have to be explicit about adding such an option, which is a good thing. | ||||
* | Default array values to [] | Lee Jarvis | 2014-11-19 | 1 | -0/+4 |
| | |||||
* | Ensure booleans default to false | Lee Jarvis | 2014-11-19 | 1 | -0/+5 |
| | |||||
* | Handle UnknownOption exceptions | Lee Jarvis | 2014-11-19 | 1 | -0/+14 |
| | |||||
* | Add MissingArgument error processing, and suppressing | Lee Jarvis | 2014-11-19 | 1 | -0/+17 |
| | |||||
* | Handle short grouped flags | Lee Jarvis | 2014-11-19 | 1 | -1/+12 |
| | |||||
* | Support flag=arg | Lee Jarvis | 2014-11-19 | 1 | -0/+19 |
| | |||||
* | Yield option arguments to option blocks | Lee Jarvis | 2014-11-19 | 1 | -0/+7 |
| | |||||
* | Allow options to be hidden from help string | Lee Jarvis | 2014-11-19 | 1 | -0/+5 |
| | |||||
* | Support method_missing checks for used options | Lee Jarvis | 2014-11-19 | 1 | -0/+7 |
| | |||||
* | Add custom "finish" method for options | Lee Jarvis | 2014-11-19 | 1 | -0/+17 |
| | |||||
* | Handle default values | Lee Jarvis | 2014-11-19 | 1 | -0/+6 |
| | |||||
* | Add more option types | Lee Jarvis | 2014-11-19 | 1 | -0/+54 |
| | |||||
* | Store executed count on options | Lee Jarvis | 2014-11-19 | 1 | -0/+7 |
| | |||||
* | Ignore everything after -- and reset the parser | Lee Jarvis | 2014-11-19 | 1 | -0/+5 |
| | |||||
* | Expose used/unused options in parser | Lee Jarvis | 2014-11-19 | 1 | -0/+24 |
| | |||||
* | Add public "get" methods to Result | Lee Jarvis | 2014-11-19 | 1 | -4/+27 |
| | | | | With a light sprinkle of documentation | ||||
* | Add Result#to_hash | Lee Jarvis | 2014-11-19 | 2 | -0/+28 |
| | |||||
* | Add Options#to_s help string | Lee Jarvis | 2014-11-19 | 2 | -0/+32 |
| | |||||
* | Start of rewrite | Lee Jarvis | 2014-11-18 | 6 | -260/+62 |
| | |||||
* | Added Command#process | Lee Jarvis | 2013-08-29 | 1 | -0/+12 |
| | |||||
* | Beginning of Slop 4.0 rewrite | Lee Jarvis | 2013-08-29 | 3 | -569/+179 |
| |