parent
5be7faac3e
commit
389eb88c20
|
|
@ -108,6 +108,8 @@ Style/Alias:
|
||||||
EnforcedStyle: prefer_alias_method
|
EnforcedStyle: prefer_alias_method
|
||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
Severity: error
|
Severity: error
|
||||||
|
Style/BracesAroundHashParameters:
|
||||||
|
Enabled: false
|
||||||
Style/ClassAndModuleChildren:
|
Style/ClassAndModuleChildren:
|
||||||
Exclude:
|
Exclude:
|
||||||
- test/**/*.rb
|
- test/**/*.rb
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ matrix:
|
||||||
- rvm: *ruby1
|
- rvm: *ruby1
|
||||||
env: TEST_SUITE=profile-docs
|
env: TEST_SUITE=profile-docs
|
||||||
name: "Profile Docs"
|
name: "Profile Docs"
|
||||||
- rvm: *ruby1
|
- rvm: *ruby2
|
||||||
env: TEST_SUITE=memprof
|
env: TEST_SUITE=memprof
|
||||||
name: "Profile Memory Allocation"
|
name: "Profile Memory Allocation"
|
||||||
exclude:
|
exclude:
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ module Jekyll
|
||||||
|
|
||||||
begin
|
begin
|
||||||
self.content = File.read(@path || site.in_source_dir(base, name),
|
self.content = File.read(@path || site.in_source_dir(base, name),
|
||||||
Utils.merged_file_read_opts(site, opts))
|
**Utils.merged_file_read_opts(site, opts))
|
||||||
if content =~ Document::YAML_FRONT_MATTER_REGEXP
|
if content =~ Document::YAML_FRONT_MATTER_REGEXP
|
||||||
self.content = $POSTMATCH
|
self.content = $POSTMATCH
|
||||||
self.data = SafeYAML.load(Regexp.last_match(1))
|
self.data = SafeYAML.load(Regexp.last_match(1))
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,7 @@ module Jekyll
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
merge_defaults
|
merge_defaults
|
||||||
read_content(opts)
|
read_content(**opts)
|
||||||
read_post_data
|
read_post_data
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
handle_read_error(e)
|
handle_read_error(e)
|
||||||
|
|
@ -429,14 +429,14 @@ module Jekyll
|
||||||
categories.flatten!
|
categories.flatten!
|
||||||
categories.uniq!
|
categories.uniq!
|
||||||
|
|
||||||
merge_data!("categories" => categories)
|
merge_data!({ "categories" => categories })
|
||||||
end
|
end
|
||||||
|
|
||||||
def populate_tags
|
def populate_tags
|
||||||
tags = Utils.pluralized_array_from_hash(data, "tag", "tags")
|
tags = Utils.pluralized_array_from_hash(data, "tag", "tags")
|
||||||
tags.flatten!
|
tags.flatten!
|
||||||
|
|
||||||
merge_data!("tags" => tags)
|
merge_data!({ "tags" => tags })
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
@ -462,8 +462,8 @@ module Jekyll
|
||||||
merge_data!(defaults, :source => "front matter defaults") unless defaults.empty?
|
merge_data!(defaults, :source => "front matter defaults") unless defaults.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_content(opts)
|
def read_content(**opts)
|
||||||
self.content = File.read(path, Utils.merged_file_read_opts(site, opts))
|
self.content = File.read(path, **Utils.merged_file_read_opts(site, opts))
|
||||||
if content =~ YAML_FRONT_MATTER_REGEXP
|
if content =~ YAML_FRONT_MATTER_REGEXP
|
||||||
self.content = $POSTMATCH
|
self.content = $POSTMATCH
|
||||||
data_file = SafeYAML.load(Regexp.last_match(1))
|
data_file = SafeYAML.load(Regexp.last_match(1))
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ module Jekyll
|
||||||
|
|
||||||
# This method allows to modify the file content by inheriting from the class.
|
# This method allows to modify the file content by inheriting from the class.
|
||||||
def read_file(file, context)
|
def read_file(file, context)
|
||||||
File.read(file, file_read_opts(context))
|
File.read(file, **file_read_opts(context))
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue