Using modularized commands (Jekyll::Commands) as per @tombell's latest PR merge

This commit is contained in:
Parker Moore 2013-01-27 23:17:45 +01:00
parent f3856a444a
commit a8671ed52b
2 changed files with 25 additions and 23 deletions

View File

@ -22,7 +22,7 @@ command :new do |c|
c.description = 'Creates a new Jekyll site scaffold in PATH'
c.action do |args, options|
Jekyll::NewCommand.process(args)
Jekyll::Commands::New.process(args)
end
end

View File

@ -1,7 +1,8 @@
require 'yaml'
module Jekyll
class NewCommand < Command
module Commands
class New < Command
def self.process(args)
path = File.expand_path(args.join(" "), Dir.pwd)
@ -28,4 +29,5 @@ module Jekyll
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
end
end
end
end