Rubocop: Style/BlockDelimiters

- Avoid using {...} for multi-line blocks
This commit is contained in:
Pat Hawks 2016-01-04 12:05:54 -08:00
parent 086e85ca9e
commit 6711234d5f
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
4 changed files with 10 additions and 10 deletions

View File

@ -87,9 +87,9 @@ module Jekyll
if converters.all? { |c| c.is_a?(Jekyll::Converters::Identity) }
ext
else
converters.map { |c|
converters.map do |c|
c.output_ext(ext) unless c.is_a?(Jekyll::Converters::Identity)
}.compact.last
end.compact.last
end
end
@ -122,9 +122,9 @@ module Jekyll
#
# Returns the Hash representation of this Convertible.
def to_liquid(attrs = nil)
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map { |attribute|
further_data = Hash[(attrs || self.class::ATTRIBUTES_FOR_LIQUID).map do |attribute|
[attribute, send(attribute)]
}]
end]
defaults = site.frontmatter_defaults.all(relative_path, type)
Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)

View File

@ -238,7 +238,7 @@ module Jekyll
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'.")
end
input.sort { |apple, orange|
input.sort do |apple, orange|
apple_property = item_property(apple, property)
orange_property = item_property(orange, property)
@ -249,7 +249,7 @@ module Jekyll
else
apple_property <=> orange_property
end
}
end
end
end

View File

@ -68,11 +68,11 @@ module Jekyll
#
# Returns nothing.
def retrieve_dirs(_base, dir, dot_dirs)
dot_dirs.map { |file|
dot_dirs.map do |file|
dir_path = site.in_source_dir(dir, file)
rel_path = File.join(dir, file)
@site.reader.read_directories(rel_path) unless @site.dest.sub(/\/$/, '') == dir_path
}
end
end
# Retrieve all the pages from the current directory,

View File

@ -196,9 +196,9 @@ module Jekyll
#
# Returns nothing.
def write
each_site_file { |item|
each_site_file do |item|
item.write(dest) if regenerator.regenerate?(item)
}
end
regenerator.write_metadata
Jekyll::Hooks.trigger :site, :post_write, self
end