Update the sym->str key conversion

This commit is contained in:
Tom Bell 2012-12-18 22:13:17 +00:00
parent bd1c8fe760
commit dc139e2ac9
3 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,9 @@ command :build do |c|
c.description = 'Build your site with the option of auto-renegeration'
c.option '-w', '--watch', 'Watch for changes and rebuild'
c.action do |args, options|
Jekyll::BuildCommand.process(options.__hash__)
options.defaults :serving => false
options = Jekyll.configuration(options.__hash__)
Jekyll::BuildCommand.process(options)
end
end
@ -55,7 +57,8 @@ command :serve do |c|
:baseurl => '/',
:serving => true
Jekyll::BuildCommand.process(options.__hash__)
Jekyll::ServeCommand.process(options.__hash__)
options = Jekyll.configuration(options.__hash__)
Jekyll::BuildCommand.process(options)
Jekyll::ServeCommand.process(options)
end
end

View File

@ -124,7 +124,7 @@ module Jekyll
# Returns the final configuration Hash.
def self.configuration(override)
# Convert any symbol keys to strings and remove the old key/values
override.keys.each { |k| override[k.to_s] = override.delete(k) }
override = override.reduce({}) { |hsh,(k,v)| hsh.merge(k.to_s => v) }
# _config.yml may override default source location, but until
# then, we need to know where to look for _config.yml

View File

@ -2,7 +2,6 @@ module Jekyll
class BuildCommand < Command
def self.process(options)
options = Jekyll.configuration(options)
site = Jekyll::Site.new(options)
source = options['source']