Sha256: fb45474f9551d89dacb9952dffa09df7c278c5b793aab50c97310369d4c8ed1a

Contents?: true

Size: 1.96 KB

Versions: 5

Compression:

Stored size: 1.96 KB

Contents

# encoding: utf-8

require 'spec'
require 'spec/rake/spectask'
require 'yard'

YARD::Rake::YardocTask.new do |t|
  t.files   = ['lib/**/*.rb']   # optional
  t.options = ['--markup=markdown'] # optional
end

task :spec => ['spec:private', 'spec:rails2_2:cleanup', 'spec:rails2_3:cleanup']
namespace(:spec) do
  Spec::Rake::SpecTask.new(:private) do |t|
    t.spec_opts ||= []
    t.spec_opts << "-rubygems"
    t.spec_opts << "--options" << "spec/spec.opts"
    t.spec_files = FileList['spec/private/**/*_spec.rb']
  end

  namespace(:rails2_2) do
    task :unzip do
      sh('rm -rf spec/rails2_2/vendor')
      sh('unzip -qq spec/rails2_2/vendor.zip -dspec/rails2_2')
    end

    Spec::Rake::SpecTask.new(:spec) do |t|
      t.spec_opts ||= []
      t.spec_opts << "-rubygems"
      t.spec_opts << "--options" << "spec/spec.opts"
      t.spec_files = FileList['spec/rails2_2/**/*_spec.rb']
    end
    
    task :cleanup do
      sh('rm -rf spec/rails2_2/vendor')
    end
    
    task :spec => :unzip
    task :cleanup => :spec
  end

  namespace(:rails2_3) do
    task :unzip do
      sh('rm -rf spec/rails2_3/vendor')
      sh('unzip -qq spec/rails2_3/vendor.zip -dspec/rails2_3')
    end

    Spec::Rake::SpecTask.new(:spec) do |t|
      t.spec_opts ||= []
      t.spec_opts << "-rubygems"
      t.spec_opts << "--options" << "spec/spec.opts"
      t.spec_files = FileList['spec/rails2_3/**/*_spec.rb']
    end
    task :cleanup do
      sh('rm -rf spec/rails2_3/vendor')
    end

    task :spec => :unzip
    task :cleanup => :spec
  end
  
  
end

desc "Run all examples with RCov"
Spec::Rake::SpecTask.new('spec_with_rcov') do |t|
  t.spec_files = FileList['spec/**/*.rb']
  t.rcov = true
  t.rcov_opts = ['--exclude', 'spec']
end

require 'rake/rdoctask'
desc "Generate documentation"
Rake::RDocTask.new do |rd|
  rd.main = "README.rdoc"
  rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
  rd.rdoc_dir = 'rdoc'
end

begin
  require 'code_stats'
  CodeStats::Tasks.new
rescue LoadError
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
usher-0.8.0 Rakefile
usher-0.7.5 Rakefile
usher-0.7.4 Rakefile
usher-0.7.3 Rakefile
usher-0.7.2 Rakefile