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

don't return the command name in list of arguments #12

Merged

Conversation

armcknight
Copy link
Contributor

This makes the behavior line up with description in the README

  • Make new property on Args to get the command name
  • Also fixes a typo, and makes some names better

@armcknight armcknight force-pushed the fix/remove-command-from-argument-list branch 4 times, most recently from 9bb0d42 to f4d1a41 Compare December 18, 2015 15:57
@armcknight
Copy link
Contributor Author

Hi, what is the status of this PR? I don't mind if you don't want to incorporate it for concern of breaking existing users. What do you think?

@nsomar
Copy link
Owner

nsomar commented Feb 11, 2016

Hello @armcknight, Sorry for not replying earlier I kind of miss setup the notifications. I will check this over the weekend :).
Thanks for the pr btw!

@@ -25,7 +25,8 @@ class ArgsTests: QuickSpec {
"no-ff": ""]

expect(Args.parsed.flags).to(equal(result))
expect(Args.parsed.parameters).to(equal(["Some custom one", "one", "two"]))
expect(Args.parsed.parameters).to(equal(["one", "two"]))
expect(Args.parsed.command).to(equal("Some custom one"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This expectation here is a little misleading, I think we should refactor this test.

we can set the process info above to be

ProcessInfo.internalProcessInfo = DummyProcessInfo("excutable_name", "-f", "file.rb", "--integer", "1", "Some custom one", "one", "two", "--no-ff")

and then edit this expectation to be

expect(Args.parsed.command).to(equal("excutable_name"))

@nsomar
Copy link
Owner

nsomar commented Feb 14, 2016

This looks super cool! I have added one note on the unit test.
Also can you please rebase to latest master?

@armcknight armcknight force-pushed the fix/remove-command-from-argument-list branch from f4d1a41 to 153e6b6 Compare February 15, 2016 12:52
- fix unit test mock and expectations in ArgsTests
@armcknight armcknight force-pushed the fix/remove-command-from-argument-list branch from 153e6b6 to 7955f11 Compare February 15, 2016 12:57
@armcknight
Copy link
Contributor Author

Hey @oarrabi , thanks for the comments, I updated all the things requested!

@nsomar
Copy link
Owner

nsomar commented Feb 15, 2016

This is awesome!

nsomar added a commit that referenced this pull request Feb 15, 2016
…ent-list

don't return the command name in list of arguments
@nsomar nsomar merged commit 2249fc1 into nsomar:master Feb 15, 2016
@armcknight
Copy link
Contributor Author

👍 Thanks for the library, enjoying using it!

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