Sha256: 0e94d3afd996e339b19004a3010970c9e5b2bd9ddedb1c825c9875913df40d39

Contents?: true

Size: 612 Bytes

Versions: 46

Compression:

Stored size: 612 Bytes

Contents

namespace :db do
  namespace :dataset do
    desc "Load one or more datasets into the current environment's database using DATASETS=name,name"
    task :load => :environment do
      require 'dataset'
      dataset_names = (ENV['DATASETS'] || 'default').split(',')
      
      context = Class.new do
        extend Dataset::ContextClassMethods
        datasets_directory [
          "#{RAILS_ROOT}/spec/datasets",
          "#{RAILS_ROOT}/test/datasets"
        ].detect {|path| File.directory?(path)}
        add_dataset *dataset_names
        dataset_session.load_datasets_for self
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 8 rubygems

Version Path
aiwilliams-dataset-1.2.0 tasks/dataset.rake
aiwilliams-dataset-1.3.0 tasks/dataset.rake
aiwilliams-dataset-1.3.1 tasks/dataset.rake
karsthammer-dataset-1.2.0 tasks/dataset.rake
radiant-1.1.4 lib/tasks/dataset.rake
radiant-1.1.3 lib/tasks/dataset.rake
radiant-1.1.2 lib/tasks/dataset.rake
radiant-1.1.1 lib/tasks/dataset.rake
radiant-1.1.0 lib/tasks/dataset.rake
radiant-1.1.0.rc1 lib/tasks/dataset.rake
radiant-1.1.0.beta lib/tasks/dataset.rake
radiant-1.0.1 lib/tasks/dataset.rake
radiant-1.1.0.alpha lib/tasks/dataset.rake
radiant-1.0.0 lib/tasks/dataset.rake
radiant-1.0.0.rc5 lib/tasks/dataset.rake
radiant-1.0.0.rc4 lib/tasks/dataset.rake
radiant-1.0.0.rc3 lib/tasks/dataset.rake
kajam-1.0.3.rc2 vendor/plugins/dataset/tasks/dataset.rake
radiant-1.0.0.rc2 vendor/plugins/dataset/tasks/dataset.rake
radiant-1.0.0.rc1 vendor/plugins/dataset/tasks/dataset.rake