geoblacklight 3.7.0 → 4.0.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +75 -28
  3. data/.gitignore +0 -1
  4. data/.rubocop.yml +5 -1
  5. data/.solr_wrapper +0 -1
  6. data/app/assets/images/blacklight/michigan-state-university.svg +1 -0
  7. data/app/assets/images/blacklight/pennsylvania-state-university.svg +1 -0
  8. data/app/assets/images/blacklight/purdue-university.svg +1 -0
  9. data/app/assets/images/blacklight/the-ohio-state-university.svg +1 -0
  10. data/app/assets/images/blacklight/university-of-chicago.svg +1 -0
  11. data/app/assets/images/blacklight/university-of-illinois-urbana-champaign.svg +1 -0
  12. data/app/assets/images/blacklight/university-of-iowa.svg +1 -0
  13. data/app/assets/images/blacklight/university-of-maryland.svg +1 -0
  14. data/app/assets/images/blacklight/university-of-michigan.svg +1 -0
  15. data/app/assets/images/blacklight/university-of-minnesota.svg +1 -0
  16. data/app/assets/images/blacklight/university-of-nebraska-lincoln.svg +1 -0
  17. data/app/assets/images/blacklight/university-of-wisconsin-madison.svg +1 -0
  18. data/app/assets/javascripts/geoblacklight/viewers/tms.js +2 -2
  19. data/app/assets/javascripts/geoblacklight/viewers/wms.js +2 -2
  20. data/app/models/concerns/geoblacklight/solr_document/citation.rb +2 -2
  21. data/app/models/concerns/geoblacklight/solr_document.rb +4 -4
  22. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  23. data/app/views/catalog/_header_icons.html.erb +1 -1
  24. data/app/views/catalog/_home_text.html.erb +2 -2
  25. data/app/views/relation/_relations.html.erb +15 -0
  26. data/app/views/relation/index.html.erb +4 -16
  27. data/app/views/relation/index.json.jbuilder +6 -2
  28. data/config/initializers/rails_config.rb +0 -8
  29. data/config/locales/geoblacklight.en.yml +8 -3
  30. data/geoblacklight.gemspec +1 -2
  31. data/lib/generators/geoblacklight/assets_generator.rb +1 -1
  32. data/lib/generators/geoblacklight/templates/catalog_controller.rb +78 -36
  33. data/lib/generators/geoblacklight/templates/settings.gbl_v1.yml +195 -0
  34. data/lib/generators/geoblacklight/templates/settings.yml +81 -25
  35. data/lib/geoblacklight/constants.rb +0 -3
  36. data/lib/geoblacklight/download/geojson_download.rb +1 -1
  37. data/lib/geoblacklight/download/geotiff_download.rb +1 -1
  38. data/lib/geoblacklight/download/hgl_download.rb +1 -1
  39. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  40. data/lib/geoblacklight/download/shapefile_download.rb +1 -1
  41. data/lib/geoblacklight/engine.rb +2 -4
  42. data/lib/geoblacklight/item_viewer.rb +1 -13
  43. data/lib/geoblacklight/references.rb +1 -1
  44. data/lib/geoblacklight/relation/ancestors.rb +4 -3
  45. data/lib/geoblacklight/relation/descendants.rb +4 -3
  46. data/lib/geoblacklight/relation/relation_response.rb +21 -6
  47. data/lib/geoblacklight/version.rb +1 -1
  48. data/schema/{geoblacklight-schema.json → geoblacklight-schema-1.0.json} +1 -1
  49. data/schema/geoblacklight-schema-aardvark.json +211 -0
  50. data/solr/conf/schema.xml +38 -30
  51. data/solr/conf/solrconfig.xml +18 -18
  52. data/spec/components/geoblacklight/homepage_feature_facet_component_spec.rb +1 -1
  53. data/spec/config/initializers/rails_config_spec.rb +5 -8
  54. data/spec/controllers/catalog_controller_spec.rb +6 -6
  55. data/spec/features/download_layer_spec.rb +1 -1
  56. data/spec/features/esri_viewer_spec.rb +0 -1
  57. data/spec/features/home_page_spec.rb +4 -4
  58. data/spec/features/missing_metadata_spec.rb +2 -2
  59. data/spec/features/relations_spec.rb +2 -2
  60. data/spec/features/search_results_map_spec.rb +2 -1
  61. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  62. data/spec/features/split_view.html.erb_spec.rb +16 -12
  63. data/spec/features/tms_spec.rb +1 -1
  64. data/spec/features/web_services_modal_spec.rb +0 -33
  65. data/spec/fixtures/solr_documents/README.md +48 -36
  66. data/spec/fixtures/solr_documents/actual-papermap1.json +41 -18
  67. data/spec/fixtures/solr_documents/actual-point1.json +47 -27
  68. data/spec/fixtures/solr_documents/actual-polygon1.json +43 -18
  69. data/spec/fixtures/solr_documents/actual-raster1.json +52 -23
  70. data/spec/fixtures/solr_documents/all-relationships.json +48 -0
  71. data/spec/fixtures/solr_documents/baruch_ancestor1.json +62 -37
  72. data/spec/fixtures/solr_documents/baruch_ancestor2.json +62 -37
  73. data/spec/fixtures/solr_documents/baruch_documentation_download.json +60 -34
  74. data/spec/fixtures/solr_documents/bbox-spans-180.json +34 -16
  75. data/spec/fixtures/solr_documents/cornell_html_metadata.json +46 -26
  76. data/spec/fixtures/solr_documents/esri-dynamic-layer-all-layers.json +43 -25
  77. data/spec/fixtures/solr_documents/esri-dynamic-layer-single-layer.json +45 -28
  78. data/spec/fixtures/solr_documents/esri-feature-layer.json +44 -34
  79. data/spec/fixtures/solr_documents/esri-image-map-layer.json +45 -31
  80. data/spec/fixtures/solr_documents/esri-tiled_map_layer.json +42 -17
  81. data/spec/fixtures/solr_documents/esri-wms-layer.json +46 -21
  82. data/spec/fixtures/solr_documents/harvard_raster.json +55 -36
  83. data/spec/fixtures/solr_documents/iiif-eastern-hemisphere.json +35 -22
  84. data/spec/fixtures/solr_documents/index-map-polygon-no-downloadurl.json +48 -27
  85. data/spec/fixtures/solr_documents/index-map-polygon.json +48 -27
  86. data/spec/fixtures/solr_documents/index-map-stanford.json +54 -25
  87. data/spec/fixtures/solr_documents/index_map_point.json +54 -26
  88. data/spec/fixtures/solr_documents/metadata_no_geom.json +27 -0
  89. data/spec/fixtures/solr_documents/metadata_no_provider.json +39 -0
  90. data/spec/fixtures/solr_documents/multiple-downloads.json +33 -20
  91. data/spec/fixtures/solr_documents/no_locn_geometry.json +25 -0
  92. data/spec/fixtures/solr_documents/no_spatial.json +37 -19
  93. data/spec/fixtures/solr_documents/oembed.json +34 -17
  94. data/spec/fixtures/solr_documents/princeton-child1.json +45 -28
  95. data/spec/fixtures/solr_documents/princeton-child2.json +45 -28
  96. data/spec/fixtures/solr_documents/princeton-child3.json +45 -28
  97. data/spec/fixtures/solr_documents/princeton-child4.json +45 -28
  98. data/spec/fixtures/solr_documents/princeton-parent.json +46 -23
  99. data/spec/fixtures/solr_documents/public_direct_download.json +48 -21
  100. data/spec/fixtures/solr_documents/public_iiif_princeton.json +49 -24
  101. data/spec/fixtures/solr_documents/public_polygon_mit.json +31 -15
  102. data/spec/fixtures/solr_documents/restricted-line.json +52 -21
  103. data/spec/fixtures/solr_documents/the-related-record.json +27 -0
  104. data/spec/fixtures/solr_documents/tms.json +33 -17
  105. data/spec/fixtures/solr_documents/umn_metro_result1.json +44 -28
  106. data/spec/fixtures/solr_documents/umn_state_result1.json +44 -26
  107. data/spec/fixtures/solr_documents/umn_state_result2.json +45 -24
  108. data/spec/fixtures/solr_documents/uva_slug_colon.json +43 -20
  109. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +1 -1
  110. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +1 -1
  111. data/spec/lib/geoblacklight/download/hgl_download_spec.rb +1 -1
  112. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +1 -1
  113. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +1 -1
  114. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  115. data/spec/lib/geoblacklight/references_spec.rb +2 -2
  116. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +3 -3
  117. data/spec/lib/geoblacklight/relation/descendants_spec.rb +3 -3
  118. data/spec/lib/geoblacklight/relation/relation_response_spec.rb +32 -17
  119. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +4 -4
  120. data/spec/spec_helper.rb +0 -4
  121. data/spec/views/catalog/_results_pagination.html.erb_spec.rb +1 -1
  122. data/spec/views/catalog/_show_downloads.html.erb_spec.rb +1 -1
  123. metadata +22 -63
  124. data/app/assets/javascripts/geoblacklight/viewers/tilejson.js +0 -33
  125. data/app/assets/javascripts/geoblacklight/viewers/wmts.js +0 -85
  126. data/app/assets/javascripts/geoblacklight/viewers/xyz.js +0 -10
  127. data/app/views/relation/_ancestors.html.erb +0 -8
  128. data/app/views/relation/_descendants.html.erb +0 -15
  129. data/config/initializers/new_gbl_settings_defaults_3_3.yml +0 -10
  130. data/schema/format-values.md +0 -50
  131. data/schema/geoblacklight-schema-deprecated.md +0 -39
  132. data/schema/geoblacklight-schema.md +0 -323
  133. data/schema/geometry-type-values.md +0 -11
  134. data/schema/references.md +0 -23
  135. data/schema/schema-commentary.md +0 -198
  136. data/schema/subjects.md +0 -41
  137. data/schema/type-values.md +0 -10
  138. data/spec/features/tilejson_spec.rb +0 -22
  139. data/spec/features/wmts_spec.rb +0 -34
  140. data/spec/features/xyz_spec.rb +0 -10
  141. data/spec/fixtures/manifests/tilejson.json +0 -21
  142. data/spec/fixtures/manifests/wmts-multiple.xml +0 -813
  143. data/spec/fixtures/manifests/wmts-single.xml +0 -126
  144. data/spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json +0 -30
  145. data/spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json +0 -17
  146. data/spec/fixtures/solr_documents/metadata_no_solr_geom.json +0 -23
  147. data/spec/fixtures/solr_documents/tilejson.json +0 -38
  148. data/spec/fixtures/solr_documents/wmts-multiple.json +0 -32
  149. data/spec/fixtures/solr_documents/wmts-single-layer.json +0 -38
  150. data/spec/fixtures/solr_documents/xyz.json +0 -29
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::KmzDownload do
5
- let(:document) { SolrDocument.new(Settings.FIELDS.UNIQUE_KEY => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.GEOMETRY => 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a KmzDownload object with specific options' do
@@ -2,7 +2,7 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::ShapefileDownload do
5
- let(:document) { SolrDocument.new(layer_slug_s: 'test', solr_wfs_url: 'http://www.example.com/wfs', layer_id_s: 'stanford-test', solr_geom: 'ENVELOPE(-180, 180, 90, -90)') }
5
+ let(:document) { SolrDocument.new(Settings.FIELDS.ID => 'test', solr_wfs_url: 'http://www.example.com/wfs', Settings.FIELDS.WXS_IDENTIFIER => 'stanford-test', Settings.FIELDS.SPATIAL_EXTENT => 'ENVELOPE(-180, 180, 90, -90)') }
6
6
  let(:download) { described_class.new(document) }
7
7
  describe '#initialize' do
8
8
  it 'initializes as a ShapefileDownload object with specific options' do
@@ -7,7 +7,7 @@ describe Geoblacklight::Download do
7
7
  let(:faraday_connection) { instance_double(Faraday::Connection) }
8
8
  let(:faraday_response) { instance_double(Faraday::Response) }
9
9
  let(:references_field) { Settings.FIELDS.REFERENCES }
10
- let(:document) { SolrDocument.new("#{Settings.FIELDS.UNIQUE_KEY}": 'test', references_field => { 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://www.example.com/wms' }.to_json) }
10
+ let(:document) { SolrDocument.new("#{Settings.FIELDS.ID}": 'test', references_field => { 'http://www.opengis.net/def/serviceType/ogc/wms' => 'http://www.example.com/wms' }.to_json) }
11
11
  let(:options) { { type: 'shapefile', extension: 'zip', service_type: 'wms', content_type: 'application/zip' } }
12
12
 
13
13
  describe '#initialize' do
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::References do
5
5
  let(:references_field) { Settings.FIELDS.REFERENCES }
6
- let(:file_format_field) { Settings.FIELDS.FILE_FORMAT }
6
+ let(:file_format_field) { Settings.FIELDS.FORMAT }
7
7
  let(:typical_ogp_shapefile) do
8
8
  described_class.new(
9
9
  SolrDocument.new(
@@ -135,7 +135,7 @@ describe Geoblacklight::References do
135
135
  let(:settings_klass) { class_double('Settings').as_stubbed_const }
136
136
  before do
137
137
  allow(settings_klass).to receive(:METADATA_SHOWN).and_return %w[iso19139 mods]
138
- allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(FILE_FORMAT: 'dc_format_s')
138
+ allow(settings_klass).to receive(:FIELDS).and_return OpenStruct.new(FORMAT: 'dc_format_s')
139
139
  end
140
140
  it 'is ordered by the configuration' do
141
141
  expect(complex_shapefile.shown_metadata_refs.first.type.to_s).to eq 'iso19139'
@@ -3,12 +3,12 @@ require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::Relation::Ancestors do
5
5
  let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
6
- let(:ancestors) { described_class.new('nyu_2451_34502', repository) }
7
- let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
6
+ let(:ancestors) { described_class.new('nyu_2451_34502', Settings.FIELDS.SOURCE, repository) }
7
+ let(:empty_ancestors) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
8
8
 
9
9
  describe '#create_search_params' do
10
10
  it 'assembles the correct search params for finding ancestor documents' do
11
- expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.UNIQUE_KEY}}#{Settings.FIELDS.UNIQUE_KEY}:nyu_2451_34502"], fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.UNIQUE_KEY, Settings.FIELDS.GEOM_TYPE])
11
+ expect(ancestors.create_search_params).to eq(fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.ID}}#{Settings.FIELDS.ID}:nyu_2451_34502"], fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
12
12
  end
13
13
  end
14
14
 
@@ -3,12 +3,12 @@ require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::Relation::Descendants do
5
5
  let(:repository) { Blacklight::Solr::Repository.new(CatalogController.blacklight_config) }
6
- let(:descendants) { described_class.new('nyu_2451_34636', repository) }
7
- let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', repository) }
6
+ let(:descendants) { described_class.new('nyu_2451_34636', Settings.FIELDS.SOURCE, repository) }
7
+ let(:empty_descendants) { described_class.new('harvard-g7064-s2-1834-k3', Settings.FIELDS.SOURCE, repository) }
8
8
 
9
9
  describe '#create_search_params' do
10
10
  it 'assembles the correct search params for finding descendant documents' do
11
- expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.UNIQUE_KEY, Settings.FIELDS.GEOM_TYPE])
11
+ expect(descendants.create_search_params).to eq(fq: "#{Settings.FIELDS.SOURCE}:nyu_2451_34636", fl: [Settings.FIELDS.TITLE.to_s, Settings.FIELDS.ID, Settings.FIELDS.RESOURCE_TYPE])
12
12
  end
13
13
  end
14
14
 
@@ -11,34 +11,49 @@ describe Geoblacklight::Relation::RelationResponse do
11
11
  end
12
12
  end
13
13
 
14
- describe '#ancestors' do
14
+ describe '#method_missing' do
15
15
  it 'returns a hash of ancestor documents' do
16
- expect(relation_resp.ancestors).to include('numFound')
17
- expect(relation_resp.ancestors).to include('docs')
16
+ expect(relation_resp.SOURCE_ANCESTORS).to include('numFound')
17
+ expect(relation_resp.SOURCE_ANCESTORS).to include('docs')
18
18
  end
19
- end
20
19
 
21
- describe '#descendants' do
22
20
  it 'returns a hash of descendant documents' do
23
- expect(relation_resp.ancestors).to include('numFound')
24
- expect(relation_resp.ancestors).to include('docs')
21
+ expect(relation_resp.SOURCE_DESCENDANTS).to include('numFound')
22
+ expect(relation_resp.SOURCE_DESCENDANTS).to include('docs')
23
+ end
24
+
25
+ it 'raises no method error' do
26
+ expect { relation_resp.FAIL }.to raise_error NoMethodError
25
27
  end
26
28
  end
27
29
 
28
- describe '#empty?' do
29
- it 'returns false if document has ancestors or descendants' do
30
- expect(relation_resp.empty?).to be false
30
+ describe '#respond_to_missing?' do
31
+ it 'returns true for configured relationships' do
32
+ Settings.RELATIONSHIPS_SHOWN.each_key do |key|
33
+ expect(relation_resp).to respond_to(key)
34
+ end
31
35
  end
32
- it 'returns true if document has neither ancestors nor descendants' do
33
- expect(empty_relation_resp.empty?).to be true
36
+
37
+ it 'returns false for non-configured options' do
38
+ expect(relation_resp).not_to respond_to('fail')
34
39
  end
40
+ end
35
41
 
36
- context 'with a layer slug containing a colon' do
37
- let(:empty_relation_resp) { described_class.new('uva-Norfolk:police_point', repository) }
42
+ describe '#query_type' do
43
+ it 'fails for a bad query type request' do
44
+ Settings.add_source!({
45
+ RELATIONSHIPS_SHOWN: {
46
+ BAD: {
47
+ field: 'dct_source_sm',
48
+ query_type: 'bad_query_type',
49
+ icon: 'pagelines-brands',
50
+ label: 'geoblacklight.relations.ancestor'
51
+ }
52
+ }
53
+ })
54
+ Settings.reload!
38
55
 
39
- it 'returns true if document has neither ancestors nor descendants' do
40
- expect(empty_relation_resp.empty?).to be true
41
- end
56
+ expect { relation_resp.BAD }.to raise_error(ArgumentError)
42
57
  end
43
58
  end
44
59
  end
@@ -3,8 +3,8 @@ require 'spec_helper'
3
3
 
4
4
  describe Geoblacklight::SolrDocument do
5
5
  let(:document) { SolrDocument.new(document_attributes) }
6
- let(:rights_field) { Settings.FIELDS.RIGHTS }
7
- let(:provenance_field) { Settings.FIELDS.PROVENANCE }
6
+ let(:rights_field) { Settings.FIELDS.ACCESS_RIGHTS }
7
+ let(:provider_field) { Settings.FIELDS.PROVIDER }
8
8
  let(:references_field) { Settings.FIELDS.REFERENCES }
9
9
  describe '#available?' do
10
10
  let(:document_attributes) { {} }
@@ -80,7 +80,7 @@ describe Geoblacklight::SolrDocument do
80
80
  end
81
81
  describe '#same_institution?' do
82
82
  describe 'within the same institution' do
83
- let(:document_attributes) { { provenance_field => 'STANFORD' } }
83
+ let(:document_attributes) { { provider_field => 'STANFORD' } }
84
84
  it 'is true' do
85
85
  allow(Settings).to receive('Institution').and_return('Stanford')
86
86
  expect(document.same_institution?).to be_truthy
@@ -91,7 +91,7 @@ describe Geoblacklight::SolrDocument do
91
91
  end
92
92
  end
93
93
  describe 'within a different institution' do
94
- let(:document_attributes) { { provenance_field => 'MIT' } }
94
+ let(:document_attributes) { { provider_field => 'MIT' } }
95
95
  it 'is false' do
96
96
  allow(Settings).to receive('Institution').and_return('Stanford')
97
97
  expect(document.same_institution?).to be_falsey
data/spec/spec_helper.rb CHANGED
@@ -30,10 +30,6 @@ require 'capybara/rspec'
30
30
  require 'selenium-webdriver'
31
31
  require 'webdrivers'
32
32
 
33
- # Setup webmock for specific tests
34
- require 'webmock/rspec'
35
- WebMock.allow_net_connect!
36
-
37
33
  Capybara.register_driver(:headless_chrome) do |app|
38
34
  Capybara::Selenium::Driver.load_selenium
39
35
  browser_options = ::Selenium::WebDriver::Chrome::Options.new.tap do |opts|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require 'spec_helper'
3
3
 
4
- describe 'catalog/_results_pagination', type: :view do
4
+ describe 'catalog/_results_pagination.html.erb', type: :view do
5
5
  it 'will have a #pagination wrapping div' do
6
6
  allow(view).to receive_messages(show_pagination?: false)
7
7
  render
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
  require 'spec_helper'
3
3
 
4
- describe 'catalog/_show_downloads', type: :view do
4
+ describe 'catalog/_show_downloads.html.erb', type: :view do
5
5
  context 'document is downloadable' do
6
6
  let(:document) { instance_double(SolrDocument) }
7
7
  before do
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 4.0.0.pre.alpha
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
8
8
  - Darren Hardy
9
9
  - Eliot Jordan
10
10
  - Jack Reed
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-06-23 00:00:00.000000000 Z
14
+ date: 2021-09-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 5.2.4
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: '7.1'
25
+ version: '6.2'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 5.2.4
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: '7.1'
35
+ version: '6.2'
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: blacklight
38
38
  requirement: !ruby/object:Gem::Requirement
@@ -355,20 +355,6 @@ dependencies:
355
355
  - - "~>"
356
356
  - !ruby/object:Gem::Version
357
357
  version: '2.2'
358
- - !ruby/object:Gem::Dependency
359
- name: webmock
360
- requirement: !ruby/object:Gem::Requirement
361
- requirements:
362
- - - "~>"
363
- - !ruby/object:Gem::Version
364
- version: '3.14'
365
- type: :development
366
- prerelease: false
367
- version_requirements: !ruby/object:Gem::Requirement
368
- requirements:
369
- - - "~>"
370
- - !ruby/object:Gem::Version
371
- version: '3.14'
372
358
  description: GeoBlacklight provides a world-class discovery platform for geospatial
373
359
  (GIS) holdings. It is an open collaborative project aiming to build off of the successes
374
360
  of the Blacklight Solr-powered discovery interface and the multi-institutional OpenGeoportal
@@ -507,12 +493,9 @@ files:
507
493
  - app/assets/javascripts/geoblacklight/viewers/index_map.js
508
494
  - app/assets/javascripts/geoblacklight/viewers/map.js
509
495
  - app/assets/javascripts/geoblacklight/viewers/oembed.js
510
- - app/assets/javascripts/geoblacklight/viewers/tilejson.js
511
496
  - app/assets/javascripts/geoblacklight/viewers/tms.js
512
497
  - app/assets/javascripts/geoblacklight/viewers/viewer.js
513
498
  - app/assets/javascripts/geoblacklight/viewers/wms.js
514
- - app/assets/javascripts/geoblacklight/viewers/wmts.js
515
- - app/assets/javascripts/geoblacklight/viewers/xyz.js
516
499
  - app/assets/stylesheets/geoblacklight/geoblacklight.scss
517
500
  - app/assets/stylesheets/geoblacklight/modules/_base.scss
518
501
  - app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss
@@ -588,14 +571,12 @@ files:
588
571
  - app/views/catalog/metadata/_missing.html.erb
589
572
  - app/views/catalog/web_services.html.erb
590
573
  - app/views/download/hgl.html.erb
591
- - app/views/relation/_ancestors.html.erb
592
- - app/views/relation/_descendants.html.erb
574
+ - app/views/relation/_relations.html.erb
593
575
  - app/views/relation/index.html.erb
594
576
  - app/views/relation/index.json.jbuilder
595
577
  - app/views/shared/_header_navbar.html.erb
596
578
  - babel.config.json
597
579
  - bin/coverage.rb
598
- - config/initializers/new_gbl_settings_defaults_3_3.yml
599
580
  - config/initializers/new_gbl_settings_defaults_3_4.yml
600
581
  - config/initializers/rails_config.rb
601
582
  - config/locales/geoblacklight.en.yml
@@ -611,6 +592,7 @@ files:
611
592
  - lib/generators/geoblacklight/templates/assets/geoblacklight.js
612
593
  - lib/generators/geoblacklight/templates/catalog_controller.rb
613
594
  - lib/generators/geoblacklight/templates/package.json
595
+ - lib/generators/geoblacklight/templates/settings.gbl_v1.yml
614
596
  - lib/generators/geoblacklight/templates/settings.yml
615
597
  - lib/generators/geoblacklight/templates/webpacker.yml
616
598
  - lib/generators/geoblacklight/webpacker_generator.rb
@@ -652,15 +634,8 @@ files:
652
634
  - lib/geoblacklight/wms_layer/feature_info_response.rb
653
635
  - lib/tasks/geoblacklight.rake
654
636
  - package.json
655
- - schema/format-values.md
656
- - schema/geoblacklight-schema-deprecated.md
657
- - schema/geoblacklight-schema.json
658
- - schema/geoblacklight-schema.md
659
- - schema/geometry-type-values.md
660
- - schema/references.md
661
- - schema/schema-commentary.md
662
- - schema/subjects.md
663
- - schema/type-values.md
637
+ - schema/geoblacklight-schema-1.0.json
638
+ - schema/geoblacklight-schema-aardvark.json
664
639
  - setupJest.js
665
640
  - solr/conf/_rest_managed.json
666
641
  - solr/conf/admin-extra.html
@@ -716,16 +691,10 @@ files:
716
691
  - spec/features/sms_spec.rb
717
692
  - spec/features/split_view.html.erb_spec.rb
718
693
  - spec/features/suppressed_records_spec.rb
719
- - spec/features/tilejson_spec.rb
720
694
  - spec/features/tms_spec.rb
721
695
  - spec/features/web_services_modal_spec.rb
722
- - spec/features/wmts_spec.rb
723
- - spec/features/xyz_spec.rb
724
696
  - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
725
697
  - spec/fixtures/iso19139/stanford-cg357zz0321.xml
726
- - spec/fixtures/manifests/tilejson.json
727
- - spec/fixtures/manifests/wmts-multiple.xml
728
- - spec/fixtures/manifests/wmts-single.xml
729
698
  - spec/fixtures/mods/fb897vt9938.mods
730
699
  - spec/fixtures/mods/stanford-cg357zz0321.mods
731
700
  - spec/fixtures/solr_documents/README.md
@@ -733,6 +702,7 @@ files:
733
702
  - spec/fixtures/solr_documents/actual-point1.json
734
703
  - spec/fixtures/solr_documents/actual-polygon1.json
735
704
  - spec/fixtures/solr_documents/actual-raster1.json
705
+ - spec/fixtures/solr_documents/all-relationships.json
736
706
  - spec/fixtures/solr_documents/baruch_ancestor1.json
737
707
  - spec/fixtures/solr_documents/baruch_ancestor2.json
738
708
  - spec/fixtures/solr_documents/baruch_documentation_download.json
@@ -750,10 +720,10 @@ files:
750
720
  - spec/fixtures/solr_documents/index-map-polygon.json
751
721
  - spec/fixtures/solr_documents/index-map-stanford.json
752
722
  - spec/fixtures/solr_documents/index_map_point.json
753
- - spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json
754
- - spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json
755
- - spec/fixtures/solr_documents/metadata_no_solr_geom.json
723
+ - spec/fixtures/solr_documents/metadata_no_geom.json
724
+ - spec/fixtures/solr_documents/metadata_no_provider.json
756
725
  - spec/fixtures/solr_documents/multiple-downloads.json
726
+ - spec/fixtures/solr_documents/no_locn_geometry.json
757
727
  - spec/fixtures/solr_documents/no_spatial.json
758
728
  - spec/fixtures/solr_documents/oembed.json
759
729
  - spec/fixtures/solr_documents/princeton-child1.json
@@ -765,15 +735,12 @@ files:
765
735
  - spec/fixtures/solr_documents/public_iiif_princeton.json
766
736
  - spec/fixtures/solr_documents/public_polygon_mit.json
767
737
  - spec/fixtures/solr_documents/restricted-line.json
768
- - spec/fixtures/solr_documents/tilejson.json
738
+ - spec/fixtures/solr_documents/the-related-record.json
769
739
  - spec/fixtures/solr_documents/tms.json
770
740
  - spec/fixtures/solr_documents/umn_metro_result1.json
771
741
  - spec/fixtures/solr_documents/umn_state_result1.json
772
742
  - spec/fixtures/solr_documents/umn_state_result2.json
773
743
  - spec/fixtures/solr_documents/uva_slug_colon.json
774
- - spec/fixtures/solr_documents/wmts-multiple.json
775
- - spec/fixtures/solr_documents/wmts-single-layer.json
776
- - spec/fixtures/solr_documents/xyz.json
777
744
  - spec/helpers/arcgis_helper_spec.rb
778
745
  - spec/helpers/carto_helper_spec.rb
779
746
  - spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
@@ -850,7 +817,7 @@ homepage: http://github.com/geoblacklight/geoblacklight
850
817
  licenses:
851
818
  - Apache 2.0
852
819
  metadata: {}
853
- post_install_message:
820
+ post_install_message:
854
821
  rdoc_options: []
855
822
  require_paths:
856
823
  - lib
@@ -865,8 +832,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
865
832
  - !ruby/object:Gem::Version
866
833
  version: 2.5.2
867
834
  requirements: []
868
- rubygems_version: 3.2.32
869
- signing_key:
835
+ rubygems_version: 3.2.15
836
+ signing_key:
870
837
  specification_version: 4
871
838
  summary: A discovery platform for geospatial holdings
872
839
  test_files:
@@ -907,16 +874,10 @@ test_files:
907
874
  - spec/features/sms_spec.rb
908
875
  - spec/features/split_view.html.erb_spec.rb
909
876
  - spec/features/suppressed_records_spec.rb
910
- - spec/features/tilejson_spec.rb
911
877
  - spec/features/tms_spec.rb
912
878
  - spec/features/web_services_modal_spec.rb
913
- - spec/features/wmts_spec.rb
914
- - spec/features/xyz_spec.rb
915
879
  - spec/fixtures/fgdc/harvard-g7064-s2-1834-k3.xml
916
880
  - spec/fixtures/iso19139/stanford-cg357zz0321.xml
917
- - spec/fixtures/manifests/tilejson.json
918
- - spec/fixtures/manifests/wmts-multiple.xml
919
- - spec/fixtures/manifests/wmts-single.xml
920
881
  - spec/fixtures/mods/fb897vt9938.mods
921
882
  - spec/fixtures/mods/stanford-cg357zz0321.mods
922
883
  - spec/fixtures/solr_documents/README.md
@@ -924,6 +885,7 @@ test_files:
924
885
  - spec/fixtures/solr_documents/actual-point1.json
925
886
  - spec/fixtures/solr_documents/actual-polygon1.json
926
887
  - spec/fixtures/solr_documents/actual-raster1.json
888
+ - spec/fixtures/solr_documents/all-relationships.json
927
889
  - spec/fixtures/solr_documents/baruch_ancestor1.json
928
890
  - spec/fixtures/solr_documents/baruch_ancestor2.json
929
891
  - spec/fixtures/solr_documents/baruch_documentation_download.json
@@ -941,10 +903,10 @@ test_files:
941
903
  - spec/fixtures/solr_documents/index-map-polygon.json
942
904
  - spec/fixtures/solr_documents/index-map-stanford.json
943
905
  - spec/fixtures/solr_documents/index_map_point.json
944
- - spec/fixtures/solr_documents/metadata_no_dct_provenance_s.json
945
- - spec/fixtures/solr_documents/metadata_no_layer_geom_type_s.json
946
- - spec/fixtures/solr_documents/metadata_no_solr_geom.json
906
+ - spec/fixtures/solr_documents/metadata_no_geom.json
907
+ - spec/fixtures/solr_documents/metadata_no_provider.json
947
908
  - spec/fixtures/solr_documents/multiple-downloads.json
909
+ - spec/fixtures/solr_documents/no_locn_geometry.json
948
910
  - spec/fixtures/solr_documents/no_spatial.json
949
911
  - spec/fixtures/solr_documents/oembed.json
950
912
  - spec/fixtures/solr_documents/princeton-child1.json
@@ -956,15 +918,12 @@ test_files:
956
918
  - spec/fixtures/solr_documents/public_iiif_princeton.json
957
919
  - spec/fixtures/solr_documents/public_polygon_mit.json
958
920
  - spec/fixtures/solr_documents/restricted-line.json
959
- - spec/fixtures/solr_documents/tilejson.json
921
+ - spec/fixtures/solr_documents/the-related-record.json
960
922
  - spec/fixtures/solr_documents/tms.json
961
923
  - spec/fixtures/solr_documents/umn_metro_result1.json
962
924
  - spec/fixtures/solr_documents/umn_state_result1.json
963
925
  - spec/fixtures/solr_documents/umn_state_result2.json
964
926
  - spec/fixtures/solr_documents/uva_slug_colon.json
965
- - spec/fixtures/solr_documents/wmts-multiple.json
966
- - spec/fixtures/solr_documents/wmts-single-layer.json
967
- - spec/fixtures/solr_documents/xyz.json
968
927
  - spec/helpers/arcgis_helper_spec.rb
969
928
  - spec/helpers/carto_helper_spec.rb
970
929
  - spec/helpers/geoblacklight/geoblacklight_helper_behavior_spec.rb
@@ -1,33 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Tilejson = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- fetch(this.data.url).then(function(response) {
8
- if (!response.ok) {
9
- throw new Error("Unable to fetch tile.json document");
10
- }
11
- return response.json();
12
- }).then(function(tilejson) {
13
- var bounds = _this.getBounds(tilejson),
14
- options = bounds ? { bounds: bounds } : {},
15
- url = tilejson.tiles[0],
16
- tileJsonLayer = L.tileLayer(url, options);
17
- _this.overlay.addLayer(tileJsonLayer);
18
- }).catch(function(error) {
19
- console.debug(error);
20
- });
21
- },
22
-
23
- getBounds: function(doc) {
24
- // Get the bounds from the document, if they exist, and
25
- // convert to a Leaflet latlngBounds object
26
- var bounds = doc.bounds;
27
- if(bounds) {
28
- var corner1 = L.latLng(bounds[1], bounds[0]),
29
- corner2 = L.latLng(bounds[3], bounds[2]);
30
- return L.latLngBounds(corner1, corner2);
31
- }
32
- }
33
- });
@@ -1,85 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Wmts = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- fetch(this.data.url).then(function(response) {
8
- if (!response.ok) {
9
- throw new Error("Unable to fetch WMTSCapabilities document");
10
- }
11
- return response.text();
12
- }).then(function(wmtsCapabilities) {
13
- var tileInfo = _this.parseCapabilities(wmtsCapabilities),
14
- options = tileInfo.bounds ? { bounds: tileInfo.bounds } : {},
15
- tileLayer = L.tileLayer(tileInfo.url, options);
16
- _this.overlay.addLayer(tileLayer);
17
- }).catch(function(error) {
18
- console.debug(error);
19
- });
20
- },
21
-
22
- parseCapabilities: function(wmtsCapabilities) {
23
- var parser = new DOMParser(),
24
- doc = parser.parseFromString(wmtsCapabilities, "application/xml"),
25
- layers = doc.getElementsByTagName("Layer"),
26
- selectedLayer = this.findLayer(layers),
27
- resourceElement = selectedLayer.getElementsByTagName("ResourceURL")[0];
28
-
29
- // Generate URL with Leaflet.TileLayer URL template formatting
30
- var tileURL = resourceElement.getAttribute("template")
31
- .replace("{Style}", this.getStyle(selectedLayer))
32
- .replace("{TileMatrixSet}", this.getTileMatrixSet(selectedLayer))
33
- .replace("TileMatrix", "z")
34
- .replace("TileCol","x")
35
- .replace("TileRow","y");
36
-
37
- return { url: tileURL, bounds: this.getBounds(selectedLayer) };
38
- },
39
-
40
- findLayer: function(layers) {
41
- if (layers.length === 1) {
42
- // If there is only one layer in the document, return it
43
- return layers[0];
44
- } else {
45
- // Search each layer for an identifier that matches the
46
- // layerId and return it
47
- for (i = 0; i < layers.length; i++) {
48
- var ids = layers[i].getElementsByTagName("ows:Identifier");
49
- for(x = 0; x < ids.length; x++) {
50
- if (ids[x].textContent === this.data.layerId) {
51
- return layers[i];
52
- }
53
- }
54
- }
55
- }
56
- },
57
-
58
- getStyle: function(layer) {
59
- var styleElement = layer.getElementsByTagName("Style")[0];
60
- if(styleElement) {
61
- return styleElement.getElementsByTagName("ows:Identifier")[0].textContent;
62
- }
63
- },
64
-
65
- getTileMatrixSet: function(layer) {
66
- var tileMatrixElement = layer.getElementsByTagName("TileMatrixSet")[0];
67
- if(tileMatrixElement) {
68
- return tileMatrixElement.textContent;
69
- }
70
- },
71
-
72
- getBounds: function(layer) {
73
- // Get the layer's lower corner and upper corner values,
74
- // if they exist, and convert to a Leaflet latlngBounds object
75
- var lcElement = layer.getElementsByTagName("ows:LowerCorner")[0],
76
- ucElement = layer.getElementsByTagName("ows:UpperCorner")[0];
77
- if(lcElement && ucElement) {
78
- var lc = lcElement.textContent.split(" "),
79
- uc = ucElement.textContent.split(" "),
80
- corner1 = L.latLng(lc[1], lc[0]),
81
- corner2 = L.latLng(uc[1], uc[0]);
82
- return L.latLngBounds(corner1, corner2);
83
- }
84
- }
85
- });
@@ -1,10 +0,0 @@
1
- //= require geoblacklight/viewers/wms
2
-
3
- GeoBlacklight.Viewer.Xyz = GeoBlacklight.Viewer.Wms.extend({
4
-
5
- addPreviewLayer: function() {
6
- var _this = this;
7
- var xyzLayer = L.tileLayer(this.data.url);
8
- this.overlay.addLayer(xyzLayer);
9
- }
10
- });
@@ -1,8 +0,0 @@
1
- <% @relations.ancestors['docs'].each do |ancestor| %>
2
- <li class="list-group-item border-bottom-0">
3
- <%= link_to solr_document_path(ancestor[Settings.FIELDS.UNIQUE_KEY]) do %>
4
- <%= relations_icon(ancestor, 'pagelines-brands') %>
5
- <%= ancestor[Settings.FIELDS.TITLE] %>
6
- <% end %>
7
- </li>
8
- <% end %>
@@ -1,15 +0,0 @@
1
- <% @relations.descendants['docs'][0..2].each do |descendant| %>
2
- <li class="list-group-item border-bottom-0">
3
- <%= link_to solr_document_path(descendant[Settings.FIELDS.UNIQUE_KEY]) do %>
4
- <%= relations_icon(descendant, 'leaf') %>
5
- <%= descendant[Settings.FIELDS.TITLE] %>
6
- <% end %>
7
- </li>
8
- <% end %>
9
- <% unless (@relations.descendants['numFound'].to_i <= 3) %>
10
- <li class="list-group-item border-bottom-0">
11
- <%= link_to search_catalog_path({f: {"#{Settings.FIELDS.SOURCE}" => [@relations.link_id]}}) do %>
12
- <%= t('geoblacklight.relations.browse_all', count: @relations.descendants['numFound']) %>
13
- <% end %>
14
- </li>
15
- <% end %>
@@ -1,10 +0,0 @@
1
- # New GeoBlacklight v3.3 Solr field mappings
2
- FIELDS:
3
- :IDENTIFIER: 'dc_identifier_s'
4
- :LANGUAGE: 'dc_language_s'
5
- :LAYER_MODIFIED: 'layer_modified_dt'
6
- :OVERLAP_FIELD: 'solr_bboxtype'
7
- :SOURCE: 'dc_source_sm'
8
- :SUPPRESSED: 'suppressed_b'
9
- :TYPE: 'dc_type_s'
10
- :UNIQUE_KEY: 'layer_slug_s'