geoblacklight 6.0.0.pre.alpha.4 → 6.0.0.pre.alpha.6

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -1
  3. data/app/assets/stylesheets/geoblacklight/record.css +37 -1
  4. data/app/components/geoblacklight/document/download_link_component.html.erb +6 -0
  5. data/app/components/geoblacklight/document/download_link_component.rb +66 -0
  6. data/app/components/geoblacklight/document/download_links_component.html.erb +8 -0
  7. data/app/components/geoblacklight/document/download_links_component.rb +63 -0
  8. data/app/components/geoblacklight/document/sidebar_component.html.erb +3 -9
  9. data/app/components/geoblacklight/document/sidebar_component.rb +6 -11
  10. data/app/components/geoblacklight/login_link_component.html.erb +3 -5
  11. data/app/javascript/geoblacklight/core.js +0 -2
  12. data/app/javascript/geoblacklight/index.js +0 -2
  13. data/app/javascript/geoblacklight/leaflet/inspection.js +5 -4
  14. data/app/models/concerns/geoblacklight/solr_document.rb +1 -2
  15. data/config/locales/geoblacklight.en.yml +5 -14
  16. data/lib/generators/geoblacklight/install_generator.rb +4 -9
  17. data/lib/generators/geoblacklight/templates/settings.yml +1 -15
  18. data/lib/geoblacklight/configuration/settings_builder.rb +0 -3
  19. data/lib/geoblacklight/configuration.rb +0 -10
  20. data/lib/geoblacklight/exceptions.rb +0 -23
  21. data/lib/geoblacklight/references.rb +0 -80
  22. data/lib/geoblacklight/version.rb +1 -1
  23. data/lib/geoblacklight.rb +0 -1
  24. data/lib/tasks/geoblacklight.rake +0 -30
  25. data/spec/components/geoblacklight/document/sidebar_component_spec.rb +1 -1
  26. data/spec/components/geoblacklight/download_links_component_spec.rb +59 -85
  27. data/spec/features/index_view_spec.rb +0 -33
  28. data/spec/features/layer_inspection_spec.rb +0 -10
  29. data/spec/features/layer_opacity_spec.rb +0 -7
  30. data/spec/lib/geoblacklight/configuration/settings_builder_spec.rb +0 -2
  31. data/spec/lib/geoblacklight/references_spec.rb +1 -57
  32. data/spec/models/concerns/geoblacklight/solr_document_spec.rb +0 -7
  33. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -1
  34. data/template.rb +1 -1
  35. metadata +6 -28
  36. data/app/components/geoblacklight/download_links_component.html.erb +0 -31
  37. data/app/components/geoblacklight/download_links_component.rb +0 -87
  38. data/app/controllers/download_controller.rb +0 -76
  39. data/app/javascript/geoblacklight/controllers/downloads_controller.js +0 -64
  40. data/lib/geoblacklight/download/csv_download.rb +0 -22
  41. data/lib/geoblacklight/download/geojson_download.rb +0 -24
  42. data/lib/geoblacklight/download/geotiff_download.rb +0 -22
  43. data/lib/geoblacklight/download/kmz_download.rb +0 -24
  44. data/lib/geoblacklight/download/shapefile_download.rb +0 -22
  45. data/lib/geoblacklight/download.rb +0 -110
  46. data/lib/geoblacklight/routes/downloadable.rb +0 -15
  47. data/spec/controllers/download_controller_spec.rb +0 -99
  48. data/spec/features/download_layer_spec.rb +0 -96
  49. data/spec/features/esri_viewer_spec.rb +0 -43
  50. data/spec/features/index_map_spec.rb +0 -40
  51. data/spec/features/layer_with_no_references_spec.rb +0 -10
  52. data/spec/features/linkified_attribute_table_spec.rb +0 -13
  53. data/spec/features/multiple_downloads_spec.rb +0 -17
  54. data/spec/features/show_page_download_spec.rb +0 -22
  55. data/spec/lib/geoblacklight/download/csv_download_spec.rb +0 -21
  56. data/spec/lib/geoblacklight/download/geojson_download_spec.rb +0 -22
  57. data/spec/lib/geoblacklight/download/geotiff_download_spec.rb +0 -25
  58. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +0 -22
  59. data/spec/lib/geoblacklight/download/shapefile_download_spec.rb +0 -21
  60. data/spec/lib/geoblacklight/download_spec.rb +0 -188
  61. data/spec/tasks/geoblacklight_spec.rb +0 -20
