app/services/importo/import_context.rb in importo-3.0.14 vs app/services/importo/import_context.rb in importo-3.0.15

- old
+ new

@@ -1,9 +1,16 @@ # frozen_string_literal: true module Importo - class ImportContext < ApplicationContext - input do - attribute :import, type: Import, typecaster: ->(value) { value.is_a?(Import) ? value : Import.find(value) } + if defined?(Servitium) && ApplicationContext < Servitium::Context + class ImportContext < ApplicationContext + input do + attribute :import, type: Import, typecaster: ->(value) { value.is_a?(Import) ? value : Import.find(value) } + end end + else + class ImportContext < ApplicationContext + attribute :import, :model, class_name: "Importo::Import" + end + end end