Sha256: 3a37791186fb036e1f231e5a1e7339b58b71b960b62dc6dbbc565ce8821e13ae

Contents?: true

Size: 1.09 KB

Versions: 4

Compression:

Stored size: 1.09 KB

Contents

require "bundler/gem_tasks"
require "rake/testtask"
require "dotenv"

$LOAD_PATH.unshift File.expand_path('..', __FILE__)

Dotenv.load

Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/*_spec.rb']
  t.verbose = true
end

namespace :test do
  task :coveralls do
    ENV['COVERALLS'] = 'true'
    Rake::Task['test:coverage'].invoke
  end

  task :coverage do
    ENV['COVERAGE'] = 'true'
    Rake::Task['test'].invoke
  end

  task :scrutinizer do
    ENV['SCRUTINIZER'] = 'true'
    Rake::Task['test'].invoke
  end
end

namespace :db do
  desc "Run migrations"
  task :migrate, [:version] do |t, args|
    require "test/support/database"

    Sequel.extension :migration

    db = TestDb.instance.adapter

    if args[:version]
      puts "Migrating to version #{args[:version]}"
      Sequel::Migrator.run(db, "db/migrations", target: args[:version].to_i)
    else
      puts "Migrating to latest"
      Sequel::Migrator.run(db, "db/migrations")
    end
  end

  task :create do
    puts "please create manually your table"
  end
end

task default: :test

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
koine-repository-1.1.1 Rakefile
koine-repository-1.1 Rakefile
koine-repository-1.0 Rakefile
koine-repository-0.9.0 Rakefile