revs-utils 2.1.23 → 2.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/revs-utils/version.rb +1 -1
- data/lib/revs-utils.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5c3129b58d2c793521ac3b8bc72f40ff57b00b
|
4
|
+
data.tar.gz: d867f58ece64fb935d0fa7340f54bbe73954f289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6000156706af2e0acaaf05e0aff21bfe370eccd0df87844a34b56ee3d32b41ffebd889c77c3a4d1c9fe0dac29b625dffb949b72a2114180dd5fed84bceb5583d
|
7
|
+
data.tar.gz: bcaa1bbae4ca854629af114c0665655721e26a4a52b0209e34a0b0cefa1d352f48a02b41ccf30f8767e5e6fdf77a9cd974557f6bef503a19fc794c4c2e6ce884
|
data/lib/revs-utils/version.rb
CHANGED
data/lib/revs-utils.rb
CHANGED
@@ -188,16 +188,16 @@ module Revs
|
|
188
188
|
end
|
189
189
|
sources=Array.new
|
190
190
|
#Make sure all files have entries for those required headers
|
191
|
-
csv_data.
|
191
|
+
csv_data.each_with_index do |row,i|
|
192
192
|
get_manifest_section(REGISTER).keys.each do |header| # label should be there as a column but does not always need a value
|
193
193
|
if header.downcase !='label' && row[header].blank?
|
194
|
-
puts "#{row[get_manifest_section(REGISTER)['sourceid']]} does not have a value for a required registration field"
|
194
|
+
puts "Row #{i}: #{row[get_manifest_section(REGISTER)['sourceid']]} does not have a value for a required registration field"
|
195
195
|
result2=false
|
196
196
|
end
|
197
197
|
end
|
198
198
|
fname = row[get_manifest_section(REGISTER)['filename']].chomp(File.extname(row[get_manifest_section(REGISTER)['filename']]))
|
199
199
|
if ((row[get_manifest_section(REGISTER)['sourceid']] != fname) || ((/\s/ =~ row[get_manifest_section(REGISTER)['sourceid']].strip) != nil))
|
200
|
-
puts "#{row[get_manifest_section(REGISTER)['sourceid']]} does not match the filename or has a space in it"
|
200
|
+
puts "Row #{i}: #{row[get_manifest_section(REGISTER)['sourceid']]} does not match the filename or has a space in it"
|
201
201
|
result3=false
|
202
202
|
end
|
203
203
|
sources << row[get_manifest_section(REGISTER)['sourceid']]
|
@@ -214,12 +214,12 @@ module Revs
|
|
214
214
|
# looks at certain metadata fields in manifest to confirm validity (such as dates and formats)
|
215
215
|
def check_metadata(csv_data)
|
216
216
|
bad_rows=0
|
217
|
-
csv_data.
|
217
|
+
csv_data.each_with_index do |row,i|
|
218
218
|
valid_date=revs_is_valid_datestring?(row[get_manifest_section(METADATA)['year']] || row[get_manifest_section(METADATA)['date']])
|
219
219
|
valid_format=revs_is_valid_format?(row[get_manifest_section(METADATA)['format']])
|
220
220
|
unless (valid_date && valid_format)
|
221
221
|
bad_rows+=1
|
222
|
-
puts "#{row[get_manifest_section(REGISTER)['sourceid']]} has a bad year/date or format"
|
222
|
+
puts "Row #{i}: #{row[get_manifest_section(REGISTER)['sourceid']]} has a bad year/date or format"
|
223
223
|
end
|
224
224
|
end
|
225
225
|
return bad_rows
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revs-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Mangiafico
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: countries
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.6.
|
172
|
+
rubygems_version: 2.6.10
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Shared methods and functions used by revs-indexer, pre-assembly and bulk
|