Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
orangewolf committed Dec 3, 2024
1 parent 254d873 commit 7e66247
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ gem 'blacklight_oai_provider', '~> 6.1', '>= 6.1.1'
gem 'blacklight_range_limit', '~> 7.0'
gem 'bolognese', '>= 1.9.10'
gem 'bootstrap-datepicker-rails'
gem 'bulkrax', '~> 8.3.0' #, github: 'samvera/bulkrax', branch: 'main'
gem 'bulkrax', '~> 8.3.0' # github: 'samvera/bulkrax', branch: 'main'
gem 'byebug', group: %i[development test]
gem 'capybara', group: %i[test]
gem 'capybara-screenshot', '~> 1.0', group: %i[test]
Expand Down
14 changes: 7 additions & 7 deletions lib/reprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def with_id_lines
end
end


def gone
@gone ||= ActiveSupport::Logger.new("#{log_dir}/gone.log")
end
Expand All @@ -209,7 +208,6 @@ def unknown
end

def file_errors(line)
begin
id = line.strip
begin
file_set = FileSet.find(id)
Expand All @@ -225,22 +223,22 @@ def file_errors(line)
end

if entry
result = %x{curl #{entry.parsed_metadata['remote_files'].first['url']}}
result = `curl #{entry.parsed_metadata['remote_files'].first['url']}`
else
no_bulkrax.error(id)
return
end

if result.blank?
parent = file_set.member_of.first
upstream_issue.error(["https://digitalcollections.lib.utk.edu/concern/attachments/#{parent.id}", entry.parsed_metadata['remote_files'].first['url']])
upstream_issue.error(["https://digitalcollections.lib.utk.edu/concern/attachments/#{parent.id}",
entry.parsed_metadata['remote_files'].first['url']])
return
end

re_run.error(line)
rescue => e
unknown.error([line, e.message])
end
rescue StandardError => e
unknown.error([line, e.message])
end

def lambda_file_errors
Expand All @@ -249,6 +247,7 @@ def lambda_file_errors
}
end

# rubocop:disable Rails/Output
def lambda_missing_files
@lambda_missing_files ||= lambda { |line, _progress|
id = line.strip
Expand All @@ -258,6 +257,7 @@ def lambda_missing_files
end
}
end
# rubocop:enable Rails/Output

def lambda_create_relationships
@lambda_create_relationships ||= lambda { |line, _progress|
Expand Down

0 comments on commit 7e66247

Please sign in to comment.