Skip to content

Commit 44701ef

Browse files
committedDec 7, 2018
style(rubucop): Fixing styling for latest Rubocop
Apparently, new lines are requires after guard clauses now. I like it.
1 parent fc7847e commit 44701ef

File tree

6 files changed

+13
-2
lines changed

6 files changed

+13
-2
lines changed
 

‎lib/jekyll/algolia/configurator.rb

+4
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def self.default_files_to_exclude
209209
def self.verbose?
210210
value = get('verbose')
211211
return true if value == true
212+
212213
false
213214
end
214215

@@ -218,6 +219,7 @@ def self.verbose?
218219
def self.dry_run?
219220
value = get('dry_run')
220221
return true if value == true
222+
221223
false
222224
end
223225

@@ -228,6 +230,7 @@ def self.dry_run?
228230
def self.force_settings?
229231
value = get('force_settings')
230232
return true if value == true
233+
231234
false
232235
end
233236

@@ -238,6 +241,7 @@ def self.force_settings?
238241
def self.extensions_to_index
239242
extensions = algolia('extensions_to_index')
240243
return [] if extensions.nil?
244+
241245
extensions = extensions.split(',') if extensions.is_a? String
242246
extensions
243247
end

‎lib/jekyll/algolia/error_handler.rb

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def self.identify(error, context = {})
5757
known_errors.each do |potential_error|
5858
error_check = send("#{potential_error}?", error, context)
5959
next if error_check == false
60+
6061
return {
6162
name: potential_error,
6263
details: error_check

‎lib/jekyll/algolia/indexer.rb

+1
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def self.update_settings
328328

329329
Logger.log("I:Updating settings of index #{index.name}")
330330
return if Configurator.dry_run?
331+
331332
set_settings(settings)
332333
end
333334

‎lib/jekyll/algolia/logger.rb

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def self.log(input)
4949
# line - The line to display, following the same format as .log
5050
def self.verbose(line)
5151
return unless Configurator.verbose?
52+
5253
log(line)
5354
end
5455

‎lib/jekyll/algolia/utils.rb

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def self.instance_of?(input, classname)
4242
# html - String representation of the HTML node
4343
def self.html_to_text(html)
4444
return nil if html.nil?
45+
4546
text = Nokogiri::HTML(html).text
4647
text.tr("\n", ' ').squeeze(' ').strip
4748
end
@@ -54,6 +55,7 @@ def self.compact_empty(hash)
5455
hash.each do |key, value|
5556
next if value.nil?
5657
next if value.is_a?(String) && value.empty?
58+
5759
new_hash[key] = value
5860
end
5961
new_hash
@@ -84,6 +86,7 @@ def self.match?(string, regex)
8486
# It is basically a wrapper around [].find, handling more edge-cases
8587
def self.find_by_key(items, key, value)
8688
return nil if items.nil?
89+
8790
items.find do |item|
8891
item[key] == value
8992
end
@@ -140,6 +143,7 @@ def self.diff_keys(alpha, beta)
140143
end
141144

142145
return nil if diff.empty?
146+
143147
diff
144148
end
145149

‎spec/jekyll/algolia/indexer_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
.with(hash_including(
3434
application_id: 'app_id',
3535
api_key: 'api_key'
36-
))
36+
))
3737
end
3838
end
3939

@@ -215,7 +215,7 @@
215215
.to have_received(:create)
216216
.with(hash_including(
217217
total: 12
218-
))
218+
))
219219
expect(progress_bar_instance).to have_received(:increment).twice
220220
end
221221
end

0 commit comments

Comments
 (0)
Failed to load comments.