Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 62 lines (53 sloc) 1.514 kb
baeb175 @lsegal Add YardocTask Rake task
authored
1 require File.dirname(__FILE__) + '/lib/yard'
f4075ea @lsegal Add support for RubyGems 1.7.x
authored
2 require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
acfba72 @lsegal Better rake support for windows
authored
3 require 'rbconfig'
96f0302 Added gemspec
loren authored
4
f27213b @lsegal Add YARD_VERSION env to Rakefile. Allows installing as arbitrary gem ver...
authored
5 YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
bb7abaa @lsegal Add yard.gemspec and move Gem specific stuff out of Rakefile
authored
6
1e4d5e9 @lsegal Change default rake task to run specs
authored
7 task :default => :specs
96f0302 Added gemspec
loren authored
8
0f77917 @lsegal Remove gem package Rake tasks and use simplified gem build functionality
authored
9 desc "Builds the gem"
10 task :gem do
7e550af @lsegal gemspec date can be set with Ruby!
authored
11 Gem::Builder.new(eval(File.read('yard.gemspec'))).build
22cdc42 Add better exception handling, add 'rake install' task
loren authored
12 end
13
0f77917 @lsegal Remove gem package Rake tasks and use simplified gem build functionality
authored
14 desc "Installs the gem"
fa147d9 @lsegal The great whitespace fix of 2012
authored
15 task :install => :gem do
6b63789 @lsegal Remove sudo from install task
authored
16 sh "gem install yard-#{YARD::VERSION}.gem --no-rdoc --no-ri"
e54b06f @lsegal Consolidate gemspec into Rakefile and add specs task
authored
17 end
18
649b068 @lsegal Use rvm-tester for suite task
authored
19 begin
20 require 'rvm-tester'
21 RVM::Tester::TesterTask.new do |t|
f8b10fb @lsegal Travis no longer supports 1.8.6
authored
22 t.rubies = %w(1.8.6 ree jruby 1.8.7 1.9.2 1.9.3)
59436d0 @lsegal Remove manual loading of .travis.yml in suite task, rvm-tester does this...
authored
23 t.bundle_install = false # don't need to do this all the time
649b068 @lsegal Use rvm-tester for suite task
authored
24 t.verbose = true
25 end
26 rescue LoadError
08977a2 @lsegal Add 'rake suite' task to run specs across all(?) supported ruby versions...
authored
27 end
28
046d47b @lsegal Add support for travis-ci.org
authored
29 task :travis_ci do
30 ENV['SUITE'] = '1'
31 ENV['CI'] = '1'
d0f0d5a @lsegal Replace rspec rake task and add SimpleCov support
authored
32 ENV['LEGACY'] = nil
33 Rake::Task['specs'].execute
afd1179 @lsegal Fix travis_ci task status exiting and legacy mode
authored
34 if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
046d47b @lsegal Add support for travis-ci.org
authored
35 puts ""
36 puts "Running specs with in legacy mode"
d0f0d5a @lsegal Replace rspec rake task and add SimpleCov support
authored
37 ENV['LEGACY'] = '1'
38 Rake::Task['specs'].execute
046d47b @lsegal Add support for travis-ci.org
authored
39 end
40 end
41
d0f0d5a @lsegal Replace rspec rake task and add SimpleCov support
authored
42 desc "Run all specs"
43 task :specs do
44 opts = ['rspec', '-c']
45 opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
46 opts += ['-I', YARD::ROOT]
47 if ENV['DEBUG']
48 $DEBUG = true
49 opts += ['-d']
3cafb47 @lsegal Make rakefile backwards compatible for rspec 1.x users
authored
50 end
d0f0d5a @lsegal Replace rspec rake task and add SimpleCov support
authored
51 opts += FileList["spec/**/*_spec.rb"].sort
52 cmd = opts.join(' ')
53 puts cmd if Rake.application.options.trace
54 system(cmd)
55 raise "Command failed with status (#{$?.to_i}): #{cmd}" if $?.to_i != 0
baeb175 @lsegal Add YardocTask Rake task
authored
56 end
d0f0d5a @lsegal Replace rspec rake task and add SimpleCov support
authored
57 task :spec => :specs
baeb175 @lsegal Add YardocTask Rake task
authored
58
c351a2c @lsegal Add support for --files switch to specify extra static files to include ...
authored
59 YARD::Rake::YardocTask.new do |t|
0e14ccb @lsegal Move some options to yardopts
authored
60 t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
5b8d227 @nex3 Add spec as an alias for the specs Rake task.
nex3 authored
61 end
Something went wrong with that request. Please try again.