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

Add --force flag to new command #1115

Merged
merged 5 commits into from May 18, 2013
Merged

Add --force flag to new command #1115

merged 5 commits into from May 18, 2013

Conversation

caseylang
Copy link
Contributor

As suggested in #1104, I've added a --force command to the new subcommand.

@caseylang
Copy link
Contributor Author

I've noticed if foo && bar == false being used instead of if foo && !bar in a few places. If you prefer that, please let me know and I'll be happy to change.

@@ -3,12 +3,12 @@
module Jekyll
module Commands
class New < Command
def self.process(args)
def self.process(args, options = {})
raise ArgumentError.new('You must specify a path.') if args.empty?

new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
Copy link
Member

Choose a reason for hiding this comment

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

In your tests, did args include --force?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, flags were properly separated from args. If you ran the command with only the force flag args would simply be an empty array. Commander is nice enough to ensure this in their specs.

Copy link
Member

Choose a reason for hiding this comment

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

Awesome, thanks for confirming.

@parkr
Copy link
Member

parkr commented May 17, 2013

This looks good to me. @mattr-, if everything checks out for you as well, merge it in! :)

@mattr-
Copy link
Member

mattr- commented May 18, 2013

Nice work @clang1234 ! Thanks! ❤️ 🚢ed

mattr- added a commit that referenced this pull request May 18, 2013
Add --force flag to new command
@mattr- mattr- merged commit 7c012a9 into jekyll:master May 18, 2013
mattr- added a commit that referenced this pull request May 18, 2013
@caseylang
Copy link
Contributor Author

Thanks guys! Glad I could help.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants