Skip to content

Commit

Permalink
Merge pull request #40 from samvera-labs/coverage_class
Browse files Browse the repository at this point in the history
Allow someone to set the class to use for GeoServer coverage.
  • Loading branch information
eliotjordan authored Apr 23, 2018
2 parents 7f7b1f0 + 087ebf3 commit df1eff3
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 df1eff3

Please sign in to comment.