Skip to content
This repository
Newer
Older
100644 98 lines (85 sloc) 2.565 kb
baeb175b »
2008-05-30 Add YardocTask Rake task
1 require File.dirname(__FILE__) + '/lib/yard'
f4075ea5 »
2011-04-04 Add support for RubyGems 1.7.x
2 require File.dirname(__FILE__) + '/lib/yard/rubygems/specification'
acfba728 »
2010-05-26 Better rake support for windows
3 require 'rbconfig'
96f03025 » loren
2007-03-02 Added gemspec
4
f27213b4 »
2010-07-05 Add YARD_VERSION env to Rakefile. Allows installing as arbitrary gem …
5 YARD::VERSION.replace(ENV['YARD_VERSION']) if ENV['YARD_VERSION']
bb7abaa5 »
2008-05-26 Add yard.gemspec and move Gem specific stuff out of Rakefile
6
1e4d5e98 »
2008-05-26 Change default rake task to run specs
7 task :default => :specs
96f03025 » loren
2007-03-02 Added gemspec
8
0f77917e »
2010-01-07 Remove gem package Rake tasks and use simplified gem build functionality
9 desc "Builds the gem"
10 task :gem do
7e550aff »
2011-04-07 gemspec date can be set with Ruby!
11 Gem::Builder.new(eval(File.read('yard.gemspec'))).build
22cdc425 » loren
2008-02-21 Add better exception handling, add 'rake install' task
12 end
13
0f77917e »
2010-01-07 Remove gem package Rake tasks and use simplified gem build functionality
14 desc "Installs the gem"
fa147d95 »
2012-04-29 The great whitespace fix of 2012
15 task :install => :gem do
0f77917e »
2010-01-07 Remove gem package Rake tasks and use simplified gem build functionality
16 sh "#{SUDO} gem install yard-#{YARD::VERSION}.gem --no-rdoc --no-ri"
e54b06f8 »
2008-03-01 Consolidate gemspec into Rakefile and add specs task
17 end
18
649b068d »
2012-05-09 Use rvm-tester for suite task
19 begin
20 require 'rvm-tester'
21 require 'yaml'
22 RVM::Tester::TesterTask.new do |t|
23 # Use .travis.yml data
24 data = YAML.load_file(File.dirname(__FILE__) + '/.travis.yml')
25 t.rubies = data['rvm']
26 t.command = data['script']
27 t.env = {"CI" => "1", "SUITE" => "1"}
28 t.verbose = true
29 end
30 rescue LoadError
08977a26 »
2011-03-10 Add 'rake suite' task to run specs across all(?) supported ruby versi…
31 end
32
046d47b2 »
2011-06-14 Add support for travis-ci.org
33 task :travis_ci do
afd11790 »
2011-06-14 Fix travis_ci task status exiting and legacy mode
34 status = 0
046d47b2 »
2011-06-14 Add support for travis-ci.org
35 ENV['SUITE'] = '1'
36 ENV['CI'] = '1'
37 system "bundle exec rake specs"
afd11790 »
2011-06-14 Fix travis_ci task status exiting and legacy mode
38 status = 1 if $?.to_i != 0
39 if RUBY_VERSION >= '1.9' && RUBY_PLATFORM != 'java'
046d47b2 »
2011-06-14 Add support for travis-ci.org
40 puts ""
41 puts "Running specs with in legacy mode"
42 system "bundle exec rake specs LEGACY=1"
afd11790 »
2011-06-14 Fix travis_ci task status exiting and legacy mode
43 status = 1 if $?.to_i != 0
046d47b2 »
2011-06-14 Add support for travis-ci.org
44 end
afd11790 »
2011-06-14 Fix travis_ci task status exiting and legacy mode
45 exit(status)
046d47b2 »
2011-06-14 Add support for travis-ci.org
46 end
47
1c189a05 »
2009-11-13 Allow rake to function without RSpec
48 begin
3cafb472 »
2010-12-17 Make rakefile backwards compatible for rspec 1.x users
49 hide = '_spec\.rb$,spec_helper\.rb$,ruby_lex\.rb$,autoload\.rb$'
bdd8a8ff »
2011-02-26 Update specs to allow toggling on and off of LEGACY environment varia…
50 if YARD::Parser::SourceParser.parser_type == :ruby
51 hide += ',legacy\/.+_handler'
1ee355ec »
2011-01-11 Backport new-style parser to 1.8 compatible syntax (and semantics) fo…
52 else
bdd8a8ff »
2011-02-26 Update specs to allow toggling on and off of LEGACY environment varia…
53 hide += ',ruby_parser\.rb$,ast_node\.rb$,handlers\/ruby\/[^\/]+\.rb$'
1ee355ec »
2011-01-11 Backport new-style parser to 1.8 compatible syntax (and semantics) fo…
54 end
3cafb472 »
2010-12-17 Make rakefile backwards compatible for rspec 1.x users
55
b2ee971d » gioele
2010-12-12 Minimal update to RSpec 2
56 require 'rspec'
57 require 'rspec/core/rake_task'
1c189a05 »
2009-11-13 Allow rake to function without RSpec
58
59 desc "Run all specs"
b2ee971d » gioele
2010-12-12 Minimal update to RSpec 2
60 RSpec::Core::RakeTask.new("specs") do |t|
1c189a05 »
2009-11-13 Allow rake to function without RSpec
61 $DEBUG = true if ENV['DEBUG']
6fdb8fcd »
2012-03-20 Use default progress output for rspec results instead of specdoc
62 t.rspec_opts = ENV['SUITE'] ? [] : ['-c']
b2ee971d » gioele
2010-12-12 Minimal update to RSpec 2
63 t.rspec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
08977a26 »
2011-03-10 Add 'rake suite' task to run specs across all(?) supported ruby versi…
64 t.rspec_opts += ['-I', YARD::ROOT]
b2ee971d » gioele
2010-12-12 Minimal update to RSpec 2
65 t.pattern = "spec/**/*_spec.rb"
08977a26 »
2011-03-10 Add 'rake suite' task to run specs across all(?) supported ruby versi…
66 t.verbose = $DEBUG ? true : false
fa147d95 »
2012-04-29 The great whitespace fix of 2012
67
1c189a05 »
2009-11-13 Allow rake to function without RSpec
68 if ENV['RCOV']
fa147d95 »
2012-04-29 The great whitespace fix of 2012
69 t.rcov = true
1c189a05 »
2009-11-13 Allow rake to function without RSpec
70 t.rcov_opts = ['-x', hide]
71 end
0d541b77 »
2009-10-16 Ignore files from RCov stats
72 end
1c189a05 »
2009-11-13 Allow rake to function without RSpec
73 task :spec => :specs
74 rescue LoadError
3cafb472 »
2010-12-17 Make rakefile backwards compatible for rspec 1.x users
75 begin # Try for rspec 1.x
76 require 'spec'
77 require 'spec/rake/spectask'
fa147d95 »
2012-04-29 The great whitespace fix of 2012
78
3cafb472 »
2010-12-17 Make rakefile backwards compatible for rspec 1.x users
79 Spec::Rake::SpecTask.new("specs") do |t|
80 $DEBUG = true if ENV['DEBUG']
81 t.spec_opts = ["--format", "specdoc", "--colour"]
82 t.spec_opts += ["--require", File.join(File.dirname(__FILE__), 'spec', 'spec_helper')]
83 t.pattern = "spec/**/*_spec.rb"
84
85 if ENV['RCOV']
fa147d95 »
2012-04-29 The great whitespace fix of 2012
86 t.rcov = true
3cafb472 »
2010-12-17 Make rakefile backwards compatible for rspec 1.x users
87 t.rcov_opts = ['-x', hide]
88 end
89 end
90 task :spec => :specs
91 rescue LoadError
92 warn "warn: RSpec tests not available. `gem install rspec` to enable them."
93 end
baeb175b »
2008-05-30 Add YardocTask Rake task
94 end
95
c351a2ce »
2009-05-03 Add support for --files switch to specify extra static files to inclu…
96 YARD::Rake::YardocTask.new do |t|
0e14ccb1 »
2009-11-01 Move some options to yardopts
97 t.options += ['--title', "YARD #{YARD::VERSION} Documentation"]
5b8d227c » nex3
2009-06-07 Add spec as an alias for the specs Rake task.
98 end
Something went wrong with that request. Please try again.