Skip to content
Newer
Older
100644 34 lines (28 sloc) 879 Bytes
baeb175 @lsegal Add YardocTask Rake task
authored May 30, 2008
1 require File.dirname(__FILE__) + '/lib/yard'
e54b06f @lsegal Consolidate gemspec into Rakefile and add specs task
authored Mar 1, 2008
2 require 'rubygems'
96f0302 Added gemspec
loren authored Mar 2, 2007
3 require 'rake/gempackagetask'
e54b06f @lsegal Consolidate gemspec into Rakefile and add specs task
authored Mar 1, 2008
4 require 'spec'
5 require 'spec/rake/spectask'
96f0302 Added gemspec
loren authored Mar 2, 2007
6
bb7abaa @lsegal Add yard.gemspec and move Gem specific stuff out of Rakefile
authored May 26, 2008
7 WINDOWS = (PLATFORM =~ /win32|cygwin/ ? true : false) rescue false
8 SUDO = WINDOWS ? '' : 'sudo'
9
1e4d5e9 @lsegal Change default rake task to run specs
authored May 26, 2008
10 task :default => :specs
96f0302 Added gemspec
loren authored Mar 2, 2007
11
bb7abaa @lsegal Add yard.gemspec and move Gem specific stuff out of Rakefile
authored May 26, 2008
12 load 'yard.gemspec'
96f0302 Added gemspec
loren authored Mar 2, 2007
13 Rake::GemPackageTask.new(SPEC) do |pkg|
bb7abaa @lsegal Add yard.gemspec and move Gem specific stuff out of Rakefile
authored May 26, 2008
14 pkg.gem_spec = SPEC
96f0302 Added gemspec
loren authored Mar 2, 2007
15 pkg.need_zip = true
16 pkg.need_tar = true
22cdc42 Add better exception handling, add 'rake install' task
loren authored Feb 21, 2008
17 end
18
bb7abaa @lsegal Add yard.gemspec and move Gem specific stuff out of Rakefile
authored May 26, 2008
19 desc "Install the gem locally"
20 task :install => :package do
21 sh "#{SUDO} gem install pkg/#{SPEC.name}-#{SPEC.version}.gem --local"
4621f20 @lsegal Don't leave ruby files hanging around in the pkg directory
authored Jan 26, 2009
22 sh "rm -rf pkg/yard-#{SPEC.version}" unless ENV['KEEP_FILES']
e54b06f @lsegal Consolidate gemspec into Rakefile and add specs task
authored Mar 1, 2008
23 end
24
25 desc "Run all specs"
26 Spec::Rake::SpecTask.new("specs") do |t|
28b10f6 @lsegal Allow proper debugging if
authored Jun 5, 2008
27 $DEBUG = true if ENV['DEBUG']
e54b06f @lsegal Consolidate gemspec into Rakefile and add specs task
authored Mar 1, 2008
28 t.spec_opts = ["--format", "specdoc", "--colour"]
29 t.spec_files = Dir["spec/**/*_spec.rb"].sort
baeb175 @lsegal Add YardocTask Rake task
authored May 30, 2008
30 end
31
c351a2c @lsegal Add support for --files switch to specify extra static files to inclu…
authored May 3, 2009
32 YARD::Rake::YardocTask.new do |t|
33 t.options = ["--files", "FAQ.markdown,LICENSE"]
34 end
Something went wrong with that request. Please try again.