revs-utils 1.0.19 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzAzNjMxYjAzOTE5YTcwOTJjYTc1MDkyOTg4NDM0MTA4NzU4ZDBjMw==
4
+ ZDBmOTBhZTBkZmMxYWYxYWJiMjE5MjE2MzU4MWRmZjIxMGRhZmJmNQ==
5
5
  data.tar.gz: !binary |-
6
- MmRhMjIzYTcwMmUxM2ZiYmFhODY2NzA2MzhlNDcyNDAwZTRlNzA1Yw==
6
+ NTMzOWFjOTZiNjRmZDI5Mzg2MGJlYmVhZjNkMTU2ZWQ5OWUxZGE5OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODdiMDBmYmZmNTkyMzhlOGJiZmRlYTMwOTdkN2E2MzdmNmM5YjdlNWMwMTg0
10
- OTJjYTk2NzczMTJjYWMzZDU4MjhmNjE1NWNhNWFlNjRlOTk0M2JiZDI4OTBk
11
- MzI0MzkzNzRhODZiODYxYjdhZTkyNDg3ZWFjY2QxODMxMjVmYjY=
9
+ YjI2Nzk2NmMyMzk4MmUyYmQ1MDU0ZDBjYzVmOWE5YzI2OTk5NWFmZjY0OTI5
10
+ YzcwNzg4YWE0ZjA4M2ZkZWIyZDc0MzBmNjFhMTNmYmZjZTBiZjAxNDA5MzY5
11
+ Y2VhMDhlMjc0MTZjODg0YTk5YzUyOWFlZmI5YzNlYzg0ODUzODA=
12
12
  data.tar.gz: !binary |-
13
- Nzg1OTQ1OTk1OGNmMWI2ODY0ZWE4M2Y1NDNlNWEzYWFhZGVhZTRhY2FiMjE4
14
- ZDRhOWE4NjY3NjVjZWJiYWQ3N2U1OTYyOGI1ZTY5MTc5OTFiYzE2ODU3MDkz
15
- NzFiMjE1Njg4NmZlMjVkMDI2NDM3ZDVhOGJiZTMzYThhY2MzNTM=
13
+ ZjgxYTEyMTE3MzQzOTJkNjcyMDkxMmVmOTUxMDdjNDEzYjhmZjc3MjI2ZDJj
14
+ OTYxMmY0ODVlOTMyNzVkODVlNmRmZmZhYjkyZjZhMDdjYTFjMGNmOTMzMzA2
15
+ ZTlhNjQ3YzcyYjg0MDRhNzE1ODIzNzU5NDY0OWQ3Mzg4M2MxNzU=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revs-utils (1.0.18)
4
+ revs-utils (1.0.20)
5
5
  actionpack (~> 3)
6
6
  chronic
7
7
  countries (= 0.9.2)
@@ -11,9 +11,9 @@ GEM
11
11
  remote: http://rubygems.org/
12
12
  remote: http://sul-gems.stanford.edu/
13
13
  specs:
14
- actionpack (3.2.21)
15
- activemodel (= 3.2.21)
16
- activesupport (= 3.2.21)
14
+ actionpack (3.2.22)
15
+ activemodel (= 3.2.22)
16
+ activesupport (= 3.2.22)
17
17
  builder (~> 3.0.0)
18
18
  erubis (~> 2.7.0)
19
19
  journey (~> 1.0.4)
@@ -21,10 +21,10 @@ GEM
21
21
  rack-cache (~> 1.2)
22
22
  rack-test (~> 0.6.1)
23
23
  sprockets (~> 2.2.1)
24
- activemodel (3.2.21)
25
- activesupport (= 3.2.21)
24
+ activemodel (3.2.22)
25
+ activesupport (= 3.2.22)
26
26
  builder (~> 3.0.0)
27
- activesupport (3.2.21)
27
+ activesupport (3.2.22)
28
28
  i18n (~> 0.6, >= 0.6.4)
29
29
  multi_json (~> 1.0)
30
30
  builder (3.0.4)
@@ -42,14 +42,14 @@ GEM
42
42
  rake (>= 0.8.7)
43
43
  rest-client
44
44
  mime-types (2.0)
45
- multi_json (1.11.0)
46
- rack (1.4.5)
45
+ multi_json (1.11.2)
46
+ rack (1.4.7)
47
47
  rack-cache (1.2)
48
48
  rack (>= 0.4)
49
49
  rack-test (0.6.3)
50
50
  rack (>= 1.0)
51
51
  rake (10.1.0)
52
- rdf (1.1.11)
52
+ rdf (1.1.14)
53
53
  link_header (~> 0.0, >= 0.0.8)
54
54
  rest-client (1.6.7)
55
55
  mime-types (>= 1.16)
data/README.rdoc CHANGED
@@ -22,6 +22,8 @@ Shared methods and functions used by revs-indexer, pre-assembly and bulk metadat
22
22
  - <b>1.0.10</b> Update valid for metadata method so it is not sensitive to blank or uppercase columns
