Sha256: cb939b2cc1167de9ed03f3f1751f552d113f91afc575fc0880e2c9e34e94780d

Contents?: true

Size: 1.59 KB

Versions: 21

Compression:

Stored size: 1.59 KB

Contents

def dump_load_path
  puts $LOAD_PATH.join("\n")
  found = nil
  $LOAD_PATH.each do |path|
    if File.exists?(File.join(path,"rspec"))
      puts "Found rspec in #{path}"
      if File.exists?(File.join(path,"rspec","core"))
        puts "Found core"
        if File.exists?(File.join(path,"rspec","core","rake_task"))
          puts "Found rake_task"
          found = path
        else
          puts "!! no rake_task"
        end
      else
        puts "!!! no core"
      end
    end
  end
  if found.nil?
    puts "Didn't find rspec/core/rake_task anywhere"
  else
    puts "Found in #{path}"
  end
end
require 'bundler'
require 'rake/clean'
<% if rspec %>
begin
require 'rspec/core/rake_task'
rescue LoadError
dump_load_path
raise
end
<% else %>
require 'rake/testtask'
<% end %>
require 'cucumber'
require 'cucumber/rake/task'
gem 'rdoc' # we need the installed RDoc gem, not the system one
require 'rdoc/task'

include Rake::DSL

Bundler::GemHelper.install_tasks

<% if rspec %>
RSpec::Core::RakeTask.new do |t|
  # Put spec opts in a file named .rspec in root
end
<% else %>
Rake::TestTask.new do |t|
  t.pattern = 'test/tc_*.rb'
end
<% end %>

CUKE_RESULTS = 'results.html'
CLEAN << CUKE_RESULTS
Cucumber::Rake::Task.new(:features) do |t|
  t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
  t.fork = false
end

Rake::RDocTask.new do |rd|
  <% if using_readme %>
  rd.main = "README.rdoc"
  <% end %>
  rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
end
<% if rspec %>
task :default => [:spec,:features]
<% else %>
task :default => [:test,:features]
<% end %>

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
methadone-1.9.5 templates/full/Rakefile.erb
methadone-1.9.4 templates/full/Rakefile.erb
methadone-1.9.3 templates/full/Rakefile.erb
methadone-1.9.2 templates/full/Rakefile.erb
methadone-rehab-1.9.2 templates/full/Rakefile.erb
methadone-1.9.1 templates/full/Rakefile.erb
methadone-1.9.0 templates/full/Rakefile.erb
methadone-1.8.0 templates/full/Rakefile.erb
methadone-1.7.0 templates/full/Rakefile.erb
methadone-1.6.0 templates/full/Rakefile.erb
methadone-1.5.1 templates/full/Rakefile.erb
methadone-1.5.0 templates/full/Rakefile.erb
methadone-1.4.0 templates/full/Rakefile.erb
methadone-1.3.2 templates/full/Rakefile.erb
methadone-1.3.1 templates/full/Rakefile.erb
methadone-1.3.0 templates/full/Rakefile.erb
methadone-1.2.6 templates/full/Rakefile.erb
methadone-1.2.5 templates/full/Rakefile.erb
methadone-1.2.4 templates/full/Rakefile.erb
methadone-1.2.3 templates/full/Rakefile.erb