Skip to content

Commit

Permalink
Fixing CLI integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jun 22, 2018
1 parent 67d5198 commit 801791e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/commands/migrate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
require "thor"

class Migrate < Thor
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('config/environment.rb')

desc "exhibit_thumbnails", "Migrate the IIIF Manifests to the latest IIIF image service points"
def exhibit_thumbnails
Spotlight::ExhibitThumbnail.all.each do |exhibit_thumbnail|
::Spotlight::ExhibitThumbnail.all.each do |exhibit_thumbnail|
Rails.logger.debug "Retrieving the Solr Document for #{exhibit_thumbnail}..."
document = exhibit_thumbnail.document
next unless document && document["readonly_references_ssim"] && !document["readonly_references_ssim"].empty?
Expand Down Expand Up @@ -64,5 +67,3 @@ def exhibit_thumbnails
end
end
end

Migrate.start(ARGV)

0 comments on commit 801791e

Please sign in to comment.