Rakefile in tr8n-3.0.5 vs Rakefile in tr8n-3.1.1

- old
+ new

@@ -1,29 +1,46 @@ -# Add your own tasks in files placed in lib/tasks ending in .rake, -# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. +#!/usr/bin/env rake +begin + require 'bundler/setup' +rescue LoadError + puts 'You must `gem install bundler` and `bundle install` to run rake tasks' +end +begin + require 'rdoc/task' +rescue LoadError + require 'rdoc/rdoc' + require 'rake/rdoctask' + RDoc::Task = Rake::RDocTask +end +RDoc::Task.new(:rdoc) do |rdoc| + require 'tr8n/version' + + rdoc.rdoc_dir = 'rdoc' + rdoc.title = 'Tr8n #{Tr8n::VERSION}' + rdoc.options << '--line-numbers' + rdoc.rdoc_files.include('README.rdoc') + rdoc.rdoc_files.include('lib/**/*.rb') +end + +APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) +load 'rails/tasks/engine.rake' + + +Bundler::GemHelper.install_tasks + require 'rake/testtask' -Rake::TestTask.new do |test| - test.pattern = 'test/**/*_test.rb' - test.libs << 'test' +Rake::TestTask.new(:test) do |t| + t.libs << 'lib' + t.libs << 'test' + t.pattern = 'test/**/*_test.rb' + t.verbose = false end -begin - require 'jeweler' - Jeweler::Tasks.new do |s| - s.name = "tr8n" - s.summary = "Crowd-sourced translation engine for Rails." - s.email = "theiceberk@gmail.com" - s.homepage = "http://github.com/berk/tr8n" - s.description = "Crowd-sourced translation engine for Rails." - s.authors = ["Michael Berkovich"] - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler not available. Install it with: sudo gem install jeweler" +require 'rspec/core' +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) do |spec| + spec.pattern = FileList['spec/**/*_spec.rb'] end -#require File.expand_path('../config/application', __FILE__) -#require 'rake' -# -#Tr8n::Application.load_tasks +task :default => :spec