Sha256: 2bd6518044bdcf2f2d33396bbc31ebf6d4a69b7c18a3ac0298d75514ba1e2c13

Contents?: true

Size: 680 Bytes

Versions: 10

Compression:

Stored size: 680 Bytes

Contents

require 'active_record/fixtures'
require 'tasks/subject_type'
require 'tasks/subject_heading_type'

desc "create initial records for enju_subject"
namespace :enju_subject do
  task :setup => :environment do
    Dir.glob(Rails.root.to_s + '/db/fixtures/enju_subject/*.yml').each do |file|
      ActiveRecord::Fixtures.create_fixtures('db/fixtures/enju_subject', File.basename(file, '.*'))
    end

    puts 'initial fixture files loaded.'
  end

  desc "upgrade enju_subject"
  task :upgrade => :environment do
    SubjectType.transaction do
      update_subject_type
      update_subject_heading_type
    end
    puts 'enju_subject: The upgrade completed successfully.'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
enju_subject-0.1.1 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre34 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre33 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre32 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre31 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre30 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre29 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre28 lib/tasks/enju_subject_tasks.rake
enju_subject-0.1.0.pre27 lib/tasks/enju_subject_tasks.rake