geoblacklight 3.0.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +142 -0
  3. data/.gitignore +8 -0
  4. data/.rubocop.yml +9 -10
  5. data/.rubocop_todo.yml +356 -26
  6. data/README.md +2 -2
  7. data/Rakefile +12 -4
  8. data/app/assets/images/favicon.ico +0 -0
  9. data/app/assets/javascripts/geoblacklight/geoblacklight.js +18 -1
  10. data/app/assets/javascripts/geoblacklight/modules/bookmarks.js +43 -0
  11. data/app/assets/javascripts/geoblacklight/modules/metadata_download_button.js +6 -1
  12. data/app/assets/javascripts/geoblacklight/modules/results.js +7 -8
  13. data/app/assets/javascripts/geoblacklight/modules/util.js +5 -0
  14. data/app/assets/javascripts/geoblacklight/viewers/esri.js +1 -1
  15. data/app/assets/javascripts/geoblacklight/viewers/index_map.js +1 -1
  16. data/app/assets/javascripts/geoblacklight/viewers/map.js +12 -2
  17. data/app/assets/javascripts/geoblacklight/viewers/tms.js +10 -0
  18. data/app/assets/javascripts/geoblacklight/viewers/wms.js +1 -1
  19. data/app/assets/stylesheets/geoblacklight/modules/_blacklight_overrides.scss +1 -1
  20. data/app/assets/stylesheets/geoblacklight/modules/results.scss +1 -1
  21. data/app/helpers/geoblacklight_helper.rb +14 -2
  22. data/app/models/concerns/geoblacklight/solr_document.rb +8 -13
  23. data/app/models/concerns/geoblacklight/spatial_search_behavior.rb +3 -3
  24. data/app/views/catalog/_document_split.html.erb +1 -1
  25. data/app/views/catalog/_home_text.html.erb +1 -1
  26. data/app/views/catalog/_index_split_default.html.erb +1 -1
  27. data/app/views/catalog/_show_default_viewer_container.html.erb +1 -1
  28. data/app/views/download/hgl.html.erb +13 -11
  29. data/app/views/relation/_ancestors.html.erb +2 -2
  30. data/app/views/relation/_descendants.html.erb +2 -2
  31. data/babel.config.json +4 -0
  32. data/bin/coverage.rb +2 -2
  33. data/config/initializers/new_gbl_settings_defaults_3_3.yml +10 -0
  34. data/config/initializers/rails_config.rb +4 -0
  35. data/config/locales/geoblacklight.en.yml +4 -0
  36. data/geoblacklight.gemspec +6 -5
  37. data/jest.config.js +25 -0
  38. data/lib/generators/geoblacklight/install_generator.rb +1 -1
  39. data/lib/generators/geoblacklight/templates/catalog_controller.rb +2 -1
  40. data/lib/generators/geoblacklight/templates/settings.yml +20 -11
  41. data/lib/geoblacklight.rb +1 -2
  42. data/lib/geoblacklight/bounding_box.rb +1 -1
  43. data/lib/geoblacklight/constants.rb +1 -0
  44. data/lib/geoblacklight/download/kmz_download.rb +1 -1
  45. data/lib/geoblacklight/engine.rb +1 -0
  46. data/lib/geoblacklight/geometry.rb +85 -0
  47. data/lib/geoblacklight/item_viewer.rb +5 -1
  48. data/lib/geoblacklight/metadata/base.rb +1 -7
  49. data/lib/geoblacklight/relation/ancestors.rb +2 -2
  50. data/lib/geoblacklight/relation/descendants.rb +1 -1
  51. data/lib/geoblacklight/version.rb +1 -1
  52. data/lib/geoblacklight/wms_layer.rb +1 -4
  53. data/lib/tasks/geoblacklight.rake +5 -0
  54. data/package.json +17 -1
  55. data/setupJest.js +14 -0
  56. data/solr/conf/schema.xml +1 -3
  57. data/spec/config/initializers/rails_config_spec.rb +14 -0
  58. data/spec/controllers/catalog_controller_spec.rb +6 -6
  59. data/spec/features/download_layer_spec.rb +1 -1
  60. data/spec/features/relations_spec.rb +1 -1
  61. data/spec/features/search_results_overlap_ratio_spec.rb +2 -2
  62. data/spec/features/split_view.html.erb_spec.rb +1 -1
  63. data/spec/features/tms_spec.rb +10 -0
  64. data/spec/fixtures/solr_documents/public_iiif_princeton.json +1 -1
  65. data/spec/fixtures/solr_documents/tms.json +29 -0
  66. data/spec/helpers/geoblacklight_helper_spec.rb +30 -4
  67. data/spec/javascripts/geoblacklight_spec.js +0 -6
  68. data/spec/javascripts/metadata_download_button_spec.js +5 -3
  69. data/spec/javascripts/util_spec.js +2 -4
  70. data/spec/lib/geoblacklight/download/kmz_download_spec.rb +2 -2
  71. data/spec/lib/geoblacklight/download_spec.rb +1 -1
  72. data/spec/lib/geoblacklight/geometry_spec.rb +59 -0
  73. data/spec/lib/geoblacklight/item_viewer_spec.rb +12 -0
  74. data/spec/lib/geoblacklight/references_spec.rb +1 -1
  75. data/spec/lib/geoblacklight/relation/ancestors_spec.rb +1 -1
  76. data/spec/lib/geoblacklight/relation/descendants_spec.rb +1 -1
  77. data/spec/test_app_templates/Gemfile.extra +1 -0
  78. data/spec/test_app_templates/lib/generators/test_app_generator.rb +1 -8
  79. data/spec/views/catalog/_document_split.html.erb_spec.rb +1 -1
  80. data/spec/views/catalog/_index_split.html.erb_spec.rb +1 -1
  81. data/spec/views/catalog/_show_tools.html.erb_spec.rb +1 -1
  82. data/template.rb +3 -2
  83. metadata +58 -36
  84. data/.circleci/config.yml +0 -252
  85. data/spec/javascripts/geoblacklight/viewers/esri/tiled_map_layer_spec.js +0 -12
  86. data/spec/javascripts/spec_helper.js +0 -32
  87. data/spec/lib/geoblacklight/controller_override_spec.rb +0 -2
  88. data/spec/teaspoon_env.rb +0 -214
@@ -1,8 +1,8 @@
1
1
  <% @relations.ancestors['docs'].each do |ancestor| %>
2
2
  <li class="list-group-item border-bottom-0">
3
- <%= link_to solr_document_path(ancestor['layer_slug_s']) do %>
3
+ <%= link_to solr_document_path(ancestor[Settings.FIELDS.UNIQUE_KEY]) do %>
4
4
  <%= relations_icon(ancestor, 'pagelines-brands') %>
5
- <%= ancestor['dc_title_s'] %>
5
+ <%= ancestor[Settings.FIELDS.TITLE] %>
6
6
  <% end %>
7
7
  </li>
8
8
  <% end %>
@@ -1,8 +1,8 @@
1
1
  <% @relations.descendants['docs'][0..2].each do |descendant| %>
2
2
  <li class="list-group-item border-bottom-0">
3
- <%= link_to solr_document_path(descendant['layer_slug_s']) do %>
3
+ <%= link_to solr_document_path(descendant[Settings.FIELDS.UNIQUE_KEY]) do %>
4
4
  <%= relations_icon(descendant, 'leaf') %>
5
- <%= descendant['dc_title_s'] %>
5
+ <%= descendant[Settings.FIELDS.TITLE] %>
6
6
  <% end %>
7
7
  </li>
8
8
  <% end %>
data/babel.config.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "plugins": ["@babel/plugin-transform-runtime"],
3
+ "presets": ["@babel/preset-env"]
4
+ }
data/bin/coverage.rb CHANGED
@@ -27,8 +27,8 @@ class SimpleCovHelper
27
27
  results = SimpleCov::ResultMerger.merge_results(*results)
28
28
  results.format!
29
29
  covered_percent = results.covered_percent.round(2)
30
- return unless covered_percent < SimpleCov.minimum_coverage[:line]
31
- $stderr.printf("Coverage (%.2f%%) is below the expected minimum coverage (%.2f%%).\n", covered_percent, SimpleCov.minimum_coverage[:line])
30
+ return unless covered_percent < SimpleCov.minimum_coverage
31
+ $stderr.printf("Coverage (%.2f%%) is below the expected minimum coverage (%.2f%%).\n", covered_percent, SimpleCov.minimum_coverage)
32
32
  Kernel.exit SimpleCov::ExitCodes::MINIMUM_COVERAGE
33
33
  end
34
34
  end
@@ -0,0 +1,10 @@
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'
@@ -2,3 +2,7 @@
2
2
  Config.setup do |config|
3
3
  config.const_name = 'Settings'
4
4
  end
5
+
6
+ # GeoBlacklight v3.3 - New Settings.FIELDS values
7
+ Settings.prepend_source!(File.expand_path('new_gbl_settings_defaults_3_3.yml', __dir__))
8
+ Settings.reload!
@@ -64,6 +64,7 @@ en:
64
64
  data_dictionary: 'Documentation'
65
65
  services: 'Web services'
66
66
  services_close: 'Close'
67
+ tms: 'Tile Map Service'
67
68
  relations:
68
69
  ancestor: 'Source Datasets'
69
70
  descendant: 'Derived Datasets'
@@ -104,6 +105,9 @@ en:
104
105
  tiled_map_layer:
105
106
  title: ArcGIS Tiled Map Layer
106
107
  content: An ArcGIS Tiled Map Layer Service displays set of web-accessible tiles that reside on a server.
108
+ tms:
109
+ title: Tile Map Service
110
+ content: A Tile Map Service displays georeferenced map tiles as an image on a map.
107
111
  wms:
108
112
  title: Web Map Service (WMS)
109
113
  content: A Web Map Service displays a geospatial dataset as map images.
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ['lib']
20
20
  spec.required_rubygems_version = '>= 2.5.2'
21
21
 
22
- spec.add_dependency 'rails', '>= 5.2.4', '< 6.1'
22
+ spec.add_dependency 'rails', '>= 5.2.4', '< 6.2'
23
23
  spec.add_dependency 'blacklight', '~> 7.0'
24
24
  spec.add_dependency 'config'
25
25
  spec.add_dependency 'faraday', '~> 1.0'
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'geo_combine', '~> 0.4'
30
30
  spec.add_dependency 'mime-types'
31
31
  spec.add_dependency 'handlebars_assets'
32
- spec.add_dependency 'webpacker', '~> 4.0'
32
+ spec.add_dependency 'rgeo-geojson'
33
33
 
34
34
  spec.add_development_dependency 'solr_wrapper'
35
35
  spec.add_development_dependency 'rails-controller-testing'
@@ -39,8 +39,9 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency 'webdrivers'
40
40
  spec.add_development_dependency 'factory_bot_rails'
41
41
  spec.add_development_dependency 'database_cleaner', '~> 1.3'
42
- spec.add_development_dependency 'bixby'
43
- spec.add_development_dependency 'simplecov', '~> 0.16'
42
+ spec.add_development_dependency 'simplecov', '~> 0.17.1'
44
43
  spec.add_development_dependency 'foreman'
45
- spec.add_development_dependency 'teaspoon'
44
+ spec.add_development_dependency 'rubocop', '~> 1.10'
45
+ spec.add_development_dependency 'rubocop-rails', '~> 2.9'
46
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.2'
46
47
  end
data/jest.config.js ADDED
@@ -0,0 +1,25 @@
1
+ const util = require('util');
2
+ const exec = util.promisify(require('child_process').exec);
3
+
4
+ module.exports = async () => {
5
+ console.log('Getting asset pipeline lookup path from Rails');
6
+ const { stdout, stderr } = await exec('bundle exec rake geoblacklight:asset_paths');
7
+ if (stderr) {
8
+ console.error(stderr);
9
+ }
10
+ const paths = stdout.trim().split('\n');
11
+ return {
12
+ moduleDirectories: [
13
+ 'node_modules',
14
+ 'spec/javascripts',
15
+ ...paths,
16
+ ],
17
+ rootDir: './',
18
+ setupFilesAfterEnv: [
19
+ '<rootDir>/setupJest.js',
20
+ ],
21
+ testMatch: [
22
+ '<rootDir>/spec/javascripts/**/*_spec.js',
23
+ ],
24
+ };
25
+ };
@@ -56,7 +56,7 @@ module Geoblacklight
56
56
 
57
57
  def add_unique_key
58
58
  inject_into_file 'app/models/solr_document.rb', after: "# self.unique_key = 'id'" do
59
- "\n self.unique_key = 'layer_slug_s'"
59
+ "\n self.unique_key = Settings.FIELDS.UNIQUE_KEY"
60
60
  end
61
61
  end
62
62
 
@@ -29,7 +29,7 @@ class CatalogController < ApplicationController
29
29
  #
30
30
  config.default_document_solr_params = {
31
31
  :qt => 'document',
32
- :q => '{!raw f=layer_slug_s v=$id}'
32
+ :q => "{!raw f=#{Settings.FIELDS.UNIQUE_KEY} v=$id}"
33
33
  }
34
34
 
35
35
 
@@ -97,6 +97,7 @@ class CatalogController < ApplicationController
97
97
  config.add_facet_field Settings.FIELDS.RIGHTS, label: 'Access', limit: 8, partial: "icon_facet"
98
98
  config.add_facet_field Settings.FIELDS.GEOM_TYPE, label: 'Data type', limit: 8, partial: "icon_facet"
99
99
  config.add_facet_field Settings.FIELDS.FILE_FORMAT, :label => 'Format', :limit => 8
100
+ config.add_facet_field Settings.FIELDS.SOURCE, show: false
100
101
 
101
102
  # Have BL send all facet field names to Solr, which has been the default
102
103
  # previously. Simply remove these lines if you'd rather use Solr request
@@ -21,24 +21,31 @@ OVERLAP_RATIO_BOOST: '2'
21
21
 
22
22
  # Solr field mappings
23
23
  FIELDS:
24
+ :CREATOR: 'dc_creator_sm'
25
+ :DESCRIPTION: 'dc_description_s'
24
26
  :FILE_FORMAT: 'dc_format_s'
27
+ :GEOM_TYPE: 'layer_geom_type_s'
25
28
  :GEOMETRY: 'solr_geom'
26
- :WXS_IDENTIFIER: 'layer_id_s'
27
- :RIGHTS: 'dc_rights_s'
29
+ :IDENTIFIER: 'dc_identifier_s'
30
+ :ISSUED: 'dct_issued_s'
31
+ :LANGUAGE: 'dc_language_s'
32
+ :LAYER_MODIFIED: 'layer_modified_dt'
33
+ :OVERLAP_FIELD: 'solr_bboxtype'
34
+ :PART_OF: 'dct_isPartOf_sm'
35
+ :PUBLISHER: 'dc_publisher_s'
28
36
  :PROVENANCE: 'dct_provenance_s'
29
- :GEOM_TYPE: 'layer_geom_type_s'
37
+ :REFERENCES: 'dct_references_s'
38
+ :RIGHTS: 'dc_rights_s'
30
39
  :SPATIAL_COVERAGE: 'dct_spatial_sm'
31
40
  :SUBJECT: 'dc_subject_sm'
32
- :REFERENCES: 'dct_references_s'
33
- :YEAR: 'solr_year_i'
34
- :CREATOR: 'dc_creator_sm'
35
- :DESCRIPTION: 'dc_description_s'
36
- :PUBLISHER: 'dc_publisher_s'
37
- :PART_OF: 'dct_isPartOf_sm'
41
+ :SOURCE: 'dc_source_sm'
42
+ :SUPPRESSED: 'suppressed_b'
38
43
  :TEMPORAL: 'dct_temporal_sm'
39
44
  :TITLE: 'dc_title_s'
40
- :SOURCE: 'dc_source_sm'
41
- :ISSUED: 'dct_issued_s'
45
+ :TYPE: 'dc_type_s'
46
+ :UNIQUE_KEY: 'layer_slug_s'
47
+ :WXS_IDENTIFIER: 'layer_id_s'
48
+ :YEAR: 'solr_year_i'
42
49
 
43
50
  # Institution deployed at
44
51
  INSTITUTION: 'Stanford'
@@ -62,6 +69,7 @@ USE_GEOM_FOR_RELATIONS_ICON: false
62
69
  # Web services shown in tool panel
63
70
  WEBSERVICES_SHOWN:
64
71
  - 'wms'
72
+ - 'tms'
65
73
  - 'wfs'
66
74
  - 'iiif'
67
75
  - 'feature_layer'
@@ -122,4 +130,5 @@ HELP_TEXT:
122
130
  - 'index_map'
123
131
  - 'tiled_map_layer'
124
132
  - 'wms'
133
+ - 'tms'
125
134
  - 'oembed'
data/lib/geoblacklight.rb CHANGED
@@ -6,9 +6,9 @@ module Geoblacklight
6
6
  require 'geoblacklight/bounding_box'
7
7
  require 'geoblacklight/catalog_helper_override'
8
8
  require 'geoblacklight/constants'
9
- # require 'geoblacklight/controller_override'
10
9
  require 'geoblacklight/exceptions'
11
10
  require 'geoblacklight/geoblacklight_helper_behavior'
11
+ require 'geoblacklight/geometry'
12
12
  require 'geoblacklight/view_helper_override'
13
13
  require 'geoblacklight/item_viewer'
14
14
  require 'geoblacklight/wms_layer'
@@ -36,7 +36,6 @@ module Geoblacklight
36
36
  require 'geoblacklight/relation/relation_response'
37
37
 
38
38
  def self.inject!
39
- # CatalogController.send(:include, Geoblacklight::ControllerOverride)
40
39
  CatalogController.send(:include, Geoblacklight::CatalogHelperOverride)
41
40
  CatalogController.send(:include, Geoblacklight::ViewHelperOverride)
42
41
  CatalogController.send(:helper, Geoblacklight::ViewHelperOverride) unless
@@ -28,7 +28,7 @@ module Geoblacklight
28
28
  # @param [String] bbox as "W S E N"
29
29
  # @return [Geoblacklight::BoundingBox]
30
30
  def self.from_rectangle(rectangle)
31
- rectangle_array = rectangle.split(' ')
31
+ rectangle_array = rectangle.split
32
32
  message = 'Bounding box should be a string in Solr rectangle syntax e.g."W S E N"'
33
33
  fail Geoblacklight::Exceptions::WrongBoundingBoxFormat, message if rectangle_array.count != 4
34
34
  new(
@@ -16,6 +16,7 @@ module Geoblacklight
16
16
  wcs: 'http://www.opengis.net/def/serviceType/ogc/wcs',
17
17
  wfs: 'http://www.opengis.net/def/serviceType/ogc/wfs',
18
18
  wms: 'http://www.opengis.net/def/serviceType/ogc/wms',
19
+ tms: 'https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification',
19
20
  hgl: 'http://schema.org/DownloadAction',
20
21
  feature_layer: 'urn:x-esri:serviceType:ArcGIS#FeatureLayer',
21
22
  tiled_map_layer: 'urn:x-esri:serviceType:ArcGIS#TiledMapLayer',
@@ -9,7 +9,7 @@ module Geoblacklight
9
9
  width: 2000, height: 2000 }.freeze
10
10
 
11
11
  def initialize(document, options = {})
