style(rubucop): Fixing styling for latest Rubocop
Apparently, new lines are requires after guard clauses now. I like it.
This commit is contained in:
parent
fc7847e842
commit
44701ef764
@ -209,6 +209,7 @@ module Jekyll
|
||||
def self.verbose?
|
||||
value = get('verbose')
|
||||
return true if value == true
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
@ -218,6 +219,7 @@ module Jekyll
|
||||
def self.dry_run?
|
||||
value = get('dry_run')
|
||||
return true if value == true
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
@ -228,6 +230,7 @@ module Jekyll
|
||||
def self.force_settings?
|
||||
value = get('force_settings')
|
||||
return true if value == true
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
@ -238,6 +241,7 @@ module Jekyll
|
||||
def self.extensions_to_index
|
||||
extensions = algolia('extensions_to_index')
|
||||
return [] if extensions.nil?
|
||||
|
||||
extensions = extensions.split(',') if extensions.is_a? String
|
||||
extensions
|
||||
end
|
||||
|
||||
@ -57,6 +57,7 @@ module Jekyll
|
||||
known_errors.each do |potential_error|
|
||||
error_check = send("#{potential_error}?", error, context)
|
||||
next if error_check == false
|
||||
|
||||
return {
|
||||
name: potential_error,
|
||||
details: error_check
|
||||
|
||||
@ -328,6 +328,7 @@ module Jekyll
|
||||
|
||||
Logger.log("I:Updating settings of index #{index.name}")
|
||||
return if Configurator.dry_run?
|
||||
|
||||
set_settings(settings)
|
||||
end
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ module Jekyll
|
||||
# line - The line to display, following the same format as .log
|
||||
def self.verbose(line)
|
||||
return unless Configurator.verbose?
|
||||
|
||||
log(line)
|
||||
end
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ module Jekyll
|
||||
# html - String representation of the HTML node
|
||||
def self.html_to_text(html)
|
||||
return nil if html.nil?
|
||||
|
||||
text = Nokogiri::HTML(html).text
|
||||
text.tr("\n", ' ').squeeze(' ').strip
|
||||
end
|
||||
@ -54,6 +55,7 @@ module Jekyll
|
||||
hash.each do |key, value|
|
||||
next if value.nil?
|
||||
next if value.is_a?(String) && value.empty?
|
||||
|
||||
new_hash[key] = value
|
||||
end
|
||||
new_hash
|
||||
@ -84,6 +86,7 @@ module Jekyll
|
||||
# It is basically a wrapper around [].find, handling more edge-cases
|
||||
def self.find_by_key(items, key, value)
|
||||
return nil if items.nil?
|
||||
|
||||
items.find do |item|
|
||||
item[key] == value
|
||||
end
|
||||
@ -140,6 +143,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
return nil if diff.empty?
|
||||
|
||||
diff
|
||||
end
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ describe(Jekyll::Algolia::Indexer) do
|
||||
.with(hash_including(
|
||||
application_id: 'app_id',
|
||||
api_key: 'api_key'
|
||||
))
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
@ -215,7 +215,7 @@ describe(Jekyll::Algolia::Indexer) do
|
||||
.to have_received(:create)
|
||||
.with(hash_including(
|
||||
total: 12
|
||||
))
|
||||
))
|
||||
expect(progress_bar_instance).to have_received(:increment).twice
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user