Sha256: 45879d40cf1d30657beabc89376b71fca6820bf8ae79134b56577babbdb4c911
Contents?: true
Size: 698 Bytes
Versions: 5
Compression:
Stored size: 698 Bytes
Contents
require 'bundler' require 'yaml' require 'English' Bundler::GemHelper.install_tasks CONFIG = YAML.load_file( File.expand_path('spec/support/database.yml', File.dirname(__FILE__)) ) def test_database_exists? system "psql -l | grep -q #{CONFIG['test'][:database]}" $CHILD_STATUS.success? end def create_test_database system "createdb #{CONFIG['test'][:database]}" end namespace :db do task :create do create_test_database unless test_database_exists? end end require 'rubocop/rake_task' RuboCop::RakeTask.new do |t| t.options = ['-d'] end require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:rspec) do |t| t.rspec_opts = '-f d -c' end task default: [:rspec, :rubocop]
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
permanent_records-4.1.6 | Rakefile |
permanent_records-4.1.5 | Rakefile |
permanent_records-4.1.4 | Rakefile |
permanent_records-4.1.3 | Rakefile |
permanent_records-4.1.2 | Rakefile |