@@ -51,36 +51,6 @@ namespace :geoblacklight do
51
51
  end
52
52
  end
53
53
 
54
- namespace :downloads do
55
- desc "Delete all cached downloads"
56
- task delete: :environment do
57
- FileUtils.rm_rf Dir.glob(Rails.root.join("tmp", "cache", "downloads", "*"))
58
- end
59
- desc "Create download directory"
60
- task mkdir: :environment do
61
- FileUtils.mkdir_p(Rails.root.join("tmp", "cache", "downloads"), verbose: true)
62
- end
63
- desc "Precaches a download"
64
- task :precache, %i[doc_id download_type timeout] => [:environment] do |_t, args|
65
- unless args[:doc_id] && args[:download_type] && args[:timeout]
66
- raise "Please supply required arguments [document_id, download_type and timeout]"
67
- end
68
-
69
- document = Geoblacklight::SolrDocument.find(args[:doc_id])
70
- raise Blacklight::Exceptions::RecordNotFound if document[:id] != args[:doc_id]
71
-
72
- download = "Geoblacklight::#{args[:download_type].capitalize}Download"
73
- .constantize.new(document, timeout: args[:timeout].to_i)
74
- download.get
75
- Rails.logger.info "Successfully downloaded #{download.file_name}"
76
- Rails.logger.info Geoblacklight::ShapefileDownload.file_path.to_s
77
- rescue Geoblacklight::Exceptions::ExternalDownloadFailed => e
78
- Rails.logger.error e.message + " " + e.url
79
- rescue NameError
80
- Rails.logger.error "Could not find that download type \"#{args[:download_type]}\""
81
- end
82
- end
83
-
84
54
  desc "Stdout output asset paths"
85
55
  task application_asset_paths: [:environment] do
86
56
  puts Rails.application.config.assets.paths
@@ -10,7 +10,7 @@ RSpec.describe Geoblacklight::Document::SidebarComponent, type: :component do
10
10
  let(:document) { SolrDocument.new(JSON.parse(read_fixture(fixture))) }
11
11
 
12
12
  before do
13
- allow_any_instance_of(Geoblacklight::DownloadLinksComponent).to receive(:render?).and_return(false)
13
+ allow_any_instance_of(Geoblacklight::Document::DownloadLinksComponent).to receive(:render?).and_return(false)
14
14
  allow_any_instance_of(Geoblacklight::LoginLinkComponent).to receive(:render?).and_return(false)
15
15
 
16
16
  allow(document).to receive(:more_like_this).and_return([])
@@ -2,123 +2,97 @@
2
2
 
3
3
  require "spec_helper"
4
4
 
5
- RSpec.describe Geoblacklight::DownloadLinksComponent, type: :component do
5
+ RSpec.describe Geoblacklight::Document::DownloadLinksComponent, type: :component do
6
6
  let(:downloadable) { true }
7
- let(:document) { instance_double(SolrDocument, id: 123, downloadable?: downloadable) }
8
- let(:component) { described_class.new(document: document) }
7
+ let(:direct_download) { nil }
8
+ let(:iiif_download) { nil }
9
+ let(:file_format) { nil }
10
+ let(:iiif_manifest) { nil }
11
+ let(:references) { instance_double("References", iiif_manifest: iiif_manifest) }
12
+ let(:document) do
13
+ instance_double(
14
+ SolrDocument, id: 123,
15
+ downloadable?: downloadable,
16
+ direct_download: direct_download,
17
+ iiif_download: iiif_download,
18
+ file_format: file_format,
19
+ references: references
20
+ )
21
+ end
22
+ subject(:component) { described_class.new(document: document) }
9
23
 
10
24
  before do
11
25
  allow_any_instance_of(GeoblacklightHelper).to receive(:document_available?).and_return(true)
26
+ render_inline(component)
12
27
  end
13
28
 
14
- context "when rendering is required" do
15
- before do
16
- allow(document).to receive(:direct_download).and_return(test: :test)
17
- allow(document).to receive(:iiif_download).and_return({})
18
- allow(document).to receive(:download_types).and_return(shapefile: {})
19
- end
29
+ context "when not downloadable" do
30
+ let(:downloadable) { false }
20
31
 
21
- it "shows download link" do
22
- render_inline(component)
23
- expect(page).to have_text("Download")
24
- expect(page).to have_text("Export Shapefile")
32
+ it "does not render the component" do
33
+ is_expected.to_not be_render
25
34
  end
26
35
  end
27
36
 
