Skip to content

Commit e9bb0b7

Browse files
Isaiah FrantzIsaiah Frantz
authored andcommitted
fix issues noted in rubocop test run
1 parent 40ca72c commit e9bb0b7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/octocatalog-diff/util/parallel.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def self.run_tasks_parallel(result, task_array, logger)
129129

130130
# Waiting for children and handling results
131131
while pidmap.any?
132-
pidmap.each do |pid, stuff|
132+
pidmap.each do |pid|
133133
status = Process.waitpid2(pid, Process::WNOHANG)
134134
next if status.nil?
135135
this_pid, exit_obj = status

spec/octocatalog-diff/tests/util/parallel_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def wait_on_me(pid)
3939
status = nil
4040
# just in case status never equals anything
4141
count = 100
42-
while status.nil? or count > 0
42+
while status.nil? || count > 0
4343
count -= 1
4444
status = Process.waitpid2(pid, Process::WNOHANG)
4545
end
@@ -49,7 +49,7 @@ def wait_on_me(pid)
4949

5050
c = Foo.new
5151
# start my non-parallel process first
52-
just_a_guy = c.dont_wait_me_bro()
52+
just_a_guy = c.dont_wait_me_bro
5353

5454
one = OctocatalogDiff::Util::Parallel::Task.new(method: c.method(:one), args: 'abc', description: 'test1')
5555
two = OctocatalogDiff::Util::Parallel::Task.new(method: c.method(:two), args: 'def', description: 'test2')
@@ -539,4 +539,4 @@ def validate(arg, _logger = nil, _extra_args = {})
539539
end.to raise_error(ArgumentError, /Element .* must be a OctocatalogDiff::Util::Parallel::Task, not a /)
540540
end
541541
end
542-
end
542+
end

0 commit comments

Comments
 (0)