Skip to content

Commit

Permalink
StandardRB fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed May 1, 2024
1 parent 3f2a3e5 commit a65f615
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/models/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def item_viewer
# DocumentAssets
def document_assets
scope = Kithe::Asset
scope = scope.where(parent_id: self.id)
scope = scope.where(parent_id: id)

# scope = scope.page(params[:page]).per(20).order(created_at: :desc)
scope.includes(:parent)
Expand Down
11 changes: 4 additions & 7 deletions app/services/geoblacklight_admin/image_service/tms.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# frozen_string_literal: true

require 'addressable/uri'
require "addressable/uri"

module GeoblacklightAdmin
class ImageService
module Tms
##
# Formats and returns a thumbnail url from a Web Map Service endpoint.
# Formats and returns a thumbnail url for a TMS endpoint from a Web Map Service.
# This utilizes the GeoServer specific 'reflect' service to generate
# parameters like bbox that are difficult to tweak without more detailed
# information about the layer.
# @param [SolrDocument]
# @param [Integer] thumbnail size
# @return [String] wms thumbnail url
# @return [String] tms thumbnail url
def self.image_url(document, size)
puts "\nTMS IMAGE URL..."
puts "document.viewer_endpoint: #{document.viewer_endpoint.inspect}"
Expand All @@ -29,12 +29,9 @@ def self.image_url(document, size)

puts "Parsed URL: #{parsed_url.inspect}"

# Extract the path from the URL
path = parsed_url.path

# Build a hash to store the extracted components
parsed_data = {
base_url: "#{parsed_url.scheme}://#{parsed_url.host}#{parsed_url.port ? ':' + parsed_url.port.to_s : ''}",
base_url: "#{parsed_url.scheme}://#{parsed_url.host}#{parsed_url.port ? ":" + parsed_url.port.to_s : ""}",
path_pattern: parsed_url.path
}

Expand Down
2 changes: 1 addition & 1 deletion lib/geoblacklight_admin/rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module GeoblacklightAdmin
module RakeTask
Dir[File.expand_path(File.join(File.dirname(__FILE__), "tasks/*.rake"))].each { |ext| load ext } if defined?(Rake)
end
end
end

0 comments on commit a65f615

Please sign in to comment.