Sha256: f85dea8c55bfa7f2288513e5e08d8b85a7cc0a1bfad7b6d7f90a12c67869714c

Contents?: true

Size: 945 Bytes

Versions: 41

Compression:

Stored size: 945 Bytes

Contents

namespace :minio do
  desc "Print the ENV variables set for the MinIO commands, if any"
  task env: :environment do
    if MinIO.configuration.nil?
      warn "You have not configured the MinIO gem with any values to generate ENV variables"
      next
    end

    puts "MINIO_ROOT_USER=#{MinIO.configuration.username}"
    puts "MINIO_ROOT_PASSWORD=#{MinIO.configuration.password}"

    true
  end

  desc "Start the MinIO object storage server, e.g. rake minio:server -- --directory=storage/minio"
  task server: :environment do
    options = {}
    if (separator_index = ARGV.index("--"))
      ARGV.slice(separator_index + 1, ARGV.length)
        .map { |pair| pair.split("=") }
        .each { |opt| options[opt[0]] = opt[1] || nil }
    end
    directory = options.delete("--directory") || options.delete("-directory") || "storage/minio"
    options.symbolize_keys!

    MinIO::Commands.server(directory, async: true, **options)
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
minio-0.4.0-x86_64-linux lib/tasks/minio_tasks.rake
minio-0.4.0 lib/tasks/minio_tasks.rake
minio-0.4.0-x86_64-darwin lib/tasks/minio_tasks.rake
minio-0.4.0-x64-mingw32 lib/tasks/minio_tasks.rake
minio-0.4.0-x64-mingw-ucrt lib/tasks/minio_tasks.rake
minio-0.4.0-arm64-linux lib/tasks/minio_tasks.rake
minio-0.4.0-arm64-darwin lib/tasks/minio_tasks.rake
minio-0.4.0-aarch64-linux lib/tasks/minio_tasks.rake
minio-0.3.2-x86_64-linux lib/tasks/minio_tasks.rake
minio-0.3.2-x86_64-darwin lib/tasks/minio_tasks.rake
minio-0.3.2-x64-mingw32 lib/tasks/minio_tasks.rake
minio-0.3.2-x64-mingw-ucrt lib/tasks/minio_tasks.rake
minio-0.3.2-arm64-linux lib/tasks/minio_tasks.rake
minio-0.3.2-arm64-darwin lib/tasks/minio_tasks.rake
minio-0.3.2-aarch64-linux lib/tasks/minio_tasks.rake
minio-0.3.2 lib/tasks/minio_tasks.rake
minio-0.3.1 lib/tasks/minio_tasks.rake
minio-0.3.1-x86_64-linux lib/tasks/minio_tasks.rake
minio-0.3.1-x86_64-darwin lib/tasks/minio_tasks.rake
minio-0.3.1-x64-mingw32 lib/tasks/minio_tasks.rake