Update command classes moving into a module
This commit is contained in:
parent
065b251383
commit
e03f48085a
|
@ -27,7 +27,7 @@ command :build do |c|
|
|||
c.action do |args, options|
|
||||
options.defaults :serving => false
|
||||
options = Jekyll.configuration(options.__hash__)
|
||||
Jekyll::BuildCommand.process(options)
|
||||
Jekyll::Commands::Build.process(options)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -49,8 +49,8 @@ command :serve do |c|
|
|||
:serving => true
|
||||
|
||||
options = Jekyll.configuration(options.__hash__)
|
||||
Jekyll::BuildCommand.process(options)
|
||||
Jekyll::ServeCommand.process(options)
|
||||
Jekyll::Commands::Build.process(options)
|
||||
Jekyll::Commands::Serve.process(options)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -65,6 +65,6 @@ command :import do |c|
|
|||
c.option '--host', 'Host address to use when migrating'
|
||||
|
||||
c.action do |args, options|
|
||||
Jekyll::MigrateCommand.process(args.first, options)
|
||||
Jekyll::Commands::Migrate.process(args.first, options)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Jekyll
|
||||
|
||||
class BuildCommand < Command
|
||||
module Commands
|
||||
class Build < Command
|
||||
def self.process(options)
|
||||
site = Jekyll::Site.new(options)
|
||||
|
||||
|
@ -72,5 +72,5 @@ module Jekyll
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Jekyll
|
||||
|
||||
class MigrateCommand < Command
|
||||
module Commands
|
||||
class Migrate < Command
|
||||
MIGRATORS = {
|
||||
:csv => 'CSV',
|
||||
:drupal => 'Drupal',
|
||||
|
@ -43,5 +43,5 @@ module Jekyll
|
|||
abort 'invalid migrator. Please specify a valid migrator'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Jekyll
|
||||
|
||||
class ServeCommand < Command
|
||||
module Commands
|
||||
class Serve < Command
|
||||
def self.process(options)
|
||||
require 'webrick'
|
||||
include WEBrick
|
||||
|
@ -24,5 +24,5 @@ module Jekyll
|
|||
t.join()
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue