Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support '+' as prefix for integer #243

Merged
merged 2 commits into from Sep 9, 2019
Merged

Support '+' as prefix for integer #243

merged 2 commits into from Sep 9, 2019

Conversation

jylitalo
Copy link
Contributor

Right now, if I have define

        opts.integer '--modify-capacity',
                     'Modify the desired ECS cluster size (defaults to zero, which means no change)',
                     default: 0

and call it with command --modify-capacity +50, slop doesn't recognise it as 50, but instead uses 0, which is default value. Simple change into regular expression should solve this issue (unless it breaks some other functionality in slop).

@leejarvis
Copy link
Owner

Thanks @jylitalo -- please could you add a test for this change?

@leejarvis leejarvis merged commit 494c184 into leejarvis:master Sep 9, 2019
@leejarvis
Copy link
Owner

Thanks for your contribution @jylitalo!

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 23, 2020
Update ruby-slop to 4.8.0.


v4.8.0 (2020-01-17)
-------------------

Features:
  * Add support for prefixing integer values with `+` character
  [#243](leejarvis/slop#243) (Juha Ylitalo)
  * Add support for parsing floats with scientific notation
  [#250](leejarvis/slop#250) (Hansuk Hong)

Maintenance:
  * Add 2.7.0 to CI and fix warnings
  [#248](leejarvis/slop#248) (Juha Ylitalo, Andrew Kane)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants