search_solr_tools 3.5.1 → 3.7.0

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: 943858adbfab17cc599ccab60711c25f757b4531
4
- data.tar.gz: 284281a588c8cf01ffb497ac69fa2c7bdcce8b4c
3
+ metadata.gz: fd15c0c642948b78d62d5d037165231313d46db3
4
+ data.tar.gz: 27533d22f692b1a5eb82ac95a7bd42107833ec50
5
5
  SHA512:
6
- metadata.gz: 8207ca6773734a3df364812c61516b108f47b60e7e7839f4acbaa61ad3d3f035d4e5e1273420bf58bee944809e0be6a60babcfdb9aed36d170c61bbe8e598cc1
7
- data.tar.gz: b0756d5ba461c485ad6aaaf2fc7ba28861ebc4c204b262769c7d8ba5c39792fa543b41fb37395ce9e57380bb4c2388a79f66c035089c1d43a57dcf4adf2655fa
6
+ metadata.gz: f5b173eea4feaadf84ec0c466b201d4a91253c64b83b2abe47f36555a92eac7fafb116e9692c7cc80bdebd55e434b8645ffdf56f4f650cc11f0b357e1ce0d824
7
+ data.tar.gz: 60c2871f475e7e2c9f2d85a2ce510cae73890ba329759b0c7bb200c29e8b05f0c3b14f6281209738a900606a814b9198069434978a2ce522aa3abdd15e93aa63
data/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## v3.3.3 (2015-05-10)
2
+
3
+ New Features
4
+
5
+ - Add support for ingesting Data Access Links from NSIDC JSON
6
+
7
+
8
+ ## v3.3.2
9
+
10
+ Bugfix
11
+
12
+ - Added quote checking for cisl offset parsing check
13
+
1
14
  ## v3.3.1
2
15
 
3
16
  Bugfix
@@ -40,40 +40,35 @@
40
40
  :host: localhost
41
41
  :nsidc_dataset_metadata_url: http://integration.nsidc.org/api/dataset/metadata/
42
42
  :nsidc_oai_identifiers_url: http://integration.nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
43
- :oai_url: http://liquid.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
44
43
 
45
44
  :dev:
46
- :host: dev.search-solr.apps.int.nsidc.org
47
- :nsidc_dataset_metadata_url: http://integration.nsidc.org/api/dataset/metadata/
48
- :nsidc_oai_identifiers_url: http://integration.nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
49
- :oai_url: http://liquid.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
45
+ ## For the below, you'll need to instantiate your own search-solr instance, and point host to that.
46
+ :host: dev.search-solr.USERNAME.dev.int.nsidc.org
47
+ ## For these, either set up your own instance of dataset serach catalog or change it to point to integration
48
+ :nsidc_dataset_metadata_url: http://dev.dcs.USERNAME.dev.int.nsidc.org:1580/api/dataset/metadata/
49
+ :nsidc_oai_identifiers_url: http://dev.dcs.USERNAME.dev.int.nsidc.org:1580/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
50
50
 
51
51
  :integration:
52
52
  :host: integration.search-solr.apps.int.nsidc.org
53
53
  :nsidc_dataset_metadata_url: http://integration.nsidc.org/api/dataset/metadata/
54
54
  :nsidc_oai_identifiers_url: http://integration.nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
55
- :oai_url: http://liquid.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
56
55
 
57
56
  :qa:
58
57
  :host: qa.search-solr.apps.int.nsidc.org
59
58
  :nsidc_dataset_metadata_url: http://qa.nsidc.org/api/dataset/metadata/
60
59
  :nsidc_oai_identifiers_url: http://qa.nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
61
- :oai_url: http://brash.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
62
60
 
63
61
  :staging:
64
62
  :host: staging.search-solr.apps.int.nsidc.org
65
63
  :nsidc_dataset_metadata_url: http://staging.nsidc.org/api/dataset/metadata/
66
64
  :nsidc_oai_identifiers_url: http://staging.nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
67
- :oai_url: http://freeze.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
68
65
 
69
66
  :blue:
70
67
  :host: blue.search-solr.apps.int.nsidc.org
71
68
  :nsidc_dataset_metadata_url: http://nsidc.org/api/dataset/metadata/
72
69
  :nsidc_oai_identifiers_url: http://nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
73
- :oai_url: http://frozen.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
74
70
 
75
71
  :production:
76
72
  :host: search-solr.apps.int.nsidc.org
77
73
  :nsidc_dataset_metadata_url: http://nsidc.org/api/dataset/metadata/
78
74
  :nsidc_oai_identifiers_url: http://nsidc.org/api/dataset/metadata/oai?verb=ListIdentifiers&metadata_prefix=iso
79
- :oai_url: http://frozen.colorado.edu:11580/api/dataset/2/oai?verb=ListRecords&metadata_prefix=iso
@@ -46,9 +46,11 @@ module SearchSolrTools
46
46
  'facet_format' => (json_doc['distributionFormats'].empty?) ? [Helpers::SolrFormat::NOT_SPECIFIED] : translate_format_to_facet_format(json_doc['distributionFormats']),
47
47
  'source' => %w(NSIDC ADE),
48
48
  'popularity' => json_doc['popularity'],
49
+ 'data_access_urls' => translate_data_access_urls(json_doc['dataAccessLinks']),
49
50
  'facet_sponsored_program' => translate_short_long_names_to_facet_value(json_doc['internalDataCenters']),
50
51
  'facet_temporal_resolution' => translate_temporal_resolution_facet_values(json_doc['parameters']),
51
- 'facet_spatial_resolution' => translate_spatial_resolution_facet_values(json_doc['parameters'])
52
+ 'facet_spatial_resolution' => translate_spatial_resolution_facet_values(json_doc['parameters']),
53
+ 'sponsored_programs' => translate_internal_datacenters(json_doc['internalDataCenters'])
52
54
  )
53
55
  end
54
56
  # rubocop:enable Metrics/MethodLength
@@ -98,6 +100,30 @@ module SearchSolrTools
98
100
  iso_topic_categories_json.map { |t| t['name'] } unless iso_topic_categories_json.nil?
99
101
  end
100
102
 
103
+ def translate_data_access_urls(json)
104
+ values = []
105
+ return values if json.nil?
106
+ json.each do |json_entry|
107
+ link_display = json_entry['displayText'].nil? ? '' : json_entry['displayText']
108
+ link_type = json_entry['type'].nil? ? '' : json_entry['type']
109
+ link_uri = json_entry['uri'].nil? ? '' : json_entry['uri']
110
+ link_desc = json_entry['description'].nil? ? '' : json_entry['description']
111
+
112
+ values << "#{link_display} | #{link_type} | #{link_uri} | #{link_desc}"
113
+ end
114
+ values
115
+ end
116
+
117
+ def translate_internal_datacenters(json)
118
+ values = []
119
+ return values if json.nil?
120
+ json.each do |json_entry|
121
+ short_name = json_entry['shortName'].nil? ? '' : json_entry['shortName']
122
+ values << short_name
123
+ end
124
+ values
125
+ end
126
+
101
127
  def translate_short_long_names_to_facet_value(json)
102
128
  facet_values = []
103
129
  return facet_values if json.nil?
@@ -1,3 +1,3 @@
1
1
  module SearchSolrTools
2
- VERSION = '3.5.1'
2
+ VERSION = '3.7.0'
3
3
  end
@@ -42,4 +42,5 @@ Gem::Specification.new do |spec|
42
42
  spec.add_development_dependency 'rspec', '~> 3.2'
43
43
  spec.add_development_dependency 'rubocop', '~> 0.32'
44
44
  spec.add_development_dependency 'webmock', '~> 1.13'
45
+ spec.add_development_dependency 'listen', '3.0.5'
45
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_solr_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Chalstrom
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2016-02-15 00:00:00.000000000 Z
15
+ date: 2016-05-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: iso8601
@@ -252,6 +252,20 @@ dependencies:
252
252
  - - "~>"
253
253
  - !ruby/object:Gem::Version
254
254
  version: '1.13'
255
+ - !ruby/object:Gem::Dependency
256
+ name: listen
257
+ requirement: !ruby/object:Gem::Requirement
258
+ requirements:
259
+ - - '='
260
+ - !ruby/object:Gem::Version
261
+ version: 3.0.5
262
+ type: :development
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ requirements:
266
+ - - '='
267
+ - !ruby/object:Gem::Version
268
+ version: 3.0.5
255
269
  description: |2
256
270
  Ruby translators to transform various metadata feeds into solr documents and
257
271
  a command-line utility to access/utilize the gem's translators to harvest