require "bundler/gem_tasks" require 'rspec/core/rake_task' require "sinatra/activerecord/rake" require "pry" require "perkins" desc 'Default: run unit specs.' task :default => :spec desc 'Test perkins.' RSpec::Core::RakeTask.new('spec') do |t| t.pattern = FileList['spec/**/*_spec.rb'] end #usage: PERKINS_CONFIG=./examples/config.rb RACK_ENV=development rake db:migrate --trace namespace :db do task :load_config do ENV['RACK_ENV'] = ENV['RACK_ENV'].present? ? ENV['RACK_ENV'] : "development" config_file = ENV["PERKINS_CONFIG"] app = eval(File.open(config_file).read) end end