28
- context "when rendering is not required" do
29
- context "because there are no download links" do
30
- before do
31
- allow(document).to receive(:direct_download).and_return({})
32
- allow(document).to receive(:iiif_download).and_return({})
33
- allow(document).to receive(:download_types).and_return({})
34
- end
35
-
36
- it "does not render anything" do
37
- render_inline(component)
38
- expect(page).not_to have_text("Download")
39
- expect(page).not_to have_text("Export Shapefile")
40
- end
37
+ context "with no download links and no IIIF links" do
38
+ it "does not render the component" do
39
+ is_expected.to_not be_render
41
40
  end
41
+ end
42
42
 
43
- context "because you aren't allowed" do
44
- let(:downloadable) { false }
43
+ context "with a single bare link" do
44
+ let(:direct_download) { {download: "file.zip"} }
45
+ let(:file_format) { "Shapefile" }
45
46
 
46
- it "does not render anything" do
47
- render_inline(component)
48
- expect(page).not_to have_text("Download")
49
- expect(page).not_to have_text("Export Shapefile")
50
- end
47
+ it "renders a download link using the format to label it" do
48
+ expect(page).to have_link("Original Shapefile", href: "file.zip")
51
49
  end
52
- end
53
-
54
- describe "#download_link_file" do
55
- let(:label) { "Test Link Text" }
56
- let(:id) { "test-id" }
57
- let(:url) { "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip" }
58
50
 
59
- it "generates a link to download the original file" do
60
- expect(component.download_link_file(label, id,
61
- url)).to eq '<a contentUrl="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip" data-download="trigger" data-download-type="direct" data-download-id="test-id" href="http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip">Test Link Text</a>'
51
+ it "renders a badge indicating the actual file type" do
52
+ expect(page).to have_css(".badge", text: "ZIP")
62
53
  end
63
54
  end
64
55
 
65
- describe "#download_link_iiif" do
66
- let(:references_field) { Geoblacklight.configuration.fields.references }
67
- let(:document_attributes) do
68
- {
69
- references_field => {
70
- "http://iiif.io/api/image" => "https://example.edu/image/info.json"
71
- }.to_json
72
- }
73
- end
74
- let(:document) { SolrDocument.new(document_attributes, downloadable?: downloadable) }
56
+ context "with multiple labelled download links available" do
57
+ let(:direct_download) { {download: [{"label" => "File 1", "url" => "file.zip"}, {"label" => "File 2", "url" => "file2.json"}]} }
75
58
 
76
- before do
77
- allow(component).to receive(:download_text).and_return("Original JPG")
78
- allow_any_instance_of(Geoblacklight::Reference).to receive(:to_hash).and_return(iiif: "https://example.edu/image/info.json")
59
+ it "renders a labelled download link for each" do
60
+ expect(page).to have_link("File 1", href: "file.zip")
61
+ expect(page).to have_css(".badge", text: "ZIP")
62
+ expect(page).to have_link("File 2", href: "file2.json")
63
+ expect(page).to have_css(".badge", text: "JSON")
79
64
  end
65
+ end
66
+
67
+ context "with a IIIF link" do
68
+ let(:iiif_download) { {iiif: "https://example.edu/image/info.json"} }
80
69
 
81
70
  it "generates a link to download the JPG file from the IIIF server" do
82
- expect(component.download_link_iiif).to eq '<a contentUrl="https://example.edu/image/full/full/0/default.jpg" data-download="trigger" href="https://example.edu/image/full/full/0/default.jpg">Original JPG</a>'
71
+ expect(page).to have_link(href: "https://example.edu/image/full/full/0/default.jpg")
83
72
  end
84
73
  end
85
74
 
86
- describe "#iiif_jpg_url" do
87
- let(:references_field) { Geoblacklight.configuration.fields.references }
88
- let(:document_attributes) do
89
- {
90
- references_field => {
91
- "http://iiif.io/api/image" => "https://example.edu/image/info.json"
92
- }.to_json
93
- }
94
- end
95
- let(:document) { SolrDocument.new(document_attributes) }
75
+ context "with a IIIF manifest link" do
76
+ let(:iiif_manifest) { instance_double("IIIFManifest", endpoint: "https://example.edu/manifest.json") }
96
77
 
97
- it "returns JPG download URL when given URL to a IIIF info.json" do
98
- expect(component.iiif_jpg_url).to eq "https://example.edu/image/full/full/0/default.jpg"
78
+ it "generates a link to download the IIIF manifest" do
79
+ expect(page).to have_link(href: "https://example.edu/manifest.json")
99
80
  end
