Sha256: 6f43caf9cb00b9233c2886324beb7b3f3d9257c6ce6c95bdcdd9cd87ba860b8f

Contents?: true

Size: 790 Bytes

Versions: 28

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true
namespace :hyrax do
  namespace :default_collection_types do
    desc "Create Default Collection Types"
    task create: :environment do
      default = Hyrax::CollectionType.find_or_create_default_collection_type
      admin_set = Hyrax::CollectionType.find_or_create_admin_set_type
      if Hyrax::CollectionType.exists?(machine_id: default.machine_id)
        puts "Default collection type is #{default.machine_id}"
      else
        warn "ERROR: A default collection type did not get created."
      end
      if Hyrax::CollectionType.exists?(machine_id: admin_set.machine_id)
        puts "Default collection type is #{admin_set.machine_id}"
      else
        warn "ERROR: The Admin Set collection type did not get created."
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
hyrax-5.0.4 lib/tasks/default_collection_type.rake
hyrax-5.0.3 lib/tasks/default_collection_type.rake
hyrax-5.0.2 lib/tasks/default_collection_type.rake
hyrax-5.0.1 lib/tasks/default_collection_type.rake
hyrax-5.0.0 lib/tasks/default_collection_type.rake
hyrax-5.0.0.rc3 lib/tasks/default_collection_type.rake
hyrax-5.0.0.rc2 lib/tasks/default_collection_type.rake
hyrax-5.0.0.rc1 lib/tasks/default_collection_type.rake
hyrax-3.6.0 lib/tasks/default_collection_type.rake
hyrax-4.0.0 lib/tasks/default_collection_type.rake
hyrax-4.0.0.rc3 lib/tasks/default_collection_type.rake
hyrax-4.0.0.rc2 lib/tasks/default_collection_type.rake
hyrax-4.0.0.rc1 lib/tasks/default_collection_type.rake
hyrax-3.5.0 lib/tasks/default_collection_type.rake
hyrax-4.0.0.beta2 lib/tasks/default_collection_type.rake
hyrax-3.4.2 lib/tasks/default_collection_type.rake
hyrax-4.0.0.beta1 lib/tasks/default_collection_type.rake
hyrax-3.4.1 lib/tasks/default_collection_type.rake
hyrax-3.4.0 lib/tasks/default_collection_type.rake
hyrax-3.3.0 lib/tasks/default_collection_type.rake