public
Description: YARD is a Ruby Documentation tool (Yay!)
Homepage: http://yardoc.org
Clone URL: git://github.com/lsegal/yard.git
Click here to lend your support to: yard and make a donation at www.pledgie.com !
commit  0ee4cad07726e91cc995f76f40fe4317bd82ee18
tree    414d5705efd818039e4d978d6c28065b57741ce5
parent  b3800de9cfe318c9e06e13b9bad6df73123da8b4
yard / Rakefile
100644 39 lines (32 sloc) 1.081 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require File.dirname(__FILE__) + '/lib/yard'
require 'rubygems'
require 'rake/gempackagetask'
require 'spec'
require 'spec/rake/spectask'
 
WINDOWS = (PLATFORM =~ /win32|cygwin/ ? true : false) rescue false
SUDO = WINDOWS ? '' : 'sudo'
 
task :default => :specs
 
load 'yard.gemspec'
Rake::GemPackageTask.new(SPEC) do |pkg|
  pkg.gem_spec = SPEC
  pkg.need_zip = true
  pkg.need_tar = true
end
 
desc "Install the gem locally"
task :install => :package do
  sh "#{SUDO} gem install pkg/#{SPEC.name}-#{SPEC.version}.gem --local"
  sh "rm -rf pkg/yard-#{SPEC.version}" unless ENV['KEEP_FILES']
end
 
desc "Run all specs"
Spec::Rake::SpecTask.new("specs") do |t|
  $DEBUG = true if ENV['DEBUG']
  t.spec_opts = ["--format", "specdoc", "--colour"]
  t.spec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
  t.spec_files = Dir["spec/**/*_spec.rb"].sort
  t.rcov = true if ENV['RCOV']
  t.rcov_opts = ['-x', '_spec\.rb$,spec_helper\.rb$']
end
task :spec => :specs
 
YARD::Rake::YardocTask.new do |t|
  t.after = lambda { `cp -R docs/images/ doc/images/` }
end