Tests Passing. Three RuboCop revisions remain
This commit is contained in:
parent
26d0a8db77
commit
894d1fe21e
|
@ -103,10 +103,9 @@ module Jekyll
|
||||||
end
|
end
|
||||||
|
|
||||||
def case_insensitive_urls(things, destination)
|
def case_insensitive_urls(things, destination)
|
||||||
things.each_with_object({}) do |memo, thing|
|
things.each_with_object({}) do |thing, memo|
|
||||||
dest = thing.destination(destination)
|
dest = thing.destination(destination)
|
||||||
(memo[dest.downcase] ||= []) << dest
|
(memo[dest.downcase] ||= []) << dest
|
||||||
memo
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,19 @@ module Jekyll
|
||||||
"#{new_blog_path} exists and is not empty."
|
"#{new_blog_path} exists and is not empty."
|
||||||
end
|
end
|
||||||
|
|
||||||
if_blank_options
|
if options["blank"]
|
||||||
|
create_blank_site new_blog_path
|
||||||
|
else
|
||||||
|
create_sample_files new_blog_path
|
||||||
|
|
||||||
|
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
|
||||||
|
f.write(scaffold_post_content)
|
||||||
|
end
|
||||||
|
|
||||||
|
File.open(File.expand_path("Gemfile", new_blog_path), "w") do |f|
|
||||||
|
f.write(gemfile_contents)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
|
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
|
||||||
end
|
end
|
||||||
|
@ -95,22 +107,6 @@ RUBY
|
||||||
def scaffold_path
|
def scaffold_path
|
||||||
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
|
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
|
||||||
end
|
end
|
||||||
|
|
||||||
def if_blank_options
|
|
||||||
if options["blank"]
|
|
||||||
create_blank_site new_blog_path
|
|
||||||
else
|
|
||||||
create_sample_files new_blog_path
|
|
||||||
|
|
||||||
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
|
|
||||||
f.write(scaffold_post_content)
|
|
||||||
end
|
|
||||||
|
|
||||||
File.open(File.expand_path("Gemfile", new_blog_path), "w") do |f|
|
|
||||||
f.write(gemfile_contents)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -173,6 +173,9 @@ module Jekyll
|
||||||
private
|
private
|
||||||
def enable_ssl(opts)
|
def enable_ssl(opts)
|
||||||
return if !opts[:JekyllOptions]["ssl_cert"] && !opts[:JekyllOptions]["ssl_key"]
|
return if !opts[:JekyllOptions]["ssl_cert"] && !opts[:JekyllOptions]["ssl_key"]
|
||||||
|
if !opts[:JekyllOptions]["ssl_cert"] || !opts[:JekyllOptions]["ssl_key"]
|
||||||
|
raise RuntimeError, "--ssl-cert or --ssl-key missing."
|
||||||
|
end
|
||||||
require "openssl"
|
require "openssl"
|
||||||
require "webrick/https"
|
require "webrick/https"
|
||||||
source_key = Jekyll.sanitized_path(opts[:JekyllOptions]["source"], \
|
source_key = Jekyll.sanitized_path(opts[:JekyllOptions]["source"], \
|
||||||
|
|
Loading…
Reference in New Issue