@@ -97,7 +97,7 @@ def each_raw_record(reader)
97
97
return to_enum ( :each_raw_record , reader ) unless block_given?
98
98
99
99
reader . each_with_index do |record , index |
100
- with_honeybadger_context ( index : index , marc001 : record [ '001' ] &.value ) do
100
+ with_honeybadger_context ( index :, marc001 : record [ '001' ] &.value ) do
101
101
yield record
102
102
end
103
103
end
@@ -140,10 +140,10 @@ def at_bytes(range, merge: false)
140
140
else identify
141
141
end
142
142
143
- from_bytes ( io . read ( range . size ) , extracted_type , merge : merge )
143
+ from_bytes ( io . read ( range . size ) , extracted_type , merge :)
144
144
end
145
145
else
146
- from_bytes ( download_chunk ( range ) , merge : merge )
146
+ from_bytes ( download_chunk ( range ) , merge :)
147
147
end
148
148
end
149
149
@@ -186,7 +186,7 @@ def each_with_metadata(&block)
186
186
187
187
return each_with_metadata_for_marc21 ( &block ) if marc21?
188
188
189
- each . with_index { |record , index | yield record , extract_record_metadata ( record ) . merge ( index : index ) }
189
+ each . with_index { |record , index | yield record , extract_record_metadata ( record ) . merge ( index :) }
190
190
end
191
191
192
192
private
@@ -227,7 +227,7 @@ def each_with_metadata_for_marc21
227
227
228
228
yield record , {
229
229
**records_to_combine . first . except ( :marc , :marc_bytes ) ,
230
- index : index ,
230
+ index :,
231
231
length : bytes . length ,
232
232
checksum : Digest ::MD5 . hexdigest ( bytes )
233
233
}
@@ -241,15 +241,15 @@ def each_raw_record_with_metadata_for_marc21
241
241
with_reader do |reader |
242
242
bytecount = 0
243
243
reader . each_raw . with_index do |bytes , index |
244
- with_honeybadger_context ( bytecount : bytecount , index : index ) do
244
+ with_honeybadger_context ( bytecount :, index :) do
245
245
length = bytes [ 0 ...5 ] . to_i
246
246
record = MARC ::Reader . decode ( bytes , external_encoding : 'UTF-8' , invalid : :replace )
247
- with_honeybadger_context ( marc001 : record [ '001' ] &.value , bytecount : bytecount , index : index ) do
247
+ with_honeybadger_context ( marc001 : record [ '001' ] &.value , bytecount :, index :) do
248
248
yield (
249
249
extract_record_metadata ( record ) . merge (
250
- bytecount : bytecount ,
251
- length : length ,
252
- index : index ,
250
+ bytecount :,
251
+ length :,
252
+ index :,
253
253
checksum : Digest ::MD5 . hexdigest ( bytes ) ,
254
254
marc_bytes : bytes ,
255
255
marc : record
0 commit comments