Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 90 lines (72 sloc) 1.98 kb
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
1 require "bundler"
2 Bundler.setup
6960b5c @myronmarston Remove dependency on jeweler.
myronmarston authored
3 Bundler::GemHelper.install_tasks
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
4
5 require "rake"
6 require "yaml"
b3df3a2 @spicycode Fixing Ruby 1.9.1 compatibility issues
spicycode authored
7
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
8 require "rake/rdoctask"
9 require "rspec/core/rake_task"
4eb1a8b @graaff Explicitly require rspec version to fix broken rdoc task.
graaff authored
10 require "rspec/core/version"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
11
f10e8bb @dchelimsky prep for 2.6.0.rc1
dchelimsky authored
12 cucumber_loaded = false
13 begin
14 require "cucumber/rake/task"
15
16 Cucumber::Rake::Task.new(:cucumber)
17
18 class Cucumber::Rake::Task::ForkedCucumberRunner
19 # When cucumber shells out, we still need it to run in the context of our
20 # bundle.
21 def run
22 sh "bundle exec #{RUBY} " + args.join(" ")
23 end
24 end
25 cucumber_loaded = true
26 rescue LoadError => e
27 puts "unable to load cucumber, some tasks unavailable"
28 task :cucumber do
29 # no-op
4039e73 @dchelimsky update rake tasks
dchelimsky authored
30 end
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
31 end
32
4039e73 @dchelimsky update rake tasks
dchelimsky authored
33 desc "Run all examples"
34 RSpec::Core::RakeTask.new(:spec) do |t|
35 t.rspec_path = 'bin/rspec'
36 t.rspec_opts = %w[--color]
68d1167 @spicycode Disable verbose by default in our local Rakefile
spicycode authored
37 t.verbose = false
0ecca50 @dchelimsky add clobber task
dchelimsky authored
38 end
39
4039e73 @dchelimsky update rake tasks
dchelimsky authored
40
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
41 namespace :rcov do
42 task :cleanup do
43 rm_rf 'coverage.data'
44 end
45
46 RSpec::Core::RakeTask.new :spec do |t|
4039e73 @dchelimsky update rake tasks
dchelimsky authored
47 t.rcov = true
48 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
49 t.rcov_opts << %[--no-html --aggregate coverage.data]
d1a1901 @dchelimsky Override cucumber's run method to use 'bundle exec' when it shells out.
dchelimsky authored
50 end
51
f10e8bb @dchelimsky prep for 2.6.0.rc1
dchelimsky authored
52 if cucumber_loaded
53 Cucumber::Rake::Task.new :cucumber do |t|
54 t.cucumber_opts = %w{--format progress}
55 t.rcov = true
56 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
57 t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
58 end
59 else
60 task :cucumber do
61 # no-op
62 end
063425e @spicycode Run rcov by default on specs and features
spicycode authored
63 end
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
64
4039e73 @dchelimsky update rake tasks
dchelimsky authored
65 end
66
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
67 task :rcov => ["rcov:cleanup", "rcov:spec", "rcov:cucumber"]
68
4039e73 @dchelimsky update rake tasks
dchelimsky authored
69 task :default => [:spec, :cucumber]
063425e @spicycode Run rcov by default on specs and features
spicycode authored
70
4039e73 @dchelimsky update rake tasks
dchelimsky authored
71 task :clobber do
72 rm_rf 'pkg'
73 rm_rf 'tmp'
74 rm_rf 'coverage'
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
75 end
76
5332298 @dchelimsky dev-support: update relish task
dchelimsky authored
77 desc "Push docs/cukes to relishapp using the relish-client-gem"
6839729 @dchelimsky add a little relish
dchelimsky authored
78 task :relish, :version do |t, args|
79 raise "rake relish[VERSION]" unless args[:version]
5332298 @dchelimsky dev-support: update relish task
dchelimsky authored
80 sh "relish push rspec/rspec-core:#{args[:version]}"
39e9ca9 @dchelimsky add relish task
dchelimsky authored
81 end
82
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
83 Rake::RDocTask.new do |rdoc|
84 rdoc.rdoc_dir = 'rdoc'
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
85 rdoc.title = "rspec-core #{RSpec::Core::Version::STRING}"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
86 rdoc.rdoc_files.include('README*')
87 rdoc.rdoc_files.include('lib/**/*.rb')
88 end
89
Something went wrong with that request. Please try again.