Skip to content

Commit

Permalink
Allow someone to set the class to use for GeoServer coverage. This will
Browse files Browse the repository at this point in the history
allow us to insert a work-around for the problem described in
curationexperts/iris#50
  • Loading branch information
val99erie committed Apr 20, 2018
1 parent 084a815 commit 087ebf3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/services/geo_works/delivery/geoserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module Delivery
class Geoserver
attr_reader :config, :workspace_name, :file_set, :file_path

class_attribute :coverage_class
self.coverage_class = RGeoServer::Coverage

def initialize(file_set, file_path)
@file_set = file_set
@file_path = file_path
Expand Down Expand Up @@ -88,9 +91,9 @@ def persist_coveragestore
end

def persist_coverage
coverage = RGeoServer::Coverage.new catalog, workspace: workspace,
coverage_store: coveragestore,
name: coveragestore.name
coverage = coverage_class.new catalog, workspace: workspace,
coverage_store: coveragestore,
name: coveragestore.name
coverage.title = coveragestore.name
coverage.metadata_links = []
coverage.save
Expand Down

0 comments on commit 087ebf3

Please sign in to comment.