Sha256: 31d4f1666ca969a8dbce790eb422bc8ee26c7b94b8d01a8899ae693aff45f9a6

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 KB

Contents

require 'bundler'
Bundler.setup
Bundler::GemHelper.install_tasks

require 'bueller'
Bueller::Tasks.new

desc "Load a console"
task :console do
  ENV['EARTH_ENV'] ||= 'test'
  require 'earth'
  
  DataMiner.logger = ActiveRecord::Base.logger = Logger.new('log/test.log')
  DataMiner.unit_converter = :conversions
  
  Earth.init :all, :connect => true
  
  require 'irb'
  ARGV.clear
  IRB.start
end

require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:examples) do |c|
  if ENV['RSPEC_FORMAT']
    c.rspec_opts = "-Ispec --format #{ENV['RSPEC_FORMAT']}"
  else
    c.rspec_opts = '-Ispec'
  end
end

if RUBY_VERSION =~ /^1\.8/
  desc "Run specs with RCov"
  RSpec::Core::RakeTask.new(:examples_with_coverage) do |t|
    t.rcov = true
    t.rcov_opts = ['--exclude', 'spec']
    t.rspec_opts = '-Ispec'
  end
end

desc "Run tests with RSpec - see spec/spec_helper for configuration options e.g. data sanity-checking"
task :test => :examples
task :default => :test

require 'earth/version'
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "earth #{Earth::VERSION}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

ENV['DATABASE_URL'] ||= 'mysql2://root:password@localhost/test_earth'
require 'earth/tasks'
Earth::Tasks.new

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
earth-1.0.3 Rakefile
earth-1.0.2 Rakefile
earth-1.0.1 Rakefile