100
81
  end
101
82
 
102
- describe "#download_link_generated" do
103
- let(:download_type) { "SHAPEFILE" }
83
+ context "with a generated download via WFS link" do
84
+ let(:direct_download) { {download: "https://geoportal.icpac.net/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typename=geonode%3Aa__2010_TC_Bandu0&outputFormat=json&srs=EPSG%3A4326&srsName=EPSG%3A4326"} }
104
85
 
105
- before do
106
- allow(component).to receive(:download_path).and_return("/download/test-id?type=SHAPEFILE")
107
- allow(component).to receive(:export_format_label).and_return("Shapefile Export Customization")
108
- allow(document).to receive(:id).and_return("test-id")
109
- allow(document).to receive(:to_s).and_return("test-id")
86
+ it "renders a download link with the inferred file type" do
87
+ expect(page).to have_link("Generated JSON", href: "https://geoportal.icpac.net/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typename=geonode%3Aa__2010_TC_Bandu0&outputFormat=json&srs=EPSG%3A4326&srsName=EPSG%3A4326")
110
88
  end
89
+ end
111
90
 
112
- it "generates a link to download the JPG file from the IIIF server" do
113
- # Stub I18n to ensure the link can be customized via `export_` labels.
114
- allow(component).to receive(:t).with("geoblacklight.download.export_shapefile_link").and_return("Shapefile Export Customization")
115
- allow(component).to receive(:t).with("geoblacklight.download.export_link",
116
- {download_format: "Shapefile Export Customization"}).and_return("Export Shapefile Export Customization")
117
- allow(component).to receive(:t).with("geoblacklight.download.preparing").and_return("Preparing download...")
118
- allow(component).to receive(:t).with("geoblacklight.download.ready", {type: "SHAPEFILE"}).and_return("Download ready (SHAPEFILE)")
119
- allow(component).to receive(:t).with("geoblacklight.download.failed", {type: "SHAPEFILE"}).and_return("Download failed (SHAPEFILE)")
120
- expect(component.download_link_generated(download_type,
121
- document)).to eq '<a data-download-path="/download/test-id?type=SHAPEFILE" data-download="trigger" data-action="downloads#download:once" data-download-type="SHAPEFILE" data-download-id="test-id" data-download-preparing-message="Preparing download..." data-download-ready-message="Download ready (SHAPEFILE)" data-download-failed-message="Download failed (SHAPEFILE)" href="">Export Shapefile Export Customization</a>'
91
+ context "with a generated download using the format parameter" do
92
+ let(:direct_download) { {download: "https://example.edu/file?format=CSV"} }
93
+
94
+ it "renders a download link with the inferred file type" do
95
+ expect(page).to have_link("Generated CSV", href: "https://example.edu/file?format=CSV")
122
96
  end
123
97
  end
124
98
  end
@@ -21,32 +21,6 @@ RSpec.feature "Index view", js: true do
21
21
  expect(page).to have_css("#per_page-dropdown")
22
22
  end
23
23
 
24
- scenario "should have facets listed correctly" do
25
- skip "Capybara thinks elements are not visible or interactable, but they are"
26
-
27
- within "#facet-panel-collapse", visible: :all do
28
- expect(page).to have_css("div.card.facet-limit", text: "Year", visible: :all)
29
- expect(page).to have_css("div.card.facet-limit", text: "Place", visible: :all)
30
- expect(page).to have_css("div.card.facet-limit", text: "Access", visible: :all)
31
- expect(page).to have_css("div.card.facet-limit", text: "Resource Class", visible: :all)
32
- expect(page).to have_css("div.card.facet-limit", text: "Resource Type", visible: :all)
33
- expect(page).to have_css("div.card.facet-limit", text: "Format", visible: :all)
34
- expect(page).to have_css("div.card.facet-limit", text: "Subject", visible: :all)
35
- expect(page).to have_css("div.card.facet-limit", text: "Theme", visible: :all)
36
- expect(page).to have_css("div.card.facet-limit", text: "Creator", visible: :all)
37
- expect(page).to have_css("div.card.facet-limit", text: "Publisher", visible: :all)
38
- expect(page).to have_css("div.card.facet-limit", text: "Provider", visible: :all)
39
- expect(page).to have_css("div.card.facet-limit", text: "Georeferenced", visible: :all)
40
- end
41
-
42
- click_button "Provider", visible: :all
43
-
44
- expect(page).to have_css("a.facet-select", text: "University of Minnesota", visible: :all)
45
- expect(page).to have_css("a.facet-select", text: "MIT", visible: :all)
46
- expect(page).to have_css("a.facet-select", text: "Stanford", visible: :all)
47
- expect(page).to have_css(".more_facets a", text: /more\sProvider\s»/, visible: :all)
48
- end
49
-
50
24
  scenario "hover on record should produce bounding box on map" do
