Sha256: 416bf0c52efd57376ad6da474fb1d1614c2efb580b9c61ee16642e5cb667404f

Contents?: true

Size: 687 Bytes

Versions: 29

Compression:

Stored size: 687 Bytes

Contents

# frozen_string_literal: true
namespace :hyrax do
  namespace :user do
    desc "list user's email"
    task "list_emails", [:file_name] => :environment do |_cmd, args|
      file_name = args[:file_name]
      file_name ||= "user_emails.txt"
      users = User.all.map(&:email).reject(&:blank?)
      f = File.new(file_name, "w")
      f.write(users.join(", "))
      f.close
    end

    desc 'Populate user tokens'
    task tokens: :environment do
      unless Hyrax.config.arkivo_api?
        puts "Zotero integration is not enabled"
        next
      end
      User.where(arkivo_token: nil).each do |user|
        user.set_arkivo_token
        user.save
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

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