adiwg-mdtranslator 2.13.2 → 2.13.3
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 +4 -4
- data/CHANGELOG.md +16 -1
- data/lib/adiwg/mdtranslator/readers/fgdc/modules/module_identification.rb +12 -9
- data/lib/adiwg/mdtranslator/version.rb +3 -1
- data/lib/adiwg/mdtranslator/writers/sbJson/sbJson_writer.rb +11 -3
- data/lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb +3 -1
- 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: d2e846bab923dba1c4af51d308e33eb83ae5ea96
|
4
|
+
data.tar.gz: bbb0ab9ad5191e0dc43cf2889594d44ca31bdb08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76dc16abf989aba99ec3775be2e6f59344d41ec74759d7392f3309343de73443bdc61a9615c7b1933bb6605ab03b47a9a04031d2713d97f9a42e5186bba8b757
|
7
|
+
data.tar.gz: 99126f4e0bafae3d8118889f18216c1c70a45f3c886281fafda0a2b70086de8bf9cd4b058c8843dc44fff7e651706015fbb067f04964520105c99a4f166e78d3
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,22 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v2.13.
|
3
|
+
## [v2.13.3](https://github.com/adiwg/mdTranslator/tree/v2.13.3)
|
4
4
|
|
5
|
+
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.13.2...v2.13.3)
|
6
|
+
|
7
|
+
**Fixed bugs:**
|
8
|
+
|
9
|
+
- sbJSON contacts inherited from associated records [\#202](https://github.com/adiwg/mdTranslator/issues/202)
|
10
|
+
|
11
|
+
**Closed issues:**
|
12
|
+
|
13
|
+
- Errors Translating FGDC to HTML [\#201](https://github.com/adiwg/mdTranslator/issues/201)
|
14
|
+
|
15
|
+
**Merged pull requests:**
|
16
|
+
|
17
|
+
- Fix issues with sbJson writer and fgdc reader [\#203](https://github.com/adiwg/mdTranslator/pull/203) ([stansmith907](https://github.com/stansmith907))
|
18
|
+
|
19
|
+
## [v2.13.2](https://github.com/adiwg/mdTranslator/tree/v2.13.2) (2018-08-01)
|
5
20
|
[Full Changelog](https://github.com/adiwg/mdTranslator/compare/v2.13.1...v2.13.2)
|
6
21
|
|
7
22
|
**Merged pull requests:**
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# unpack fgdc metadata identification
|
3
3
|
|
4
4
|
# History:
|
5
|
+
# Stan Smith 2018-09-06 bug fix - change crossReference processing to an array
|
5
6
|
# Stan Smith 2018-04-06 change mdJson taxonomy to an array
|
6
7
|
# Stan Smith 2017-08-15 original script
|
7
8
|
|
@@ -235,15 +236,17 @@ module ADIWG
|
|
235
236
|
hResourceInfo[:environmentDescription] = native
|
236
237
|
end
|
237
238
|
|
238
|
-
# identification information 1.14 (crossref) - cross reference {associatedResource}
|
239
|
-
|
240
|
-
unless
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
239
|
+
# identification information 1.14 (crossref) - cross reference [] {associatedResource}
|
240
|
+
axCitation = xIdInfo.xpath('./crossref')
|
241
|
+
unless axCitation.empty?
|
242
|
+
axCitation.each do |xCitation|
|
243
|
+
hCitation = Citation.unpack(xCitation, hResponseObj)
|
244
|
+
unless hCitation.empty?
|
245
|
+
hAssociatedResource = intMetadataClass.newAssociatedResource
|
246
|
+
hAssociatedResource[:associationType] = 'crossReference'
|
247
|
+
hAssociatedResource[:resourceCitation] = hCitation
|
248
|
+
hMetadata[:associatedResources] << hAssociatedResource
|
249
|
+
end
|
247
250
|
end
|
248
251
|
end
|
249
252
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# adiwg mdTranslator
|
2
2
|
|
3
3
|
# version 2 history
|
4
|
+
# 2.13.3 2018-09-06 bug fix #201 change crossReference processing to an array
|
5
|
+
# 2.13.3 2018-09-05 bug fix #202 skip responsibility contacts in associatedResource for sbJson
|
4
6
|
# 2.13.2 2018-07-31 fix timeInterval check to allow real and integer
|
5
7
|
# 2.13.2 2018-07-31 add minitest for adiwg-mdJson_schema example
|
6
8
|
# 2.13.1 2018-07-02 fix bug in ISO 19110 writer when dictionary empty
|
@@ -89,7 +91,7 @@
|
|
89
91
|
module ADIWG
|
90
92
|
module Mdtranslator
|
91
93
|
# current mdtranslator version
|
92
|
-
VERSION = "2.13.
|
94
|
+
VERSION = "2.13.3"
|
93
95
|
end
|
94
96
|
end
|
95
97
|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# sbJson 1.0 writer
|
2
2
|
|
3
3
|
# History:
|
4
|
+
# Stan Smith 2018-09-05 allow nested_obj_by_element to skip specified objects
|
4
5
|
# Stan Smith 2017-05-12 refactored for mdJson/mdTranslator 2.0
|
5
6
|
# Josh Bradley original script
|
6
7
|
|
@@ -62,18 +63,25 @@ module ADIWG
|
|
62
63
|
end
|
63
64
|
|
64
65
|
# find all nested objects in 'obj' that contain the element 'ele'
|
65
|
-
def self.nested_objs_by_element(obj, ele)
|
66
|
+
def self.nested_objs_by_element(obj, ele, excludeList = [])
|
66
67
|
aCollected = []
|
67
68
|
obj.each do |key, value|
|
69
|
+
skipThisOne = false
|
70
|
+
excludeList.each do |exclude|
|
71
|
+
if key == exclude.to_sym
|
72
|
+
skipThisOne = true
|
73
|
+
end
|
74
|
+
end
|
75
|
+
next if skipThisOne
|
68
76
|
if key == ele.to_sym
|
69
77
|
aCollected << obj
|
70
78
|
elsif obj.is_a?(Array)
|
71
79
|
if key.respond_to?(:each)
|
72
|
-
aReturn = nested_objs_by_element(key, ele)
|
80
|
+
aReturn = nested_objs_by_element(key, ele, excludeList)
|
73
81
|
aCollected = aCollected.concat(aReturn) unless aReturn.empty?
|
74
82
|
end
|
75
83
|
elsif obj[key].respond_to?(:each)
|
76
|
-
aReturn = nested_objs_by_element(value, ele)
|
84
|
+
aReturn = nested_objs_by_element(value, ele, excludeList)
|
77
85
|
aCollected = aCollected.concat(aReturn) unless aReturn.empty?
|
78
86
|
end
|
79
87
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# sbJson 1.0 writer
|
2
2
|
|
3
3
|
# History:
|
4
|
+
# Stan Smith 2018-09-05 skip responsibility objects in associatedResource
|
4
5
|
# Stan Smith 2017-05-25 refactored for mdJson/mdTranslator 2.0
|
5
6
|
# Josh Bradley original script
|
6
7
|
|
@@ -20,7 +21,8 @@ module ADIWG
|
|
20
21
|
def self.get_contact_list(intObj)
|
21
22
|
|
22
23
|
# gather all responsibility objects in intObj
|
23
|
-
|
24
|
+
# skip those in associatedResources[]
|
25
|
+
aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName', ['associatedResources'])
|
24
26
|
|
25
27
|
# set an additional 'Material Request Contact' for each distributor contact
|
26
28
|
aMRContacts = @Namespace.nested_objs_by_element(intObj[:metadata][:distributorInfo], 'roleName')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adiwg-mdtranslator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.13.
|
4
|
+
version: 2.13.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stan Smith
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -855,7 +855,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
855
855
|
version: '0'
|
856
856
|
requirements: []
|
857
857
|
rubyforge_project:
|
858
|
-
rubygems_version: 2.6.
|
858
|
+
rubygems_version: 2.6.14.1
|
859
859
|
signing_key:
|
860
860
|
specification_version: 4
|
861
861
|
summary: The mdtranslator (metadata translator) is a tool for translating metadata
|