51
25
  # Needed to find an svg element on the page
52
26
  visit search_catalog_path(f: {Geoblacklight.configuration.fields.provider => ["Stanford"]})
@@ -66,13 +40,6 @@ RSpec.feature "Index view", js: true do
66
40
  end
67
41
  end
68
42
 
69
- scenario "spatial search should reset to page one" do
70
- skip "FIXME: Only works with a headful browser?"
71
- visit "/?per_page=5&q=%2A&page=2"
72
- find("#leaflet-viewer").double_click
73
- expect(page).to have_css ".page-entries", text: /^1 - 5 of \d.*$/
74
- end
75
-
76
43
  scenario "clicking map search should retain current search parameters" do
77
44
  visit "/?f[#{subject_field}][]=Population"
78
45
  find("#leaflet-viewer").double_click
@@ -9,14 +9,4 @@ RSpec.feature "Layer inspection", js: true do
9
9
  find("#leaflet-viewer").click
10
10
  expect(page).not_to have_css("td.default-text")
11
11
  end
12
-
13
- context "with a pmtiles layer" do
14
- scenario "clicking map should trigger inspection" do
15
- skip "FIXME: Only works with a headful browser?"
16
- visit solr_document_path("princeton-t722hd30j")
17
- expect(page).to have_css("th", text: "Attribute")
18
- find("#openlayers-viewer").click
19
- expect(page).not_to have_css("td.default-text")
20
- end
21
- end
22
12
  end
@@ -9,13 +9,6 @@ RSpec.feature "Layer opacity", js: true do
9
9
  expect(page.all("div.leaflet-layer")[1][:style]).to match(/opacity: 0.75;/)
10
10
  end
11
11
 
12
- scenario "ESRI image service layer should have opacity control" do
13
- skip "CORS error - Purdue web services are down"
14
- visit solr_document_path("32653ed6-8d83-4692-8a06-bf13ffe2c018")
15
- expect(page).to have_css("div.opacity-text", text: "75%")
16
- expect(page.find("img.leaflet-image-layer", match: :first)[:style]).to match(/opacity: 0.75;/)
17
- end
18
-
19
12
  scenario "IIIF layer should not have opacity control" do
20
13
  visit solr_document_path("princeton-02870w62c")
21
14
  expect(page).not_to have_css("div.opacity-text", text: "75%")
@@ -20,7 +20,6 @@ RSpec.describe Geoblacklight::Configuration::SettingsBuilder do
20
20
  {
21
21
  institution: "MIT",
22
22
  fields: {title: "my_title_s"},
23
- download_formats: {vector: ["GeoJSON"]},
24
23
  leaflet: {selected_color: "#abc123", sidebar: true}
25
24
  }
26
25
  end
@@ -31,7 +30,6 @@ RSpec.describe Geoblacklight::Configuration::SettingsBuilder do
31
30
 
32
31
  it "resolves nested lowercase keys" do
33
32
  expect(config.fields.title).to eq("my_title_s")
34
- expect(config.vector_download_formats).to eq(["GeoJSON"])
35
33
  expect(config.leaflet_options.selected_color).to eq("#abc123")
36
34
  expect(config.leaflet_options.sidebar).to be true
37
35
  end
@@ -165,29 +165,6 @@ RSpec.describe Geoblacklight::References do
165
165
  expect(typical_ogp_shapefile.download).to be_nil
166
166
  end
167
167
  end
168
- describe "preferred_download" do
169
- it "returns the direct download if available" do
170
- expect(complex_shapefile.preferred_download[:file_download][:download]).to eq "http://example.com/urn:hul.harvard.edu:HARVARD.SDE2.TG10USAIANNH/data.zip"
171
- expect(direct_download_only.preferred_download[:file_download][:download]).to eq "http://example.com/layer-id-geotiff.tiff"
172
- end
173
- it "returns nil if there is no direct download" do
174
- expect(typical_ogp_shapefile.preferred_download).to be_nil
175
- expect(typical_ogp_geotiff.preferred_download).to be_nil
176
- end
177
- end
178
- describe "download_types" do
179
- it "returns available downloads by format" do
180
- types = complex_shapefile.download_types
181
- expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
182
- expect(types.count).to eq 4
183
- expect(direct_download_only.download_types).to be_nil
184
- end
185
- it "onlies return available downloads if no direct is present" do
186
- types = typical_ogp_shapefile.download_types
187
- expect(types.first[1]).to eq wfs: "http://hgl.harvard.edu:8080/geoserver/wfs"
188
- expect(types.count).to eq 4
189
- end
190
- end
191
168
  describe "#esri_webservices" do
