Sha256: 8ae492ae3452c16d4bac3a00f6ff00c6a8f946ccbf42dd19d96fd951f7f85950
Contents?: true
Size: 949 Bytes
Versions: 7
Compression:
Stored size: 949 Bytes
Contents
namespace :data_sanity do namespace :db do desc 'Create data inspector model for data sanity results' task :migrate => :environment do Dir.chdir("#{Rails.root}") do system "rails generate model DataInspector table_name:string table_primary_key:string primary_key_value:string validation_errors:text" end end desc 'Destroy data inspector model for data sanity results' task :rollback => :environment do Dir.chdir("#{Rails.root}") do system "rails destroy model DataInspector" end end end desc 'Creating a sample criteria file' task :criteria do Dir.chdir("#{Rails.root}") do system "cp #{SOURCE_PATH}/data_sanity/templates/data_sanity_criteria.yml #{Rails.root}/config/." end end desc 'Data Sanity run investigation' task :investigate, [:validate, :records_per_model] => :environment do |t, args| DataSanity::Inspector.new(args).investigate end end
Version data entries
7 entries across 7 versions & 1 rubygems