Tests Passing. Three RuboCop revisions remain

This commit is contained in:
TheLucasMoore 2016-05-12 19:42:04 -05:00
parent 26d0a8db77
commit 894d1fe21e
3 changed files with 17 additions and 19 deletions

View File

@ -103,10 +103,9 @@ module Jekyll
end
def case_insensitive_urls(things, destination)
things.each_with_object({}) do |memo, thing|
things.each_with_object({}) do |thing, memo|
dest = thing.destination(destination)
(memo[dest.downcase] ||= []) << dest
memo
end
end
end

View File

@ -28,7 +28,19 @@ module Jekyll
"#{new_blog_path} exists and is not empty."
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}."
end
@ -95,22 +107,6 @@ RUBY
def scaffold_path
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
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

View File

@ -173,6 +173,9 @@ module Jekyll
private
def enable_ssl(opts)
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 "webrick/https"
source_key = Jekyll.sanitized_path(opts[:JekyllOptions]["source"], \