192
169
  it "returns webservices that are esri specific" do
193
170
  expect(some_esri_services.esri_webservices.length).to eq 3
@@ -201,7 +178,7 @@ RSpec.describe Geoblacklight::References do
201
178
  describe "#respond_to_missing?" do
202
179
  context "with a valid method" do
203
180
  it "returns true" do
204
- expect(typical_ogp_shapefile.respond_to?(:download_types)).to be true
181
+ expect(typical_ogp_shapefile.respond_to?(:esri_webservices)).to be true
205
182
  end
206
183
  end
207
184
  context "with a invalid method" do
@@ -210,37 +187,4 @@ RSpec.describe Geoblacklight::References do
210
187
  end
211
188
  end
212
189
  end
213
- describe "downloads_by_format" do
214
- context "using default settings for vector download formats" do
215
- it "returns shapefile" do
216
- expect(typical_ogp_shapefile.downloads_by_format.count).to eq 4
217
- expect(typical_ogp_shapefile.downloads_by_format[:csv][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
218
- expect(typical_ogp_shapefile.downloads_by_format[:geojson][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
219
- expect(typical_ogp_shapefile.downloads_by_format[:kmz][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
220
- expect(typical_ogp_shapefile.downloads_by_format[:shapefile][:wfs]).to eq "http://hgl.harvard.edu:8080/geoserver/wfs"
221
- end
222
- it "returns geotiff" do
223
- expect(typical_ogp_geotiff.downloads_by_format.count).to eq 1
224
- expect(typical_ogp_geotiff.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
225
- end
226
- it "returns arcgrid as geotiff" do
227
- expect(typical_arcgrid.downloads_by_format.count).to eq 1
228
- expect(typical_arcgrid.downloads_by_format[:geotiff][:wms]).to eq "http://hgl.harvard.edu:8080/geoserver/wms"
229
- end
230
- it "does not return shapefile if wms and wfs are not present" do
231
- expect(no_service_shapefile.downloads_by_format).to be_nil
232
- end
233
- it "does not return GeoTIFF if wms is not present" do
234
- expect(direct_download_only.downloads_by_format).to be_nil
235
- end
236
- end
237
- context "using custom settings which include incorrect settings" do
238
- before do
239
- allow(typical_ogp_shapefile).to receive(:format_list).and_return(["noformat"])
240
- end
241
- it "returns no formats for download" do
242
- expect(typical_ogp_shapefile.downloads_by_format.count).to eq 0
243
- end
244
- end
245
- end
246
190
  end
@@ -105,13 +105,6 @@ RSpec.describe Geoblacklight::SolrDocument do
105
105
  expect(document.references).to be_an Geoblacklight::References
106
106
  end
107
107
  end
108
- describe "download_types" do
109
- let(:document_attributes) { {} }
110
- it "calls download_types" do
111
- expect_any_instance_of(Geoblacklight::References).to receive(:download_types)
112
- document.download_types
113
- end
114
- end
115
108
  describe "direct_download" do
116
109
  let(:document_attributes) { {} }
117
110
  describe "with a direct download" do
@@ -16,7 +16,7 @@ class TestAppGenerator < Rails::Generators::Base
16
16
  # Install blacklight
17
17
  def run_blacklight_generator
18
18
  say_status("warning", "GENERATING BL", :yellow)
19
- generate "blacklight:install", "--devise"
19
+ generate "blacklight:install", "--devise", "--skip-solr"
20
20
  end
21
21
 
22
22
  # Install geoblacklight
data/template.rb CHANGED
@@ -10,7 +10,7 @@ end
10
10
  run "bundle install"
11
11
 
12
12
  after_bundle do
13
- generate "blacklight:install", ENV.fetch("BLACKLIGHT_INSTALL_OPTIONS", "--devise --skip-solr")
13
+ generate "blacklight:install", ENV.fetch("BLACKLIGHT_INSTALL_OPTIONS", "--devise")
14
14
  generate "geoblacklight:install"
15
15
  rails_command "db:migrate"
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoblacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.pre.alpha.4
4
+ version: 6.0.0.pre.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Graves
@@ -10,7 +10,7 @@ authors:
10
10
  - Jack Reed
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2026-07-08 00:00:00.000000000 Z
13
+ date: 2026-07-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -422,14 +422,16 @@ files:
422
422
  - app/components/geoblacklight/display_note_component.rb
423
423
  - app/components/geoblacklight/document/citation_component.html.erb
424
424
  - app/components/geoblacklight/document/citation_component.rb
425
+ - app/components/geoblacklight/document/download_link_component.html.erb
426
+ - app/components/geoblacklight/document/download_link_component.rb
427
+ - app/components/geoblacklight/document/download_links_component.html.erb
428
+ - app/components/geoblacklight/document/download_links_component.rb
425
429
  - app/components/geoblacklight/document/relations_container_component.html.erb
426
430
  - app/components/geoblacklight/document/relations_container_component.rb
427
431
  - app/components/geoblacklight/document/sidebar_component.html.erb
428
432
  - app/components/geoblacklight/document/sidebar_component.rb
429
433
  - app/components/geoblacklight/document_component.html.erb
430
434
  - app/components/geoblacklight/document_component.rb
431
- - app/components/geoblacklight/download_links_component.html.erb
432
- - app/components/geoblacklight/download_links_component.rb
433
435
  - app/components/geoblacklight/header_component.html.erb
434
436
  - app/components/geoblacklight/header_component.rb
435
437
  - app/components/geoblacklight/header_icons_component.html.erb
@@ -465,12 +467,10 @@ files:
465
467
  - app/components/geoblacklight/web_services_wfs_component.rb
466
468
  - app/components/geoblacklight/web_services_wms_component.html.erb
467
469
  - app/components/geoblacklight/web_services_wms_component.rb
468
- - app/controllers/download_controller.rb
469
470
  - app/controllers/relation_controller.rb
470
471
  - app/controllers/wms_controller.rb
471
472
  - app/helpers/geoblacklight_helper.rb
472
473
  - app/javascript/geoblacklight/controllers/clipboard_controller.js
473
- - app/javascript/geoblacklight/controllers/downloads_controller.js
474
474
  - app/javascript/geoblacklight/controllers/leaflet_viewer_controller.js
475
475
  - app/javascript/geoblacklight/controllers/oembed_viewer_controller.js
476
476
  - app/javascript/geoblacklight/controllers/openlayers_viewer_controller.js
@@ -542,12 +542,6 @@ files:
542
542
  - lib/geoblacklight/configuration/settings_builder.rb
543
543
  - lib/geoblacklight/constants.rb
544
544
  - lib/geoblacklight/deprecation.rb
545
- - lib/geoblacklight/download.rb
546
- - lib/geoblacklight/download/csv_download.rb
547
- - lib/geoblacklight/download/geojson_download.rb
548
- - lib/geoblacklight/download/geotiff_download.rb
549
- - lib/geoblacklight/download/kmz_download.rb
550
- - lib/geoblacklight/download/shapefile_download.rb
551
545
  - lib/geoblacklight/engine.rb
552
546
  - lib/geoblacklight/exceptions.rb
553
547
  - lib/geoblacklight/geometry.rb
@@ -567,7 +561,6 @@ files:
567
561
  - lib/geoblacklight/relation/descendants.rb
568
562
  - lib/geoblacklight/relation/relation_response.rb
569
563
  - lib/geoblacklight/routes.rb
570
- - lib/geoblacklight/routes/downloadable.rb
571
564
  - lib/geoblacklight/routes/exportable.rb
572
565
  - lib/geoblacklight/routes/wms.rb
573
566
  - lib/geoblacklight/version.rb
@@ -608,7 +601,6 @@ files:
608
601
  - spec/components/geoblacklight/viewer_help_text_component_spec.rb
609
602
  - spec/components/geoblacklight/web_services_component_spec.rb
610
603
  - spec/controllers/catalog_controller_spec.rb
611
- - spec/controllers/download_controller_spec.rb
612
604
  - spec/controllers/relation_controller_spec.rb
613
605
  - spec/controllers/wms_controller_spec.rb
614
606
  - spec/factories/user.rb
@@ -617,23 +609,17 @@ files:
617
609
  - spec/features/citations_spec.rb
618
610
  - spec/features/configurable_basemap_spec.rb
619
611
  - spec/features/data_dictionary_download_spec.rb
620
- - spec/features/download_layer_spec.rb
621
612
  - spec/features/empty_search_spec.rb
622
- - spec/features/esri_viewer_spec.rb
623
613
  - spec/features/exports_spec.rb
624
614
  - spec/features/full_screen_control_spec.rb
625
615
  - spec/features/help_text_spec.rb
626
616
  - spec/features/home_page_spec.rb
627
- - spec/features/index_map_spec.rb
628
617
  - spec/features/index_view_spec.rb
629
618
  - spec/features/layer_inspection_spec.rb
630
619
  - spec/features/layer_opacity_spec.rb
631
620
  - spec/features/layer_preview_spec.rb
632
- - spec/features/layer_with_no_references_spec.rb
633
- - spec/features/linkified_attribute_table_spec.rb
634
621
  - spec/features/metadata_panel_spec.rb
635
622
  - spec/features/missing_metadata_spec.rb
636
- - spec/features/multiple_downloads_spec.rb
637
623
  - spec/features/oembed_spec.rb
638
624
  - spec/features/relations_spec.rb
639
625
  - spec/features/saved_searches_spec.rb
@@ -643,7 +629,6 @@ files:
643
629
  - spec/features/search_results_map_spec.rb
644
630
  - spec/features/search_results_overlap_ratio_spec.rb
645
631
  - spec/features/search_spec.rb
646
- - spec/features/show_page_download_spec.rb
647
632
  - spec/features/show_page_metadata_spec.rb
648
633
  - spec/features/sms_spec.rb
649
634
  - spec/features/suppressed_records_spec.rb
@@ -736,12 +721,6 @@ files:
736
721
  - spec/lib/geoblacklight/configuration/leaflet_layers_config_spec.rb
737
722
  - spec/lib/geoblacklight/configuration/settings_builder_spec.rb
738
723
  - spec/lib/geoblacklight/configuration_spec.rb
739
- - spec/lib/geoblacklight/download/csv_download_spec.rb
740
- - spec/lib/geoblacklight/download/geojson_download_spec.rb
741
- - spec/lib/geoblacklight/download/geotiff_download_spec.rb
742
- - spec/lib/geoblacklight/download/kmz_download_spec.rb
743
- - spec/lib/geoblacklight/download/shapefile_download_spec.rb
744
- - spec/lib/geoblacklight/download_spec.rb
745
724
  - spec/lib/geoblacklight/geometry_spec.rb
746
725
  - spec/lib/geoblacklight/item_viewer_spec.rb
747
726
  - spec/lib/geoblacklight/metadata/base_spec.rb
@@ -771,7 +750,6 @@ files:
771
750
  - spec/support/features.rb
772
751
  - spec/support/features/session_helpers.rb
773
752
  - spec/support/fixtures.rb
774
- - spec/tasks/geoblacklight_spec.rb
775
753
  - spec/test_app_templates/lib/generators/test_app_generator.rb
776
754
  - template.rb
777
755
  homepage: http://github.com/geoblacklight/geoblacklight
@@ -1,31 +0,0 @@
1
- <div data-controller="downloads" class="downloads-sidebar">
2
- <%# the dropdown-toggle class gives us the little arrow %>
3
- <button type="button" class="btn btn-primary dropdown-toggle sidebar-btn" id="downloads-button" data-bs-toggle="collapse" data-bs-target="#downloads-collapse" aria-expanded="false" aria-controls="downloads-collapse">
4
- <%= t('geoblacklight.download.download') %>
5
- </button>
6
- <div class="collapse" id="downloads-collapse">
7
- <div class="card card-body">
8
- <%# Renders the options of the downloads dropdown button %>
9
- <% if document.direct_download.present? %>
10
- <% if document.direct_download[:download].is_a? Array %>
11
- <% document.direct_download[:download].each do |download| %>
12
- <%= download_link_file(download['label'], document.id, download['url']) %>
13
- <% end %>
14
- <% end %>
15
- <% if document.direct_download[:download].is_a? String %>
16
- <%= download_link_file(download_text(document.file_format), document.id, document.direct_download[:download]) %>
17
- <% end %>
18
- <% end %>
19
-
20
- <% if document.iiif_download.present? %>
21
- <%= download_link_iiif %>
22
- <% end %>
23
-
24
- <% if document.download_types.present? %>
25
- <% document.download_types.each do |type| %>
26
- <%= download_link_generated(type.first, document) %>
27
- <% end %>
28
- <% end %>
29
- </div>
30
- </div>
31
- </div>