fsp_harvester 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fsp_harvester/version.rb +1 -1
- data/lib/metadata_harvester.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99d8004e7780475df62b9fdc440d2563434aa927fa7630a6b8ae286df1e27de0
|
4
|
+
data.tar.gz: c4ae1b36eceb9170bc41ff649c7d0427af537c48b6430544c03534b27ab73c1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e46c3b840d204a9089351b4f03782c02cc14a4615b248e8a8da43ff3e9b13944586358a056fdf2d4054c7531489fd68acadce9578809da61f80df679d34049
|
7
|
+
data.tar.gz: 7d0b7975d4d2a4ddf734b4fb6253ce389258a51918b1bd5b133f7714080f27aaa0d449a4fa1286eb7d096f7c4e7deec728c6704a68c26101c8c5fc1d31e8b69e
|
data/lib/metadata_harvester.rb
CHANGED
@@ -161,7 +161,14 @@ module HarvesterTools
|
|
161
161
|
abbreviation = ''
|
162
162
|
if detected_type
|
163
163
|
detectedcontenttypes = detected_type.content_type # comes back as array of [application/x, application/y]
|
164
|
-
|
164
|
+
|
165
|
+
case
|
166
|
+
when claimed_type =~ /application\/vnd\./ # vnd are domain specific
|
167
|
+
contenttype = claimed_type # just pick one arbitrarily, since it doesn't match thedeclared type anyway
|
168
|
+
abbreviation = abbreviate_type(contenttype: contenttype)
|
169
|
+
@meta.comments << "INFO: using content-type #{contenttype}.\n"
|
170
|
+
when detectedcontenttypes.include?(claimed_type)
|
171
|
+
warn "detected types #{detectedcontenttypes} claimed type #{claimed_type}"
|
165
172
|
@meta.add_warning(['022', @meta.all_uris.last, "" ])
|
166
173
|
contenttype = detected_type.content_type.first # just pick one arbitrarily, since it doesn't match thedeclared type anyway
|
167
174
|
abbreviation = abbreviate_type(contenttype: contenttype)
|