From 0025d10c7055ec5a531d110cfbf69c47544a93c7 Mon Sep 17 00:00:00 2001 From: jrgriffiniii <1443986+jrgriffiniii@users.noreply.github.com> Date: Fri, 20 Jan 2023 15:23:43 -0500 Subject: [PATCH 1/4] Introduces upgrades which ensures that Ruby 3.0.z releases are supported --- .circleci/config.yml | 12 ++++----- .lando.yml | 27 +++++++++++++++++++ .rubocop.yml | 5 ++-- Gemfile | 6 +++-- Rakefile | 2 -- hydra-derivatives.gemspec | 5 +--- lib/hydra/derivatives.rb | 1 + lib/hydra/derivatives/audio_encoder.rb | 1 + lib/hydra/derivatives/config.rb | 1 + lib/hydra/derivatives/io_decorator.rb | 3 ++- lib/hydra/derivatives/logger.rb | 7 ++--- lib/hydra/derivatives/processors.rb | 1 + .../derivatives/processors/active_encode.rb | 1 + lib/hydra/derivatives/processors/audio.rb | 1 + lib/hydra/derivatives/processors/ffmpeg.rb | 1 + lib/hydra/derivatives/processors/image.rb | 3 ++- .../derivatives/processors/jpeg2k_image.rb | 5 ++-- lib/hydra/derivatives/processors/processor.rb | 1 + lib/hydra/derivatives/processors/raw_image.rb | 1 + .../processors/shell_based_processor.rb | 9 ++++--- lib/hydra/derivatives/processors/video.rb | 1 + .../derivatives/processors/video/config.rb | 1 + .../derivatives/processors/video/processor.rb | 1 + .../runners/active_encode_derivatives.rb | 1 + .../derivatives/runners/audio_derivatives.rb | 1 + .../runners/document_derivatives.rb | 1 + .../derivatives/runners/full_text_extract.rb | 1 + .../derivatives/runners/image_derivatives.rb | 1 + .../runners/jpeg2k_image_derivatives.rb | 1 + .../derivatives/runners/pdf_derivatives.rb | 1 + lib/hydra/derivatives/runners/runner.rb | 1 + .../derivatives/runners/video_derivatives.rb | 1 + .../services/capability_service.rb | 1 + .../derivatives/services/mime_type_service.rb | 1 + ...ist_basic_contained_output_file_service.rb | 1 + ...rsist_external_file_output_file_service.rb | 1 + .../services/persist_output_file_service.rb | 1 + .../services/remote_source_file.rb | 1 + .../services/retrieve_source_file_service.rb | 1 + .../derivatives/services/tempfile_service.rb | 1 + spec/processors/active_encode_spec.rb | 1 + spec/processors/document_spec.rb | 1 + spec/processors/full_text_spec.rb | 9 ++++--- spec/processors/image_spec.rb | 1 + spec/processors/jpeg2k_spec.rb | 5 +++- spec/processors/processor_spec.rb | 1 + spec/processors/shell_based_processor_spec.rb | 1 + spec/processors/video_spec.rb | 13 ++++----- .../runners/active_encode_derivatives_spec.rb | 5 ++-- spec/runners/runner_spec.rb | 1 + spec/services/audio_derivatives_spec.rb | 5 ++-- ...asic_contained_output_file_service_spec.rb | 1 + ..._external_file_output_file_service_spec.rb | 1 + .../persist_output_file_service_spec.rb | 1 + spec/services/remote_source_file_spec.rb | 1 + .../retrieve_source_file_service_spec.rb | 1 + spec/services/tempfile_service_spec.rb | 1 + spec/spec_helper.rb | 1 + spec/units/audio_encoder_spec.rb | 1 + spec/units/config_spec.rb | 1 + spec/units/derivatives_spec.rb | 1 + spec/units/io_decorator_spec.rb | 1 + spec/units/logger_spec.rb | 1 + spec/units/transcoding_spec.rb | 1 + 64 files changed, 127 insertions(+), 42 deletions(-) create mode 100644 .lando.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 2749528..15390be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,15 +74,15 @@ jobs: workflows: ci: jobs: + - bundle_lint_test: + name: ruby3-0 + ruby_version: 3.0.3 - bundle_lint_test: name: ruby2-7 ruby_version: 2.7.5 - bundle_lint_test: name: ruby2-6 ruby_version: 2.6.9 - - bundle_lint_test: - name: ruby2-5 - ruby_version: 2.5.9 nightly: triggers: @@ -93,12 +93,12 @@ workflows: only: - main jobs: + - bundle_lint_test: + name: ruby3-0 + ruby_version: 3.0.3 - bundle_lint_test: name: ruby2-7 ruby_version: 2.7.5 - bundle_lint_test: name: ruby2-6 ruby_version: 2.6.9 - - bundle_lint_test: - name: ruby2-5 - ruby_version: 2.5.9 diff --git a/.lando.yml b/.lando.yml new file mode 100644 index 0000000..6827955 --- /dev/null +++ b/.lando.yml @@ -0,0 +1,27 @@ +name: hydra_derivatives +services: + fcrepo4: + type: compose + app_mount: false + portforward: true + volumes: + fcrepo4: + services: + image: samvera/fcrepo4:4.7.5 + command: /fedora-entrypoint.sh + volumes: + - fcrepo4:/data + ports: + - 8986:8080 + solr: + type: solr:7 + app_mount: false + portforward: 8985 + core: hydra-test + config: + dir: solr/config +proxy: + fcrepo4: + - hydra-derivatives.fcrepo4.lndo.site:8986 + solr: + - hydra-derivatives.solr.lndo.site:8985 diff --git a/.rubocop.yml b/.rubocop.yml index 7803c60..d4ae166 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,5 @@ -require: rubocop-rspec +inherit_gem: + bixby: bixby_default.yml inherit_from: .rubocop_todo.yml AllCops: @@ -12,7 +13,7 @@ AllCops: - Rakefile Layout/IndentationConsistency: - EnforcedStyle: rails + EnforcedStyle: indented_internal_methods Metrics/AbcSize: Max: 42 diff --git a/Gemfile b/Gemfile index 7c9e6f6..d98698f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,16 @@ source 'https://rubygems.org' +gem 'active-triples', git: 'https://github.com/samvera-labs/ActiveTriples.git', branch: 'issues-5-jrgriffiniii-rdf-3.2' +gem 'active-fedora', git: 'https://github.com/samvera/active_fedora.git', branch: 'ruby3' + # Please see hydra-derivatives.gemspec for dependency information. gemspec gem 'sprockets', '~> 3.7' group :development, :test do + gem 'bixby' gem 'coveralls' gem 'rspec_junit_formatter' - gem 'rubocop', '~> 0.52.0', require: false - gem 'rubocop-rspec', require: false gem 'simplecov' end diff --git a/Rakefile b/Rakefile index 2ecccc3..7a22c96 100644 --- a/Rakefile +++ b/Rakefile @@ -2,8 +2,6 @@ require "bundler/gem_tasks" -# Dir.glob('tasks/*.rake').each { |r| import r } - require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) diff --git a/hydra-derivatives.gemspec b/hydra-derivatives.gemspec index 2152b14..fa14b66 100644 --- a/hydra-derivatives.gemspec +++ b/hydra-derivatives.gemspec @@ -22,10 +22,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rspec', '~> 3.1' spec.add_development_dependency "solr_wrapper", "~> 2.0" - spec.add_dependency 'active-fedora', '>= 11.5.6', - '!= 12.0.0', '!= 12.0.1', '!= 12.0.2', '!= 12.0.3', '!= 12.1.0', '!= 12.1.1', '!= 12.2.0', '!= 12.2.1', - '!= 13.0.0', '!= 13.1.0', '!= 13.1.1', '!= 13.1.2', '!= 13.1.3', '!= 13.2.0', '!= 13.2.1' - spec.add_dependency 'active_encode', '~>0.1' + spec.add_dependency 'active_encode', '~> 0.1' spec.add_dependency 'activesupport', '>= 4.0', '< 7' spec.add_dependency 'addressable', '~> 2.5' spec.add_dependency 'deprecation' diff --git a/lib/hydra/derivatives.rb b/lib/hydra/derivatives.rb index 8f9580b..7509fed 100644 --- a/lib/hydra/derivatives.rb +++ b/lib/hydra/derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_fedora' require 'deprecation' diff --git a/lib/hydra/derivatives/audio_encoder.rb b/lib/hydra/derivatives/audio_encoder.rb index db35b16..3550f69 100644 --- a/lib/hydra/derivatives/audio_encoder.rb +++ b/lib/hydra/derivatives/audio_encoder.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'open3' module Hydra::Derivatives diff --git a/lib/hydra/derivatives/config.rb b/lib/hydra/derivatives/config.rb index ff60a70..ea1c00a 100644 --- a/lib/hydra/derivatives/config.rb +++ b/lib/hydra/derivatives/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'tmpdir' module Hydra diff --git a/lib/hydra/derivatives/io_decorator.rb b/lib/hydra/derivatives/io_decorator.rb index 893f790..d7fe564 100644 --- a/lib/hydra/derivatives/io_decorator.rb +++ b/lib/hydra/derivatives/io_decorator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Naive implementation of IO wrapper class that adds mime_type and original_filename # attributes. This is done to match the interface of ActionDispatch::HTTP::UploadedFile # so the attributes do not have to be passed as additional arguments, and are attached @@ -16,7 +17,7 @@ class IoDecorator < SimpleDelegator alias original_name original_filename deprecation_deprecate original_name: 'original_name has been deprecated. Use original_filename instead. This will be removed in hydra-derivatives 4.0' alias original_name= original_filename= - deprecation_deprecate :"original_name=" => 'original_name= has been deprecated. Use original_filename= instead. This will be removed in hydra-derivatives 4.0' + deprecation_deprecate "original_name=": 'original_name= has been deprecated. Use original_filename= instead. This will be removed in hydra-derivatives 4.0' def initialize(file, mime_type = nil, original_filename = nil) super(file) diff --git a/lib/hydra/derivatives/logger.rb b/lib/hydra/derivatives/logger.rb index 15d45f9..0847096 100644 --- a/lib/hydra/derivatives/logger.rb +++ b/lib/hydra/derivatives/logger.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class Logger class << self @@ -17,9 +18,9 @@ def respond_to_missing?(method_name, include_private = false) private - def logger - ActiveFedora::Base.logger || ::Logger.new(STDOUT) - end + def logger + ActiveFedora::Base.logger || ::Logger.new(STDOUT) + end end end end diff --git a/lib/hydra/derivatives/processors.rb b/lib/hydra/derivatives/processors.rb index dda01cb..7096814 100644 --- a/lib/hydra/derivatives/processors.rb +++ b/lib/hydra/derivatives/processors.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives module Processors extend ActiveSupport::Autoload diff --git a/lib/hydra/derivatives/processors/active_encode.rb b/lib/hydra/derivatives/processors/active_encode.rb index 3da8dbb..d5c3e84 100644 --- a/lib/hydra/derivatives/processors/active_encode.rb +++ b/lib/hydra/derivatives/processors/active_encode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_encode' module Hydra::Derivatives::Processors diff --git a/lib/hydra/derivatives/processors/audio.rb b/lib/hydra/derivatives/processors/audio.rb index 6bc4580..b6c10ec 100644 --- a/lib/hydra/derivatives/processors/audio.rb +++ b/lib/hydra/derivatives/processors/audio.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives::Processors class Audio < Processor include Ffmpeg diff --git a/lib/hydra/derivatives/processors/ffmpeg.rb b/lib/hydra/derivatives/processors/ffmpeg.rb index e9f3d8b..c2a1392 100644 --- a/lib/hydra/derivatives/processors/ffmpeg.rb +++ b/lib/hydra/derivatives/processors/ffmpeg.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # An abstract class for asyncronous jobs that transcode files using FFMpeg module Hydra::Derivatives::Processors module Ffmpeg diff --git a/lib/hydra/derivatives/processors/image.rb b/lib/hydra/derivatives/processors/image.rb index ab3f8ff..d319e08 100644 --- a/lib/hydra/derivatives/processors/image.rb +++ b/lib/hydra/derivatives/processors/image.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'mini_magick' module Hydra::Derivatives::Processors @@ -61,7 +62,7 @@ def quality end def selected_layers(image) - if image.type =~ /pdf/i + if /pdf/i.match?(image.type) image.layers[directives.fetch(:layer, 0)] elsif directives.fetch(:layer, false) image.layers[directives.fetch(:layer)] diff --git a/lib/hydra/derivatives/processors/jpeg2k_image.rb b/lib/hydra/derivatives/processors/jpeg2k_image.rb index 1e3c8e1..216d226 100644 --- a/lib/hydra/derivatives/processors/jpeg2k_image.rb +++ b/lib/hydra/derivatives/processors/jpeg2k_image.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'mini_magick' require 'nokogiri' @@ -90,9 +91,7 @@ def process long_dim = self.class.long_dim(image) file_path = self.class.tmp_file('.tif') to_srgb = directives.fetch(:to_srgb, true) - if directives[:resize] || to_srgb - preprocess(image, resize: directives[:resize], to_srgb: to_srgb, src_quality: quality) - end + preprocess(image, resize: directives[:resize], to_srgb: to_srgb, src_quality: quality) if directives[:resize] || to_srgb image.write file_path recipe = self.class.kdu_compress_recipe(directives, quality, long_dim) encode_file(recipe, file_path: file_path) diff --git a/lib/hydra/derivatives/processors/processor.rb b/lib/hydra/derivatives/processors/processor.rb index 850f764..1597f21 100644 --- a/lib/hydra/derivatives/processors/processor.rb +++ b/lib/hydra/derivatives/processors/processor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives::Processors # Processors take a single input and produce a single output class Processor diff --git a/lib/hydra/derivatives/processors/raw_image.rb b/lib/hydra/derivatives/processors/raw_image.rb index f205708..40b403a 100644 --- a/lib/hydra/derivatives/processors/raw_image.rb +++ b/lib/hydra/derivatives/processors/raw_image.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'mini_magick' module Hydra::Derivatives::Processors diff --git a/lib/hydra/derivatives/processors/shell_based_processor.rb b/lib/hydra/derivatives/processors/shell_based_processor.rb index 0aee2dc..6ed61fa 100644 --- a/lib/hydra/derivatives/processors/shell_based_processor.rb +++ b/lib/hydra/derivatives/processors/shell_based_processor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # An abstract class for asyncronous jobs that transcode files using FFMpeg require 'tmpdir' @@ -59,7 +60,7 @@ def execute_with_timeout(timeout, command, context) end def execute_without_timeout(command, context) - err_str = '' + error_buffer = '' stdin, stdout, stderr, wait_thr = popen3(command) context[:pid] = wait_thr[:pid] files = [stderr, stdout] @@ -78,7 +79,9 @@ def execute_without_timeout(command, context) case fileno when stderr.fileno - err_str << data + updated_error_buffer = error_buffer.dup + updated_error_buffer << data + error_buffer = updated_error_buffer end rescue EOFError Hydra::Derivatives::Logger.debug "Caught an eof error in ShellBasedProcessor" @@ -91,7 +94,7 @@ def execute_without_timeout(command, context) stderr.close exit_status = wait_thr.value - raise "Unable to execute command \"#{command}\". Exit code: #{exit_status}\nError message: #{err_str}" unless exit_status.success? + raise "Unable to execute command \"#{command}\". Exit code: #{exit_status}\nError message: #{error_buffer}" unless exit_status.success? end def all_eof?(files) diff --git a/lib/hydra/derivatives/processors/video.rb b/lib/hydra/derivatives/processors/video.rb index 297657f..5e89130 100644 --- a/lib/hydra/derivatives/processors/video.rb +++ b/lib/hydra/derivatives/processors/video.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives::Processors module Video extend ActiveSupport::Autoload diff --git a/lib/hydra/derivatives/processors/video/config.rb b/lib/hydra/derivatives/processors/video/config.rb index ab209bc..aed3a87 100644 --- a/lib/hydra/derivatives/processors/video/config.rb +++ b/lib/hydra/derivatives/processors/video/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives::Processors::Video class Config attr_writer :video_bitrate, :video_attributes, :size_attributes, :audio_attributes diff --git a/lib/hydra/derivatives/processors/video/processor.rb b/lib/hydra/derivatives/processors/video/processor.rb index 07c499c..8b9fd5a 100644 --- a/lib/hydra/derivatives/processors/video/processor.rb +++ b/lib/hydra/derivatives/processors/video/processor.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives::Processors module Video class Processor < Hydra::Derivatives::Processors::Processor diff --git a/lib/hydra/derivatives/runners/active_encode_derivatives.rb b/lib/hydra/derivatives/runners/active_encode_derivatives.rb index 4712f00..31bf8f3 100644 --- a/lib/hydra/derivatives/runners/active_encode_derivatives.rb +++ b/lib/hydra/derivatives/runners/active_encode_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class ActiveEncodeDerivatives < Runner # @param [String, ActiveFedora::Base] object_or_filename source file name (or path), or an object that has a method that will return the file name diff --git a/lib/hydra/derivatives/runners/audio_derivatives.rb b/lib/hydra/derivatives/runners/audio_derivatives.rb index f47f99e..44831e2 100644 --- a/lib/hydra/derivatives/runners/audio_derivatives.rb +++ b/lib/hydra/derivatives/runners/audio_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class AudioDerivatives < Runner def self.processor_class diff --git a/lib/hydra/derivatives/runners/document_derivatives.rb b/lib/hydra/derivatives/runners/document_derivatives.rb index 1680a49..80d2547 100644 --- a/lib/hydra/derivatives/runners/document_derivatives.rb +++ b/lib/hydra/derivatives/runners/document_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class DocumentDerivatives < Runner def self.processor_class diff --git a/lib/hydra/derivatives/runners/full_text_extract.rb b/lib/hydra/derivatives/runners/full_text_extract.rb index 23e1514..aeece0a 100644 --- a/lib/hydra/derivatives/runners/full_text_extract.rb +++ b/lib/hydra/derivatives/runners/full_text_extract.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class FullTextExtract < ImageDerivatives # Adds format: 'txt' as the default to each of the directives diff --git a/lib/hydra/derivatives/runners/image_derivatives.rb b/lib/hydra/derivatives/runners/image_derivatives.rb index b0ddd02..a90717d 100644 --- a/lib/hydra/derivatives/runners/image_derivatives.rb +++ b/lib/hydra/derivatives/runners/image_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class ImageDerivatives < Runner # Adds format: 'png' as the default to each of the directives diff --git a/lib/hydra/derivatives/runners/jpeg2k_image_derivatives.rb b/lib/hydra/derivatives/runners/jpeg2k_image_derivatives.rb index 61f81e5..7b32023 100644 --- a/lib/hydra/derivatives/runners/jpeg2k_image_derivatives.rb +++ b/lib/hydra/derivatives/runners/jpeg2k_image_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class Jpeg2kImageDerivatives < Runner # # Adds format: 'png' as the default to each of the directives diff --git a/lib/hydra/derivatives/runners/pdf_derivatives.rb b/lib/hydra/derivatives/runners/pdf_derivatives.rb index 5c505ea..532ca1a 100644 --- a/lib/hydra/derivatives/runners/pdf_derivatives.rb +++ b/lib/hydra/derivatives/runners/pdf_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra module Derivatives class PdfDerivatives < ImageDerivatives diff --git a/lib/hydra/derivatives/runners/runner.rb b/lib/hydra/derivatives/runners/runner.rb index 88e7c73..a23374d 100644 --- a/lib/hydra/derivatives/runners/runner.rb +++ b/lib/hydra/derivatives/runners/runner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra module Derivatives class Runner diff --git a/lib/hydra/derivatives/runners/video_derivatives.rb b/lib/hydra/derivatives/runners/video_derivatives.rb index f838b43..d73034f 100644 --- a/lib/hydra/derivatives/runners/video_derivatives.rb +++ b/lib/hydra/derivatives/runners/video_derivatives.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class VideoDerivatives < Runner def self.processor_class diff --git a/lib/hydra/derivatives/services/capability_service.rb b/lib/hydra/derivatives/services/capability_service.rb index b3ec83c..21a1736 100644 --- a/lib/hydra/derivatives/services/capability_service.rb +++ b/lib/hydra/derivatives/services/capability_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'open3' module Hydra::Derivatives diff --git a/lib/hydra/derivatives/services/mime_type_service.rb b/lib/hydra/derivatives/services/mime_type_service.rb index b2cacc8..8fab50f 100644 --- a/lib/hydra/derivatives/services/mime_type_service.rb +++ b/lib/hydra/derivatives/services/mime_type_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'mime/types' module Hydra::Derivatives diff --git a/lib/hydra/derivatives/services/persist_basic_contained_output_file_service.rb b/lib/hydra/derivatives/services/persist_basic_contained_output_file_service.rb index aed9898..f96f8dd 100644 --- a/lib/hydra/derivatives/services/persist_basic_contained_output_file_service.rb +++ b/lib/hydra/derivatives/services/persist_basic_contained_output_file_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives # This Service is an implementation of the Hydra::Derivatives::PeristOutputFileService # It supports basic contained files, which is the behavior associated with Fedora 3 file datastreams that were migrated to Fedora 4 diff --git a/lib/hydra/derivatives/services/persist_external_file_output_file_service.rb b/lib/hydra/derivatives/services/persist_external_file_output_file_service.rb index 95ec7b6..5632218 100644 --- a/lib/hydra/derivatives/services/persist_external_file_output_file_service.rb +++ b/lib/hydra/derivatives/services/persist_external_file_output_file_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'addressable' module Hydra::Derivatives diff --git a/lib/hydra/derivatives/services/persist_output_file_service.rb b/lib/hydra/derivatives/services/persist_output_file_service.rb index 04b1d05..1b6359b 100644 --- a/lib/hydra/derivatives/services/persist_output_file_service.rb +++ b/lib/hydra/derivatives/services/persist_output_file_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class PersistOutputFileService # Persists the file within the object at destination_name. Uses basic containment. diff --git a/lib/hydra/derivatives/services/remote_source_file.rb b/lib/hydra/derivatives/services/remote_source_file.rb index 569fa10..68b1f9d 100644 --- a/lib/hydra/derivatives/services/remote_source_file.rb +++ b/lib/hydra/derivatives/services/remote_source_file.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # For the case where the source file is a remote file, and we # don't want to download the file locally, just return the # file name or file path (or whatever we need to pass to the diff --git a/lib/hydra/derivatives/services/retrieve_source_file_service.rb b/lib/hydra/derivatives/services/retrieve_source_file_service.rb index 1ae3b31..063128e 100644 --- a/lib/hydra/derivatives/services/retrieve_source_file_service.rb +++ b/lib/hydra/derivatives/services/retrieve_source_file_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Hydra::Derivatives class RetrieveSourceFileService # Retrieves the source diff --git a/lib/hydra/derivatives/services/tempfile_service.rb b/lib/hydra/derivatives/services/tempfile_service.rb index f8b4047..a7d62ca 100644 --- a/lib/hydra/derivatives/services/tempfile_service.rb +++ b/lib/hydra/derivatives/services/tempfile_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'mime/types' module Hydra::Derivatives diff --git a/spec/processors/active_encode_spec.rb b/spec/processors/active_encode_spec.rb index 55ed253..57f0c2e 100644 --- a/spec/processors/active_encode_spec.rb +++ b/spec/processors/active_encode_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::ActiveEncode do diff --git a/spec/processors/document_spec.rb b/spec/processors/document_spec.rb index f10c94d..01f2574 100644 --- a/spec/processors/document_spec.rb +++ b/spec/processors/document_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::Document do diff --git a/spec/processors/full_text_spec.rb b/spec/processors/full_text_spec.rb index 79618da..5fd36cc 100644 --- a/spec/processors/full_text_spec.rb +++ b/spec/processors/full_text_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::FullText do @@ -42,7 +43,7 @@ it "calls the extraction service" do expect(processor).to receive(:check_for_ssl) expect(Net::HTTP).to receive(:start).with('example.com', 99, http_options).and_yield(req) - expect(Net::HTTP::Post).to receive(:new).with('/solr/update', "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244").and_return(req) + expect(Net::HTTP::Post).to receive(:new).with('/solr/update', { "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244" }).and_return(req) expect(req).to receive(:request).and_return(resp) expect(subject).to eq response_body end @@ -56,7 +57,7 @@ it "calls the extraction service" do expect(processor).to receive(:check_for_ssl) expect(Net::HTTP).to receive(:start).with('example.com', 99, http_options).and_yield(req) - expect(Net::HTTP::Post).to receive(:new).with('/solr/update', "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244").and_return(req) + expect(Net::HTTP::Post).to receive(:new).with('/solr/update', { "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244" }).and_return(req) expect(req).to receive(:request).and_return(resp) expect(subject).to eq response_utf8 end @@ -68,7 +69,7 @@ it "raises an error" do expect(processor).to receive(:check_for_ssl) expect(Net::HTTP).to receive(:start).with('example.com', 99, http_options).and_yield(req) - expect(Net::HTTP::Post).to receive(:new).with('/solr/update', "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244").and_return(req) + expect(Net::HTTP::Post).to receive(:new).with('/solr/update', { "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244" }).and_return(req) expect(req).to receive(:request).and_return(resp) expect { subject }.to raise_error(RuntimeError, %r{^Solr Extract service was unsuccessful. 'https://example\.com:99/solr/update' returned code 500}) end @@ -81,7 +82,7 @@ it "calls the extraction service with basic auth" do expect(processor).to receive(:check_for_ssl) expect(Net::HTTP).to receive(:start).with('example.com', 99, http_options).and_yield(req) - expect(Net::HTTP::Post).to receive(:new).with('/solr/update', "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244").and_return(req) + expect(Net::HTTP::Post).to receive(:new).with('/solr/update', { "Content-Type" => "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "Content-Length" => "24244" }).and_return(req) expect(req).to receive(:basic_auth).with('user', 'password') expect(req).to receive(:request).and_return(resp) expect(subject).to eq response_body diff --git a/spec/processors/image_spec.rb b/spec/processors/image_spec.rb index 1df15ba..c06bcf2 100644 --- a/spec/processors/image_spec.rb +++ b/spec/processors/image_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::Image do diff --git a/spec/processors/jpeg2k_spec.rb b/spec/processors/jpeg2k_spec.rb index b44c87b..f55967e 100644 --- a/spec/processors/jpeg2k_spec.rb +++ b/spec/processors/jpeg2k_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'yaml' @@ -28,7 +29,9 @@ describe "#kdu_compress_recipe" do before(:all) do - @sample_cfg = YAML.load_file(File.expand_path('../../fixtures/jpeg2k_config.yml', __FILE__))['test'] + @sample_cfg_path = File.expand_path('../../fixtures/jpeg2k_config.yml', __FILE__) + @sample_cfg_yaml = YAML.load_file(@sample_cfg_path, aliases: true) + @sample_cfg = @sample_cfg_yaml['test'] Hydra::Derivatives.kdu_compress_recipes = @sample_cfg['jp2_recipes'] end after(:all) do diff --git a/spec/processors/processor_spec.rb b/spec/processors/processor_spec.rb index 6a2f034..c70000e 100644 --- a/spec/processors/processor_spec.rb +++ b/spec/processors/processor_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::Processor do diff --git a/spec/processors/shell_based_processor_spec.rb b/spec/processors/shell_based_processor_spec.rb index a3bf29d..e6f502e 100644 --- a/spec/processors/shell_based_processor_spec.rb +++ b/spec/processors/shell_based_processor_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::ShellBasedProcessor do diff --git a/spec/processors/video_spec.rb b/spec/processors/video_spec.rb index 29a2424..460d94b 100644 --- a/spec/processors/video_spec.rb +++ b/spec/processors/video_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Processors::Video::Processor do @@ -15,7 +16,7 @@ let(:directives) { { label: :thumb, format: "mp4", url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail' } } it "is configurable" do - expect(subject).to receive(:encode_file).with("mp4", Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec mpeg4 -acodec aac -strict -2 -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "") + expect(subject).to receive(:encode_file).with("mp4", { Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec mpeg4 -acodec aac -strict -2 -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "" }) subject.process end end @@ -25,7 +26,7 @@ let(:directives) { { label: :thumb, format: 'webm', url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail' } } it "creates a fedora resource and infers the name" do - expect(subject).to receive(:encode_file).with("webm", Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec libvpx -acodec libvorbis -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "") + expect(subject).to receive(:encode_file).with("webm", { Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec libvpx -acodec libvorbis -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "" }) subject.process end end @@ -34,7 +35,7 @@ let(:directives) { { label: :thumb, format: 'jpg', url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail' } } it "creates a fedora resource and infers the name" do - expect(subject).to receive(:encode_file).with("jpg", output_options: "-s 320x240 -vcodec mjpeg -vframes 1 -an -f rawvideo", input_options: " -itsoffset -2") + expect(subject).to receive(:encode_file).with("jpg", { output_options: "-s 320x240 -vcodec mjpeg -vframes 1 -an -f rawvideo", input_options: " -itsoffset -2" }) subject.process end end @@ -43,7 +44,7 @@ let(:directives) { { label: :thumb, format: 'mkv', url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail' } } it "creates a fedora resource and infers the name" do - expect(subject).to receive(:encode_file).with("mkv", Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec ffv1 -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "") + expect(subject).to receive(:encode_file).with("mkv", { Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec ffv1 -g 30 -b:v 345k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "" }) subject.process end end @@ -60,7 +61,7 @@ let(:directives) { { label: :thumbnail, format: 'mp4', url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail', bitrate: "4000k" } } it "creates a fedora resource and infers the name" do - expect(subject).to receive(:encode_file).with("mp4", Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec libx264 -acodec aac -g 30 -b:v 4000k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "") + expect(subject).to receive(:encode_file).with("mp4", { Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 320x240 -vcodec libx264 -acodec aac -g 30 -b:v 4000k -ac 2 -ab 96k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "" }) subject.process end end @@ -69,7 +70,7 @@ let(:directives) { { label: :thumbnail, format: 'mp4', url: 'http://localhost:8983/fedora/rest/dev/1234/thumbnail', size: "1080x720", input_options: "-t 10 -ss 1", video: "-g 30 -b:v 4000k", audio: "-b:a 256k -ar 44100" } } it "creates a fedora resource and infers the name" do - expect(subject).to receive(:encode_file).with("mp4", Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 1080x720 -vcodec libx264 -acodec aac -g 30 -b:v 4000k -b:a 256k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "-t 10 -ss 1") + expect(subject).to receive(:encode_file).with("mp4", { Hydra::Derivatives::Processors::Ffmpeg::OUTPUT_OPTIONS => "-s 1080x720 -vcodec libx264 -acodec aac -g 30 -b:v 4000k -b:a 256k -ar 44100", Hydra::Derivatives::Processors::Ffmpeg::INPUT_OPTIONS => "-t 10 -ss 1" }) subject.process end end diff --git a/spec/runners/active_encode_derivatives_spec.rb b/spec/runners/active_encode_derivatives_spec.rb index 18d581f..6c2fd7f 100644 --- a/spec/runners/active_encode_derivatives_spec.rb +++ b/spec/runners/active_encode_derivatives_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::ActiveEncodeDerivatives do @@ -17,7 +18,7 @@ class TestVideo < ActiveFedora::Base let(:processor) { instance_double('processor') } it 'calls the processor with the right arguments' do - expect(Hydra::Derivatives::Processors::ActiveEncode).to receive(:new).with(file_path, low_res_video, output_file_service: Hydra::Derivatives::PersistExternalFileOutputFileService).and_return(processor) + expect(Hydra::Derivatives::Processors::ActiveEncode).to receive(:new).with(file_path, low_res_video, { output_file_service: Hydra::Derivatives::PersistExternalFileOutputFileService }).and_return(processor) expect(processor).to receive(:process) described_class.create(video_record, options) end @@ -29,7 +30,7 @@ class TestVideo < ActiveFedora::Base let(:options) { { encode_class: TestEncode, source: :remote_file_name, outputs: [low_res_video] } } it 'calls the processor with the right arguments' do - expect(Hydra::Derivatives::Processors::ActiveEncode).to receive(:new).with(file_path, low_res_video, output_file_service: Hydra::Derivatives::PersistExternalFileOutputFileService, encode_class: TestEncode).and_return(processor) + expect(Hydra::Derivatives::Processors::ActiveEncode).to receive(:new).with(file_path, low_res_video, { output_file_service: Hydra::Derivatives::PersistExternalFileOutputFileService, encode_class: TestEncode }).and_return(processor) expect(processor).to receive(:process) described_class.create(video_record, options) end diff --git a/spec/runners/runner_spec.rb b/spec/runners/runner_spec.rb index 7d6799b..35061f7 100644 --- a/spec/runners/runner_spec.rb +++ b/spec/runners/runner_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Hydra::Derivatives::Runner do diff --git a/spec/services/audio_derivatives_spec.rb b/spec/services/audio_derivatives_spec.rb index f483db6..48a0572 100644 --- a/spec/services/audio_derivatives_spec.rb +++ b/spec/services/audio_derivatives_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::AudioDerivatives do @@ -29,7 +30,7 @@ def self.call(file_name, _options, &_block) end context "with an object" do - let(:object) { "Fake Object" } + let(:object) { double } let(:source_name) { :content } let(:file) { instance_double("the file") } @@ -51,7 +52,7 @@ def self.call(file_name, _options, &_block) subject { described_class } it "relies on the source_file_service" do - expect(subject.source_file_service).to receive(:call).with('foo/bar.aiff', baz: true) + expect(subject.source_file_service).to receive(:call).with('foo/bar.aiff', { baz: true }) subject.source_file('foo/bar.aiff', baz: true) end end diff --git a/spec/services/persist_basic_contained_output_file_service_spec.rb b/spec/services/persist_basic_contained_output_file_service_spec.rb index 5285898..14567a1 100644 --- a/spec/services/persist_basic_contained_output_file_service_spec.rb +++ b/spec/services/persist_basic_contained_output_file_service_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::PersistBasicContainedOutputFileService do diff --git a/spec/services/persist_external_file_output_file_service_spec.rb b/spec/services/persist_external_file_output_file_service_spec.rb index a2c4395..b6b699a 100644 --- a/spec/services/persist_external_file_output_file_service_spec.rb +++ b/spec/services/persist_external_file_output_file_service_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::PersistExternalFileOutputFileService do diff --git a/spec/services/persist_output_file_service_spec.rb b/spec/services/persist_output_file_service_spec.rb index 8d21167..7f058b0 100644 --- a/spec/services/persist_output_file_service_spec.rb +++ b/spec/services/persist_output_file_service_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' RSpec.describe Hydra::Derivatives::PersistOutputFileService do diff --git a/spec/services/remote_source_file_spec.rb b/spec/services/remote_source_file_spec.rb index 7026705..ecb41f1 100644 --- a/spec/services/remote_source_file_spec.rb +++ b/spec/services/remote_source_file_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' class TestObject < ActiveFedora::Base diff --git a/spec/services/retrieve_source_file_service_spec.rb b/spec/services/retrieve_source_file_service_spec.rb index d0f4e11..38207a2 100644 --- a/spec/services/retrieve_source_file_service_spec.rb +++ b/spec/services/retrieve_source_file_service_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::RetrieveSourceFileService do diff --git a/spec/services/tempfile_service_spec.rb b/spec/services/tempfile_service_spec.rb index 2aafa3b..8c1730f 100644 --- a/spec/services/tempfile_service_spec.rb +++ b/spec/services/tempfile_service_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::TempfileService do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 55b3509..3e4775f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ENV['environment'] ||= 'test' ENV['RAILS_ENV'] = 'test' diff --git a/spec/units/audio_encoder_spec.rb b/spec/units/audio_encoder_spec.rb index 892226c..4597110 100644 --- a/spec/units/audio_encoder_spec.rb +++ b/spec/units/audio_encoder_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::AudioEncoder do diff --git a/spec/units/config_spec.rb b/spec/units/config_spec.rb index 866bf37..33b0b9b 100644 --- a/spec/units/config_spec.rb +++ b/spec/units/config_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe "the configuration" do diff --git a/spec/units/derivatives_spec.rb b/spec/units/derivatives_spec.rb index 6847d6f..e242ae3 100644 --- a/spec/units/derivatives_spec.rb +++ b/spec/units/derivatives_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives do diff --git a/spec/units/io_decorator_spec.rb b/spec/units/io_decorator_spec.rb index 486ec25..1303ea3 100644 --- a/spec/units/io_decorator_spec.rb +++ b/spec/units/io_decorator_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' require 'stringio' diff --git a/spec/units/logger_spec.rb b/spec/units/logger_spec.rb index fd2d7bf..6ce72f2 100644 --- a/spec/units/logger_spec.rb +++ b/spec/units/logger_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Hydra::Derivatives::Logger do diff --git a/spec/units/transcoding_spec.rb b/spec/units/transcoding_spec.rb index 4adabbc..e334555 100644 --- a/spec/units/transcoding_spec.rb +++ b/spec/units/transcoding_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe "Transcoding" do From 633e3acb9e2f9916864bee5d00df8387c2e8dd65 Mon Sep 17 00:00:00 2001 From: Chris Colvard Date: Wed, 25 Jan 2023 15:38:59 -0500 Subject: [PATCH 2/4] Test on newer ruby and rails versions --- .circleci/config.yml | 12 ++++++++++++ hydra-derivatives.gemspec | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15390be..21b5d71 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -74,6 +74,12 @@ jobs: workflows: ci: jobs: + - bundle_lint_test: + name: ruby3-2 + ruby_version: 3.2.0 + - bundle_lint_test: + name: ruby3-1 + ruby_version: 3.1.3 - bundle_lint_test: name: ruby3-0 ruby_version: 3.0.3 @@ -93,6 +99,12 @@ workflows: only: - main jobs: + - bundle_lint_test: + name: ruby3-2 + ruby_version: 3.2.0 + - bundle_lint_test: + name: ruby3-1 + ruby_version: 3.1.3 - bundle_lint_test: name: ruby3-0 ruby_version: 3.0.3 diff --git a/hydra-derivatives.gemspec b/hydra-derivatives.gemspec index fa14b66..8066da9 100644 --- a/hydra-derivatives.gemspec +++ b/hydra-derivatives.gemspec @@ -17,13 +17,13 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler', '~> 2.1' spec.add_development_dependency 'fcrepo_wrapper', '~> 0.2' spec.add_development_dependency 'pry-byebug' - spec.add_development_dependency 'rails', '> 5.1', '< 7.0' - spec.add_development_dependency 'rake', '~> 10.1' + spec.add_development_dependency 'rails', '> 5.1', '< 7.1' + spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.1' - spec.add_development_dependency "solr_wrapper", "~> 2.0" + spec.add_development_dependency "solr_wrapper" spec.add_dependency 'active_encode', '~> 0.1' - spec.add_dependency 'activesupport', '>= 4.0', '< 7' + spec.add_dependency 'activesupport', '>= 4.0', '< 7.1' spec.add_dependency 'addressable', '~> 2.5' spec.add_dependency 'deprecation' spec.add_dependency 'mime-types', '> 2.0', '< 4.0' From 1badf2e8b1224d1f7ae965c4c88ff4893f6d70d1 Mon Sep 17 00:00:00 2001 From: jrgriffiniii <1443986+jrgriffiniii@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:28:38 -0500 Subject: [PATCH 3/4] Ensuring that the 14.0.z release series is specified as a dependency --- Gemfile | 1 - hydra-derivatives.gemspec | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index d98698f..c8527fc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,6 @@ source 'https://rubygems.org' gem 'active-triples', git: 'https://github.com/samvera-labs/ActiveTriples.git', branch: 'issues-5-jrgriffiniii-rdf-3.2' -gem 'active-fedora', git: 'https://github.com/samvera/active_fedora.git', branch: 'ruby3' # Please see hydra-derivatives.gemspec for dependency information. gemspec diff --git a/hydra-derivatives.gemspec b/hydra-derivatives.gemspec index 8066da9..71bd642 100644 --- a/hydra-derivatives.gemspec +++ b/hydra-derivatives.gemspec @@ -23,6 +23,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency "solr_wrapper" spec.add_dependency 'active_encode', '~> 0.1' + spec.add_dependency 'active-fedora', '>= 14.0' spec.add_dependency 'activesupport', '>= 4.0', '< 7.1' spec.add_dependency 'addressable', '~> 2.5' spec.add_dependency 'deprecation' From 87f9571f18fb30aa02ce9fb14e36bc6a25e3ccd2 Mon Sep 17 00:00:00 2001 From: jrgriffiniii <1443986+jrgriffiniii@users.noreply.github.com> Date: Wed, 1 Feb 2023 14:13:42 -0500 Subject: [PATCH 4/4] Specifying active-triples 1.2.z release series as a dependency --- Gemfile | 2 -- hydra-derivatives.gemspec | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index c8527fc..bb5b55e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,5 @@ source 'https://rubygems.org' -gem 'active-triples', git: 'https://github.com/samvera-labs/ActiveTriples.git', branch: 'issues-5-jrgriffiniii-rdf-3.2' - # Please see hydra-derivatives.gemspec for dependency information. gemspec diff --git a/hydra-derivatives.gemspec b/hydra-derivatives.gemspec index 71bd642..005cb3d 100644 --- a/hydra-derivatives.gemspec +++ b/hydra-derivatives.gemspec @@ -24,6 +24,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'active_encode', '~> 0.1' spec.add_dependency 'active-fedora', '>= 14.0' + spec.add_dependency 'active-triples', '>= 1.2' spec.add_dependency 'activesupport', '>= 4.0', '< 7.1' spec.add_dependency 'addressable', '~> 2.5' spec.add_dependency 'deprecation'