12
- bbox_wsen = document.bounding_box_as_wsen.split(' ').join(', ')
12
+ bbox_wsen = document.geometry.bounding_box
13
13
  request_params = KMZ_DOWNLOAD_PARAMS.merge(layers: document[:layer_id_s], bbox: bbox_wsen)
14
14
  super(document, {
15
15
  type: 'kmz',
@@ -4,6 +4,7 @@ require 'coderay'
4
4
  require 'config'
5
5
  require 'faraday'
6
6
  require 'faraday_middleware'
7
+ require 'geoblacklight/version'
7
8
  require 'nokogiri'
8
9
  require 'mime/types'
9
10
  require 'handlebars_assets'
@@ -0,0 +1,85 @@
1
+ # frozen_string_literal: true
2
+ require 'rgeo'
3
+ require 'rgeo-geojson'
4
+
5
+ module Geoblacklight
6
+ # Transforms and parses geometry expressed in WKT or CSW WKT ENVELOPE syntax
7
+ class Geometry
8
+ attr_reader :geom
9
+
10
+ # @param [String] geom WKT or WKT ENVELOPE syntax formatted string
11
+ def initialize(geom)
12
+ @geom = geom
13
+ end
14
+
15
+ # Convert geometry to GeoJSON
16
+ # @return [String]
17
+ def geojson
18
+ obj = factory.parse_wkt(geometry_as_wkt)
19
+ RGeo::GeoJSON.encode(obj).to_json
20
+ rescue StandardError
21
+ Geoblacklight.logger.warn "Geometry is not valid: #{geom}"
22
+ default_extent
23
+ end
24
+
25
+ # Generate a wsen bounding box from the geometry
26
+ # @return [String] bounding box as comma delimited wsen "w, s, e, n"
27
+ def bounding_box
28
+ obj = factory.parse_wkt(geometry_as_wkt)
29
+
30
+ # Get the minimum bounding box for the geometry as a Polygon
31
+ bbox = obj.envelope
32
+
33
+ # Return as wsen string
34
+ minx = bbox.coordinates[0][0][0]
35
+ miny = bbox.coordinates[0][0][1]
36
+ maxx = bbox.coordinates[0][1][0]
37
+ maxy = bbox.coordinates[0][2][1]
38
+ "#{minx}, #{miny}, #{maxx}, #{maxy}"
39
+ rescue RGeo::Error::ParseError
40
+ Geoblacklight.logger.warn "Error parsing geometry: #{geom}"
41
+ default_extent
42
+ end
43
+
44
+ private
45
+
46
+ # Default extent as GeoJSON
47
+ # @return [String]
48
+ def default_extent
49
+ {
50
+ 'type' => 'Polygon',
51
+ 'coordinates' => [
52
+ [
53
+ [-180.0, 90.0], [-180.0, -90.0], [180.0, -90.0], [180.0, 90.0], [-180.0, 90.0]
54
+ ]
55
+ ]
56
+ }.to_json
57
+ end
58
+
59
+ # Convert WKT ENVELOPE string to WKT POLYGON string
60
+ # @return [String]
61
+ def envelope_to_polygon
62
+ exp = /^\s*ENVELOPE\(
63
+ \s*([-.\d]+)\s*,
64
+ \s*([-.\d]+)\s*,
65
+ \s*([-.\d]+)\s*,
66
+ \s*([-.\d]+)\s*
67
+ \)\s*$/x # uses 'x' option for free-spacing mode
68
+ bbox_match = exp.match(geom)
69
+ minx, maxx, maxy, miny = bbox_match.captures
70
+ "POLYGON ((#{minx} #{maxy}, #{minx} #{miny}, #{maxx} #{miny}, #{maxx} #{maxy}, #{minx} #{maxy}))"
71
+ end
72
+
73
+ def factory
74
+ @factory ||= RGeo::Cartesian.factory
75
+ end
76
+
77
+ # Return geometry as valid WKT string
78
+ # @return [String]
79
+ def geometry_as_wkt
80
+ return geom unless geom.match?(/ENVELOPE/)
81
+
82
+ envelope_to_polygon
83
+ end
84
+ end
85
+ end
@@ -47,8 +47,12 @@ module Geoblacklight
47
47
  @references.oembed
48
48
  end
49
49
 
50
+ def tms
51
+ @references.tms
52
+ end
53
+
50
54
  def viewer_preference
51
- [oembed, index_map, wms, iiif, tiled_map_layer, dynamic_map_layer,
55
+ [oembed, index_map, tms, wms, iiif, tiled_map_layer, dynamic_map_layer,
52
56
  image_map_layer, feature_layer].compact.map(&:to_hash).first
53
57
  end
54
58
  end
@@ -55,13 +55,7 @@ module Geoblacklight
55
55
  return response.body unless response.nil? || response.status == 404
56
56
  Geoblacklight.logger.error "Could not reach #{@reference.endpoint}"
57
57
  ''
58
- rescue Faraday::ConnectionFailed => error
59
- Geoblacklight.logger.error error.inspect
60
- ''
61
- rescue Faraday::TimeoutError => error
62
- Geoblacklight.logger.error error.inspect
63
- ''
64
- rescue OpenSSL::SSL::SSLError => error
58
+ rescue Faraday::ConnectionFailed, Faraday::TimeoutError, OpenSSL::SSL::SSLError => error
65
59
  Geoblacklight.logger.error error.inspect
66
60
  ''
67
61
  end
@@ -8,8 +8,8 @@ module Geoblacklight
8
8
  end
9
9
 
10
10
  def create_search_params
11
- { fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=layer_slug_s}layer_slug_s:#{@search_id}"],
12
- fl: [Settings.FIELDS.TITLE, 'layer_slug_s', Settings.FIELDS.GEOM_TYPE] }
11
+ { fq: ["{!join from=#{Settings.FIELDS.SOURCE} to=#{Settings.FIELDS.UNIQUE_KEY}}#{Settings.FIELDS.UNIQUE_KEY}:#{@search_id}"],
12
+ fl: [Settings.FIELDS.TITLE, Settings.FIELDS.UNIQUE_KEY, Settings.FIELDS.GEOM_TYPE] }
13
13
  end
14
14
 
15
15
  def execute_query
@@ -9,7 +9,7 @@ module Geoblacklight
9
9
 
10
10
  def create_search_params
11
11
  { fq: "#{Settings.FIELDS.SOURCE}:#{@search_id}",
12
- fl: [Settings.FIELDS.TITLE, 'layer_slug_s', Settings.FIELDS.GEOM_TYPE] }
12
+ fl: [Settings.FIELDS.TITLE, Settings.FIELDS.UNIQUE_KEY, Settings.FIELDS.GEOM_TYPE] }
13
13
  end
14
14
 
15
15
  def execute_query
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Geoblacklight
3
- VERSION = '3.0.0'
3
+ VERSION = '3.3.1'
4
4
  end
@@ -25,10 +25,7 @@ module Geoblacklight
25
25
  request.options.timeout = Settings.TIMEOUT_WMS
26
26
  request.options.open_timeout = Settings.TIMEOUT_WMS
27
27
  end
28
- rescue Faraday::ConnectionFailed => error
29
- Geoblacklight.logger.error error.inspect
30
- { error: error.inspect }
31
- rescue Faraday::TimeoutError => error
28
+ rescue Faraday::ConnectionFailed, Faraday::TimeoutError => error
32
29
  Geoblacklight.logger.error error.inspect
33
30
  { error: error.inspect }
34
31
  end
@@ -106,4 +106,9 @@ namespace :geoblacklight do
106
106
  Rake::Task['geoblacklight:index:seed'].invoke
107
107
  end
108
108
  end
109
+
110
+ desc 'Stdout output asset paths'
111
+ task application_asset_paths: [:environment] do
112
+ puts Rails.application.config.assets.paths
113
+ end
109
114
  end