Sha256: 67a6f58040a28c13e589fcd34602f0679872b42275e40d582136681b88922c96

Contents?: true

Size: 1.86 KB

Versions: 8

Compression:

Stored size: 1.86 KB

Contents

require 'rake'
require 'rdoc/task'
require 'rake/testtask'
require 'tmpdir'

require 'active_record'
require 'action_view'
require 'action_controller'
require 'action_mailer'

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'

include Rake::DSL

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

GEM_ROOT = File.expand_path('../', __FILE__)
TESTAPP_PATH = ENV['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['test/doctest/**/*.rdoctest'].map {|f| File.expand_path(f)}.join(' ')
    exit(1) if !system("#{RUBYDOCTEST} #{files}")
  end

  desc "Run the irt tests"
  task :irt => :prepare_testapp do |t|
    chdir TESTAPP_PATH
    sh %(irt #{File.expand_path('.',GEM_ROOT)})
  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

8 entries across 8 versions & 1 rubygems

Version Path
hobo-2.2.6 Rakefile
hobo-2.2.5 Rakefile
hobo-2.2.4 Rakefile
hobo-2.2.3 Rakefile
hobo-2.2.2 Rakefile
hobo-2.2.1 Rakefile
hobo-2.2.0 Rakefile
hobo-2.1.2 Rakefile