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