Sha256: 49bd6150f803a9d31fc8f9876d23b279acc62ba0d04182c830edf3dfbc591018

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

namespace :active_metadata do
  namespace :ci do
    ENV['COVERAGE'] = 'on'
    ENV['JCI'] = 'on'
    ENV['RAILS_ENV'] ||= 'test'

    task :migrate, :environment do
      sh "mkdir -p spec/dummy/tmp/cache"
      Rake::Task["app:db:create"].invoke
      Rake::Task["app:db:migrate"].invoke
    end

    task :rspec do
      Rake::Task["ci:setup:rspec"].invoke
      Rake::Task["spec"].invoke
    end

    task :cucumber do
      ENV["CUCUMBER_OPTS"] = "--format junit --out features/reports --format html --out features/reports/cucumber.ht"
      Rake::Task["app:cucumber"].invoke
    end
  end
end

task "active_metadata:ci" => ["app:active_metadata:ci:migrate", "app:active_metadata:ci:rspec", "app:active_metadata:ci:cucumber"]

namespace :active_metadata do

  desc "Install the active_metadata gem requirements file ***TASK IS ON ALPHA STAGE***"
  task :install do

    FileUtils.cp File.expand_path('../../../config/active_metadata.yml', __FILE__), File.expand_path('config/')
    puts "Installed active_metadata.yml"

    puts "Copying migrations"
    ts = Time.now.utc.strftime('%Y%m%d%H%M%S')
    FileUtils.cp File.expand_path('../../../db/migrate/01_active_metadata_migrations.rb', __FILE__), File.expand_path("db/migrate/#{ts}_active_metadata_migrations.rb")
    puts "run rake db:migrate to complete the gem installation"

  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
active_metadata-0.8.5 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.4 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.3.1 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.3 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.2 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.1 lib/tasks/active_metadata_tasks.rake
active_metadata-0.8.0 lib/tasks/active_metadata_tasks.rake
active_metadata-0.7.9 lib/tasks/active_metadata_tasks.rake
active_metadata-0.7.8 lib/tasks/active_metadata_tasks.rake
active_metadata-0.7.7 lib/tasks/active_metadata_tasks.rake
active_metadata-0.7.6 lib/tasks/active_metadata_tasks.rake
active_metadata-0.7.5 lib/tasks/active_metadata_tasks.rake