Sha256: d35ed6b3f331dd6659a87b1f8823ace41d7548de4d32955c4f537ec27fa0b08e

Contents?: true

Size: 768 Bytes

Versions: 15

Compression:

Stored size: 768 Bytes

Contents


# frozen_string_literal: true
module Hyrax
  module RequiredDataSeeders
    # This class was created for use in rake tasks and db/seeds.rb.  It generates
    # collections that are required for all Hyrax applications.
    #
    # Seeders of required data are non-destructive.  If the data already exists,
    # it will not be replaced.
    class CollectionSeeder
      class << self
        attr_accessor :logger

        def generate_seeds(logger: Logger.new(STDOUT))
          @logger = logger

          logger.info("Adding required collections...")

          default_admin_set = Hyrax::AdminSetCreateService.find_or_create_default_admin_set
          logger.info "   #{default_admin_set.title.first} -- FOUND OR CREATED"
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-5.0.0 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-5.0.0.rc3 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-5.0.0.rc2 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-5.0.0.rc1 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-3.6.0 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0.rc3 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0.rc2 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0.rc1 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-3.5.0 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0.beta2 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-3.4.2 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-4.0.0.beta1 app/utils/hyrax/required_data_seeders/collection_seeder.rb
hyrax-3.4.1 app/utils/hyrax/required_data_seeders/collection_seeder.rb