Sha256: fd75bbc11f8bd26e6e5cf2608349b64a73702c158e77d905f404d1fec4e6a138

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

begin
  require 'bundler/setup'
rescue LoadError
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end

require 'rdoc/task'

RDoc::Task.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'G5Updatable'
  rdoc.options << '--line-numbers'
  rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
load 'rails/tasks/engine.rake'

Bundler::GemHelper.install_tasks

require 'rspec/core'
require 'rspec/core/rake_task'

Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each { |f| load f }

namespace :db do
  namespace :test do
    desc 'Set up a new test database'
    task :setup do
      Rails.env = 'test'
      Rake::Task['app:db:create'].invoke
      Rake::Task['app:db:migrate'].invoke
    end

    desc 'Drop the test database'
    task :drop do
      Rails.env = 'test'
      Rake::Task['app:db:drop'].invoke
    end
  end
end

desc 'Set up test db and run all specs'
RSpec::Core::RakeTask.new(spec: 'db:test:setup')
task default: :spec

namespace :spec do
  desc 'Run tests and clean up the db afterwards'
  task clean: :spec do
    Rake::Task['db:test:drop'].invoke
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
g5_updatable-1.0.2.pre.1 Rakefile