#!/usr/bin/env rake require 'rubygems' require 'bundler/setup' require 'fileutils' require 'logger' require 'rake/testtask' require 'active_support/all' require 'bundler/gem_tasks' ######################################################################################################### # Load ENV vars if FileTest.exist?('.powenv') File.open('.powenv', 'rb') do |powenv| contents = powenv.read lines = contents.gsub('export ', '').split(/\n\r?/).reject{|line| line.blank?} lines.each do |line| keyValue = line.split('=', 2) next unless keyValue.count == 2 ENV[keyValue.first] = keyValue.last.gsub("'",'').gsub('"','') end end end if !ENV['RACK_ENV'] or ENV['RACK_ENV'] == 'development' Rake::TestTask.new do |t| t.libs.push 'lib' t.libs.push 'test' t.pattern = 'test/**/*_test.rb' t.verbose = false end ######################################################################################################### Rake::TaskManager.record_task_metadata = true task :default do puts "\nAVAILABLE TASKS:" Rake.application.options.show_tasks = :tasks Rake.application.options.full_description = false Rake.application.options.show_task_pattern = // Rake.application.display_tasks_and_comments puts "\n" end task :environment do end