adiwg-mdtranslator 2.13.2 → 2.13.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d447daf990acea59e6e75f64cbd5b77a1484a8f
4
- data.tar.gz: d06cfba19d5862412ff07e426d21f6f798866694
3
+ metadata.gz: d2e846bab923dba1c4af51d308e33eb83ae5ea96
4
+ data.tar.gz: bbb0ab9ad5191e0dc43cf2889594d44ca31bdb08
5
5
  SHA512:
6
- metadata.gz: aaa8026fdbdee161e854b6b6d9fbb9a842ae1e4a646e0da71beb54cae91ad58e93ff0588928aedf798090fd02dbe37e9b01578eb2a19e2ecd846fa51417326c7
7
- data.tar.gz: 0d9323bd60d486b000444e800fe16ca415998c17d2919244cc9fde44964c1c2e266089a0978722b06df59fbab37ec4d4516b0c819ba46a7651fd943b3e9c652e
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.2](https://github.com/adiwg/mdTranslator/tree/v2.13.2)
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
- xCitation = xIdInfo.xpath('./crossref')
240
- unless xCitation.empty?
241
- hCitation = Citation.unpack(xCitation, hResponseObj)
242
- unless hCitation.empty?
243
- hAssociatedResource = intMetadataClass.newAssociatedResource
244
- hAssociatedResource[:associationType] = 'crossReference'
245
- hAssociatedResource[:resourceCitation] = hCitation
246
- hMetadata[:associatedResources] << hAssociatedResource
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.2"
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
- aResponsibility = @Namespace.nested_objs_by_element(intObj, 'roleName')
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.2
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-08-01 00:00:00.000000000 Z
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.8
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