lib/jekyll/readers/layout_reader.rb in jekyll-3.2.0.pre.beta1 vs lib/jekyll/readers/layout_reader.rb in jekyll-3.2.0.pre.beta2

- old
+ new

@@ -6,15 +6,17 @@ @layouts = {} end def read layout_entries.each do |layout_file| - @layouts[layout_name(layout_file)] = Layout.new(site, layout_directory, layout_file) + @layouts[layout_name(layout_file)] = \ + Layout.new(site, layout_directory, layout_file) end theme_layout_entries.each do |layout_file| - @layouts[layout_name(layout_file)] ||= Layout.new(site, theme_layout_directory, layout_file) + @layouts[layout_name(layout_file)] ||= \ + Layout.new(site, theme_layout_directory, layout_file) end @layouts end @@ -37,11 +39,11 @@ end def entries_in(dir) entries = [] within(dir) do - entries = EntryFilter.new(site).filter(Dir['**/*.*']) + entries = EntryFilter.new(site).filter(Dir["**/*.*"]) end entries end def layout_name(file) @@ -52,18 +54,16 @@ return unless File.exist?(directory) Dir.chdir(directory) { yield } end def layout_directory_inside_source - site.in_source_dir(site.config['layouts_dir']) + site.in_source_dir(site.config["layouts_dir"]) end def layout_directory_in_cwd - dir = Jekyll.sanitized_path(Dir.pwd, site.config['layouts_dir']) + dir = Jekyll.sanitized_path(Dir.pwd, site.config["layouts_dir"]) if File.directory?(dir) && !site.safe dir - else - nil end end end end