Sha256: e6de8a53cab90d10f0538ffedef3496c4a2b17731cd82ca514158f3f9e2c0efe

Contents?: true

Size: 1.6 KB

Versions: 25

Compression:

Stored size: 1.6 KB

Contents

require 'rake'
require 'rake/rdoctask'
require 'rake/testtask'
require 'tmpdir'

require 'active_record'
ActiveRecord::ActiveRecordError # hack for https://rails.lighthouseapp.com/projects/8994/tickets/2577-when-using-activerecordassociations-outside-of-rails-a-nameerror-is-thrown
$:.unshift File.expand_path('../lib', __FILE__)
$:.unshift File.expand_path('../../hobo_support/lib', __FILE__)
$:.unshift File.expand_path('../../hobo_fields/lib', __FILE__)
$:.unshift File.expand_path('../../dryml/lib', __FILE__)
require 'hobo'

RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name']).sub(/.*\s.*/m, '"\&"')
RUBYDOCTEST = ENV['RUBYDOCTEST'] || "#{RUBY} -S rubydoctest"

GEM_ROOT = File.expand_path('../', __FILE__)
TESTAPP_PATH = File.join Dir.tmpdir, 'hobo_testapp'
BIN = File.expand_path('../bin/hobo', __FILE__)
require 'hobo_support/common_tasks'
include HoboSupport::CommonTasks


desc "Default Task"
task :default => [ :test ]


# --- Testing --- #

desc "Run all unit tests"
Rake::TestTask.new(:test) { |t|
  t.libs << "test"
  t.test_files=Dir.glob( "test/**/*_test.rb" ).sort
  t.verbose = true
}

namespace "test" do
  desc "Run the doctests"
  task :doctest do |t|
    files=Dir['doctests/**/*.rdoctest'].map {|f| File.expand_path(f)}.join(' ')
    exit(1) if !system("#{RUBYDOCTEST} #{files}")
  end
end

# --- RDoc --- #

desc 'Generate documentation for the Hobo plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'Hobo'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end


Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hobo-1.3.3 Rakefile
hobo-1.3.2 Rakefile
hobo-1.3.1 Rakefile
hobo-1.3.0 Rakefile
hobo-1.3.0.RC4 Rakefile
hobo-1.3.0.RC3 Rakefile
hobo-1.3.0.RC2 Rakefile
hobo-1.3.0.RC1 Rakefile
hobo-1.3.0.RC Rakefile
hobo-1.3.0.pre31 Rakefile
hobo-1.3.0.pre29 Rakefile
hobo-1.3.0.pre28 Rakefile
hobo-1.3.0.pre27 Rakefile
hobo-1.3.0.pre26 Rakefile
hobo-1.3.0.pre25 Rakefile
hobo-1.3.0.pre24 Rakefile
hobo-1.3.0.pre23 Rakefile
hobo-1.3.0.pre22 Rakefile
hobo-1.3.0.pre21 Rakefile
hobo-1.3.0.pre20 Rakefile