Sha256: 76a12ac95797e9c85662c9638aa85042a9da4e49cb88effc41360cfaad5ae12e

Contents?: true

Size: 2 KB

Versions: 1

Compression:

Stored size: 2 KB

Contents

require 'rubygems'
require 'rake'
require 'rake/testtask'
require './lib/rails-units'

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "rails-units"
    gem.summary = %Q{A class that performs unit conversions and unit math}
    gem.description = %Q{Provides classes and methods to perform unit math and conversions}
    gem.authors = ["Kevin Olbrich, Ph.D."]
    gem.email = ["spike@scpike.net"]
    gem.homepage = "https://github.com/scpiek/rails-units"
    gem.files.exclude(".*")
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

begin
  require 'rcov/rcovtask'
  desc "Generate code coverage"
  Rcov::RcovTask.new do |t|
    t.test_files = FileList['test/test*.rb']
    #t.verbose = true     # uncomment to see the executed command
  end
rescue LoadError
end

begin
  require 'rspec/core/rake_task'

  desc "Run specs"
  RSpec::Core::RakeTask.new

  desc  "Run all specs with rcov"
  RSpec::Core::RakeTask.new("spec:rcov") do |t|
    t.rcov = true
    t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/,features\/}
  end
rescue LoadError
end


desc "Run unit tests"
Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList['test/test*.rb']
end

task :specs => :spec

desc "Run tests against several ruby versions, requires rvm"
task :multitest do
  rubies = %w{
      ruby-1.8.7@ruby-units
      ruby-1.8.7@ruby-units-with-chronic
      ruby-1.9.2-head@ruby-units
      ruby-1.9.2-head@ruby-units-with-chronic
      rbx-head@ruby-units
      jruby-head@ruby-units
      }
  exec "rvm #{rubies.join(',')} tests"
end

desc "Run specs against several ruby versions, requires rvm"
task :multispec do
  rubies = %w{
      ruby-1.8.7@ruby-units
      ruby-1.8.7@ruby-units-with-chronic
      ruby-1.9.2-head@ruby-units
      ruby-1.9.2-head@ruby-units-with-chronic
      rbx-head@ruby-units
      jruby-head@ruby-units
      }
  exec "rvm #{rubies.join(',')} specs"
end

task :default => :test

task :tests => :test

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails-units-1.5.1 RakeFile