23
23
  - <b>1.0.11</b> Fix issues with year parsing
24
24
  - <b>1.0.12</b> Allow two digit years in year formatting
25
+ - <b>1.0.19</b> Display output showing reasons for validation failures when checking manifests
26
+ - <b>1.0.20</b> Allow for optional metadata columns in the manifest
25
27
 
26
28
  == Running tests
27
29
 
@@ -30,6 +30,8 @@ metadata:
30
30
  hide: hide
31
31
  format: format
32
32
  collection_name: collection_name
33
+ metadata_optional:
34
+ format_authority: format_authority
33
35
  known_formats:
34
36
  - black-and-white film
35
37
  - color film
@@ -41,4 +43,5 @@ known_formats:
41
43
  - black-and-white negatives
42
44
  - color negatives
43
45
  - black-and-white transparencies
44
- - color transparencies
46
+ - color transparencies
47
+ - Glass negatives
Binary file
@@ -1,5 +1,5 @@
1
1
  module Revs
2
2
  module Utils
3
- VERSION = "1.0.19"
3
+ VERSION = "1.0.20"
4
4
  end
5
5
  end
data/lib/revs-utils.rb CHANGED
@@ -14,6 +14,7 @@ REVS_LC_TERMS_FILENAME=File.join(PROJECT_ROOT,'files','revs-lc-marque-terms.obj'
14
14
  REVS_MANIFEST_HEADERS_FILEPATH = File.join(PROJECT_ROOT,'config',"manifest_headers.yml")
15
15
  REGISTER = "register"
16
16
  METADATA = "metadata"
17
+ OPTIONAL = "metadata_optional"
17
18
  FORMATS = "known_formats"
18
19
 
19
20
  module Revs
@@ -23,7 +24,7 @@ module Revs
23
24
  # a hash of LC Subject Heading terms and their IDs for linking for "Automobiles" http://id.loc.gov/authorities/subjects/sh85010201.html
24
25
  # this is cached and loaded from disk and deserialized back into a hash for performance reasons, then stored as a module
25
26
  # level constant so it can be reused throughout the pre-assembly run as a constant
26
- # This cached set of terms can be re-generated with "ruby devel/revs_lc_automobile_terms.rb"
27
+ # This cached set of terms can be re-generated with "ruby bin/revs_lc_automobile_terms.rb"
27
28
  AUTOMOBILE_LC_TERMS= File.open(REVS_LC_TERMS_FILENAME,'rb'){|io| Marshal.load(io)} if File.exists?(REVS_LC_TERMS_FILENAME)
28
29
  REVS_MANIFEST_HEADERS_FILE = File.open(REVS_MANIFEST_HEADERS_FILEPATH)
29
30
  REVS_MANIFEST_HEADERS = YAML.load( REVS_MANIFEST_HEADERS_FILE)
@@ -150,7 +151,7 @@ module Revs
150
151
  puts "has location column as well as specific state,city,country columns"
151
152
  result2=false
152
153
  end
153
- extra_columns = file_headers-get_manifest_section(METADATA).values-get_manifest_section(REGISTER).values
154
+ extra_columns = file_headers-get_manifest_section(METADATA).values-get_manifest_section(REGISTER).values-get_manifest_section(OPTIONAL).values
154
155
  has_extra_columns = (extra_columns == [])
155
156
  puts "has unknown columns: #{extra_columns.join(', ')}" unless has_extra_columns
156
157
  result3 = has_extra_columns
@@ -1,4 +1,4 @@
1
- format,sourceid,collection_name,filename,year,photographer,label,marque,model,model_year,people,city,state,country,event,description,inst_notes,prod_notes,has_more_metadata
1
+ format,sourceid,collection_name,filename,year,photographer,label,marque,model,model_year,people,city,state,country,event,description,inst_notes,prod_notes,has_more_metadata,format_authority
2
2
  black-and-white negatives,2004-100CRAI-b1_1.0_0001,Bruce R Craig Photograph Collection,2004-100CRAI-b1_1.0_0001.tif,,Bruce R Craig,Rutherford Special,Rutherford Special,,,"Rutherford, Slim",,,"full car (rear), #62",,,
3
3
  black-and-white negatives,2004-100CRAI-b1_1.0_0002,Bruce R Craig Photograph Collection,2004-100CRAI-b1_1.0_0002.tif,,Bruce R Craig,City of Roses,City of Roses,,,"Sezekendy, Charley",,,"full car, #2",,,
4
4
  black-and-white negatives,2004-100CRAI-b1_1.0_0003,Bruce R Craig Photograph Collection,2004-100CRAI-b1_1.0_0003.tif,,Ed Hitzwe,Wilburn | Morgan,,,,Wilburn | Morgan,,,"install tire on wheel, posed photo",,,
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: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Mangiafico
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-02 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries