Sha256: 2117d4265764891edb3023ce15edefe64948f2874328bfb1918d732795e55d8f

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

# desc "Explaining what the task does"
# task :bpluser do
#   # Task goes here
# end

# APP_ROOT = File.expand_path("../..", __FILE__)

namespace :bpluser do
  namespace :update do
    desc 'Copy over the updated migrations needed for new version'
    task migrations: :environment do
      ENV['MIGRATIONS_PATH'] = 'db/update_migrate'

      if Rake::Task.task_defined?('bpluser:install:migrations')
        Rake::Task['bpluser:install:migrations'].invoke
      else
        Rake::Task['app:bpluser:install:migrations'].invoke
      end
    end
  end

  namespace :test_index do
    desc 'Put sample data into test app solr'
    task seed: :environment do
      require 'yaml'
      docs = YAML.safe_load(File.open(File.join(File.join(Bpluser.root,
                                                          'spec',
                                                          'fixtures',
                                                          'sample_solr_documents.yml'))))
      conn = Blacklight.default_index.connection
      conn.add docs
      conn.commit
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bpluser-0.5.0 lib/tasks/bpluser_tasks.rake
bpluser-0.4.0 lib/tasks/bpluser_tasks.rake
bpluser-0.3.0 lib/tasks/bpluser_tasks.rake
bpluser-0.2.0.4 lib/tasks/bpluser_tasks.rake
bpluser-0.2.0.3 lib/tasks/bpluser_tasks.rake
bpluser-0.2.0.2 lib/tasks/bpluser_tasks.rake
bpluser-0.2.0.1 lib/tasks/bpluser_tasks.rake