Skip to content
This repository was archived by the owner on Aug 15, 2020. It is now read-only.

Commit 3e471e9

Browse files
committed
Revert "Rubocop fixes"
This reverts commit 4504236.
1 parent eac0e32 commit 3e471e9

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

_plugins/author.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ def team_link(input)
7373
# puts "L 143 author.rb: No such author: #{input} in #{@page_path}"
7474
author_data = SiteData::AuthorData.new
7575
full_name = author_data.fetch(input, 'full_name')
76-
full_name || puts "author.rb#team_link: No such author: #{input} in #{@page_path}".red
76+
if full_name
77+
full_name
78+
else
79+
puts "author.rb#team_link: No such author: #{input} in #{@page_path}".red
80+
end
7781
else
7882
name = authors[index].data['name'].downcase
7983
url = "#{site_url}/author/#{name}"

_plugins/author_data.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AuthorData
88

99
def initialize(test_path = nil)
1010
@test_path = test_path
11-
@basepath = @test_path || Dir.pwd
11+
@basepath = @test_path ? @test_path : Dir.pwd
1212

1313
@path = File.join(@basepath, '_authors')
1414
cwd = File.dirname(__FILE__)

_plugins/related_posts.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def create_presets(site)
8282
end
8383

8484
def in_threads(site)
85-
site.config['n_cores'] || 1
85+
site.config['n_cores'] ? site.config['n_cores'] : 1
8686
end
8787

8888
def generate(site)

check_images.rb

+9-3
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@
3535
ARGV.map.with_index do |a, index|
3636
# Flags:
3737
# The image flag allows you to name the image path directory
38-
image_path = ARGV[index + 1] || image_path if a == '-i' || a == '-I' || a == '--image'
38+
if a == '-i' || a == '-I' || a == '--image'
39+
image_path = ARGV[index + 1] ? ARGV[index + 1] : image_path
40+
end
3941

4042
# Set reference for built project
41-
built_path = ARGV[index + 1] || built_path if a == '-b' || a == '-B' || a == '--built'
43+
if a == '-b' || a == '-B' || a == '--built'
44+
built_path = ARGV[index + 1] ? ARGV[index + 1] : built_path
45+
end
4246

4347
# Set folder where images are stored
44-
directory_name = ARGV[index + 1] || directory_name if a == '-d' || a == '-D' || a == '--dir_temp'
48+
if a == '-d' || a == '-D' || a == '--dir_temp'
49+
directory_name = ARGV[index + 1] ? ARGV[index + 1] : directory_name
50+
end
4551

4652
# Use relative file path to scan
4753
use_relative = true if a == '-r' || a == '-R' || a == '--use_relative'

spec/_posts/page.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# rubocop:disable all
12
# rubocop:enable all

tests/test.rb

100755100644
File mode changed.

0 commit comments

Comments
 (0)