Skip to content
Snippets Groups Projects
Commit 1a5de4cc authored by Anusha Ranganathan's avatar Anusha Ranganathan
Browse files

Merge branch 'develop' into feature/s3_storage

parents 823f03ef 91513cce
No related branches found
No related tags found
3 merge requests!115Tombstone not available for dataset,!77Bump ruby v2.7.7,!26Feature/s3 storage
......@@ -87,6 +87,7 @@ IIIF_SEARCH_ENDPOINT=
CONFIG_IIIF_IMAGE_ENDPOINT=
# If the rails server is configured to serve requests in https, set this to true
IIIF_TO_SERVE_SSL_URLS=false
CRC_FOLDER_IMPORT_PATH=/mnt/rdms_data/RUB/testData
# Browse Everything credentials
GOOGLE_DRIVE_CLIENT_ID=
......
......@@ -90,6 +90,7 @@ IIIF_SEARCH_ENDPOINT=
CONFIG_IIIF_IMAGE_ENDPOINT=
# If the rails server is configured to serve requests in https, set this to true
IIIF_TO_SERVE_SSL_URLS=false
CRC_FOLDER_IMPORT_PATH=/mnt/rdms_data/RUB/testData
# Browse Everything credentials
GOOGLE_DRIVE_CLIENT_ID=
......
......@@ -103,6 +103,7 @@ services:
web:
<<: *app
command: bash -c "/bin/docker-entrypoint.sh"
restart: unless-stopped
environment:
- VIRTUAL_HOST=rdms.docker
- VIRTUAL_PORT=3000
......
......@@ -84,13 +84,24 @@ class PrepareCsvFromCrcFolder
]
end
def crc_1280_collection_source_indentifier
collection_type = Hyrax::CollectionType.find_or_create_by(title: 'CRC 1280')
collection_type_gid = "gid://hyrax3-app/Hyrax::CollectionType/#{collection_type.id}"
crc_1280_collections = collection_type.collections.select{ |t| t.title == ["CRC 1280"] }
return "" unless crc_1280_collections.any?
crc_1280_collections.first.source.join
end
def prepare_group_data(group_folder_path, csv)
experiment_folders_path = Dir.glob("#{group_folder_path}/*").select { |item| Pathname(item).directory? }
title = group_folder_path.split('/').last
source_identifier = SecureRandom.uuid
csv << ['Collection', 'CRC 1280', '', source_identifier, '', title]
csv << ['Collection', 'CRC 1280', '', source_identifier, crc_1280_collection_source_indentifier, title]
return unless experiment_folders_path.present?
......
# frozen_string_literal: true
namespace :rdms do
namespace :crc_1280_collection do
desc "Create CRC 1280 Collection Types and CRC 1280 Collection"
task create: :environment do
collection_type = Hyrax::CollectionType.find_or_create_by(title: 'CRC 1280')
collection_type_gid = "gid://hyrax3-app/Hyrax::CollectionType/#{collection_type.id}"
crc_1280_collections = collection_type.collections.select{ |t| t.title == ["CRC 1280"] }
unless crc_1280_collections.any?
collection = Hyrax.config.collection_class.create(title: ['CRC 1280'], source:[SecureRandom.uuid], collection_type_gid: collection_type_gid)
admin_user = User.find_by(email: 'admin@hyrax')
collection.apply_depositor_metadata(admin_user.user_key)
collection.save
end
end
end
end
\ No newline at end of file
......@@ -39,6 +39,7 @@ namespace :rdms do
Rake::Task['hyrax:default_admin_set:create'].invoke
Rake::Task['hyrax:workflow:load'].invoke
Rake::Task['hyrax:default_collection_types:create'].invoke
Rake::Task['rdms:crc_1280_collection:create'].invoke
##############################################
# Create languages controlled vocabulary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment