Merge pull request #1416 from dg-ratiodata/feature/fix_offenses
Fix rubocop offenses
This commit is contained in:
commit
a977f8bf20
10 changed files with 24 additions and 20 deletions
|
@ -50,3 +50,7 @@ FormatString:
|
|||
Enabled: false
|
||||
CaseIndentation:
|
||||
IndentWhenRelativeTo: end
|
||||
Metrics/AbcSize:
|
||||
Enabled: false
|
||||
Metrics/PerceivedComplexity:
|
||||
Enabled: false
|
||||
|
|
|
@ -64,7 +64,7 @@ module Middleman::CoreExtensions
|
|||
data = app.extensions[:frontmatter].data(source_file).first
|
||||
|
||||
if proxy?
|
||||
url_data = app.extensions[:frontmatter].data( File.join( app.source_dir, url ).chomp('/') ).first
|
||||
url_data = app.extensions[:frontmatter].data(File.join(app.source_dir, url).chomp('/')).first
|
||||
data = data.deep_merge(url_data)
|
||||
end
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ module Middleman
|
|||
mail_addr = el.attr['href'].sub(/\Amailto:/, '')
|
||||
href = obfuscate('mailto') << ':' << obfuscate(mail_addr)
|
||||
content = obfuscate(content) if content == mail_addr
|
||||
return %Q(<a href="#{href}">#{content}</a>)
|
||||
return %(<a href="#{href}">#{content}</a>)
|
||||
end
|
||||
|
||||
attr = el.attr.dup
|
||||
|
|
|
@ -61,7 +61,7 @@ module Middleman
|
|||
middleman_app.image_tag(link, title: title, alt: alt_text)
|
||||
else
|
||||
link_string = link.dup
|
||||
link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
|
||||
link_string << %("#{title}") if title && title.length > 0 && title != alt_text
|
||||
""
|
||||
end
|
||||
end
|
||||
|
@ -74,7 +74,7 @@ module Middleman
|
|||
middleman_app.link_to(content, link, attributes)
|
||||
else
|
||||
link_string = link.dup
|
||||
link_string << %Q("#{title}") if title && title.length > 0 && title != alt_text
|
||||
link_string << %("#{title}") if title && title.length > 0 && title != alt_text
|
||||
"[#{content}](#{link_string})"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,7 +53,7 @@ module Middleman
|
|||
proxy_resource
|
||||
end
|
||||
|
||||
# rubocop:disable AccessorMethodName
|
||||
# rubocop:disable Style/AccessorMethodName
|
||||
def get_source_file
|
||||
if proxy?
|
||||
proxied_to_resource.source_file
|
||||
|
@ -61,18 +61,17 @@ module Middleman
|
|||
super
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/AccessorMethodName
|
||||
|
||||
def content_type
|
||||
mime_type = super
|
||||
return mime_type if mime_type
|
||||
|
||||
if proxy?
|
||||
proxied_to_resource.content_type
|
||||
else
|
||||
return proxied_to_resource.content_type if proxy?
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module InstanceMethods
|
||||
def proxy_manager
|
||||
|
|
|
@ -66,9 +66,11 @@ module Middleman
|
|||
super(store, path)
|
||||
end
|
||||
|
||||
# rubocop:disable Style/AccessorMethodName
|
||||
def get_source_file
|
||||
nil
|
||||
end
|
||||
# rubocop:enable Style/AccessorMethodName
|
||||
|
||||
def template?
|
||||
true
|
||||
|
|
|
@ -36,7 +36,6 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|||
|
||||
# The helpers
|
||||
helpers do
|
||||
|
||||
# Make all block content html_safe
|
||||
# rubocop:disable Semicolon
|
||||
def content_tag(name, content=nil, options=nil, &block)
|
||||
|
|
Loading…
Add table
Reference in a new issue