Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
rubocop Style/Next
Browse files Browse the repository at this point in the history
  • Loading branch information
atz committed Jan 7, 2016
1 parent d16ac03 commit 1fd51cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
7 changes: 0 additions & 7 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,6 @@ Style/NestedTernaryOperator:
Exclude:
- 'lib/fetcher.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
Style/Next:
Exclude:
- 'lib/indexer.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/NumericLiterals:
Expand Down
9 changes: 4 additions & 5 deletions lib/indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ def index_druid_tree_branch(branch)
object_paths.each do |o_path|
object = solrize_object(o_path)
objects << object if object != {} # Only add it if we have a valid object, the function ret
if objects.size == @@indexer_config['items_commit_every']
add_and_commit_to_solr(objects)
all_objects += objects
objects = []
end
next unless objects.size == @@indexer_config['items_commit_every']
add_and_commit_to_solr(objects)
all_objects += objects
objects = []
end

add_and_commit_to_solr(objects) if objects.size != 0
Expand Down

0 comments on commit 1fd51cf

Please sign in to comment.