Sha256: d1ca65c0c98ec626d1d3b1c4a4007660928e8812bb9fef99ad17266a4372d418

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 KB

Contents

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

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

4 entries across 4 versions & 1 rubygems

Version Path
earth-1.2.1 Rakefile
earth-1.1.2 Rakefile
earth-1.1.1 Rakefile
earth-1.1.0 Rakefile