Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 72 lines (58 sloc) 1.626 kB
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
1 require "bundler"
7eaa1f6 @dchelimsky dev: align Gemfiles across rspec projects
dchelimsky authored
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 "rspec/core/rake_task"
4eb1a8b @graaff Explicitly require rspec version to fix broken rdoc task.
graaff authored
9 require "rspec/core/version"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
10
8519153 @dchelimsky dev: Rakefile tweaks
dchelimsky authored
11 require "cucumber/rake/task"
12 Cucumber::Rake::Task.new(:cucumber)
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
13
7eaa1f6 @dchelimsky dev: align Gemfiles across rspec projects
dchelimsky authored
14 desc "Run all examples"
4229554 @dchelimsky add -w flag when running rake spec
dchelimsky authored
15 RSpec::Core::RakeTask.new(:spec) do |t|
648b344 @mvz Eliminate the remaining warnings emitted by rspec-core.
mvz authored
16 t.ruby_opts = %w[-w]
4229554 @dchelimsky add -w flag when running rake spec
dchelimsky authored
17 end
b4525d3 @dchelimsky Separate cli specs from the rest (they're SLOW)
dchelimsky authored
18
19 namespace :spec do
20 desc "Run ui examples"
21 RSpec::Core::RakeTask.new(:ui) do |t|
7eaa1f6 @dchelimsky dev: align Gemfiles across rspec projects
dchelimsky authored
22 t.ruby_opts = %w[-w]
b5be29c @dchelimsky dev: use --tag ui for spec:ui
dchelimsky authored
23 t.rspec_opts = %w[--tag ui]
b4525d3 @dchelimsky Separate cli specs from the rest (they're SLOW)
dchelimsky authored
24 end
0ecca50 @dchelimsky add clobber task
dchelimsky authored
25 end
26
a43cf09 @dchelimsky dev: update cucumber, aruba, and move some gems around Gemfile
dchelimsky authored
27 if RUBY_VERSION.to_f == 1.8
28 namespace :rcov do
29 task :cleanup do
30 rm_rf 'coverage.data'
31 end
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
32
a43cf09 @dchelimsky dev: update cucumber, aruba, and move some gems around Gemfile
dchelimsky authored
33 RSpec::Core::RakeTask.new :spec do |t|
34 t.rcov = true
ca30f1a @dchelimsky reorder the rake task args (no functional change) and clean up rspec's
dchelimsky authored
35 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features" --sort coverage --aggregate coverage.data]
a43cf09 @dchelimsky dev: update cucumber, aruba, and move some gems around Gemfile
dchelimsky authored
36 end
d1a1901 @dchelimsky Override cucumber's run method to use 'bundle exec' when it shells out.
dchelimsky authored
37
a43cf09 @dchelimsky dev: update cucumber, aruba, and move some gems around Gemfile
dchelimsky authored
38 Cucumber::Rake::Task.new :cucumber do |t|
39 t.cucumber_opts = %w{--format progress}
40 t.rcov = true
ca30f1a @dchelimsky reorder the rake task args (no functional change) and clean up rspec's
dchelimsky authored
41 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features" --sort coverage --aggregate coverage.data]
a43cf09 @dchelimsky dev: update cucumber, aruba, and move some gems around Gemfile
dchelimsky authored
42 end
063425e @spicycode Run rcov by default on specs and features
spicycode authored
43 end
b91baa4 @dchelimsky get the rcov task (internal) working right again
dchelimsky authored
44
ca30f1a @dchelimsky reorder the rake task args (no functional change) and clean up rspec's
dchelimsky authored
45 task :rcov => ["rcov:cleanup", "rcov:cucumber", "rcov:spec"]
4039e73 @dchelimsky update rake tasks
dchelimsky authored
46 end
47
8519153 @dchelimsky dev: Rakefile tweaks
dchelimsky authored
48 desc "delete generated files"
4039e73 @dchelimsky update rake tasks
dchelimsky authored
49 task :clobber do
8519153 @dchelimsky dev: Rakefile tweaks
dchelimsky authored
50 sh %q{find . -name "*.rbc" | xargs rm}
51 sh 'rm -rf pkg'
52 sh 'rm -rf tmp'
53 sh 'rm -rf coverage'
9b6a8fe @dchelimsky dev: rake clobber removes generated docs
dchelimsky authored
54 sh 'rm -rf .yardoc'
55 sh 'rm -rf doc'
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
56 end
57
258c250 @dchelimsky dev: add rdoc task
dchelimsky authored
58 desc "generate rdoc"
59 task :rdoc do
60 sh "yardoc"
61 end
62
5332298 @dchelimsky dev-support: update relish task
dchelimsky authored
63 desc "Push docs/cukes to relishapp using the relish-client-gem"
6839729 @dchelimsky add a little relish
dchelimsky authored
64 task :relish, :version do |t, args|
65 raise "rake relish[VERSION]" unless args[:version]
74aa307 @dchelimsky move Changelog to project dir and copy it to features when deploying …
dchelimsky authored
66 sh "cp Changelog.md features/"
5332298 @dchelimsky dev-support: update relish task
dchelimsky authored
67 sh "relish push rspec/rspec-core:#{args[:version]}"
74aa307 @dchelimsky move Changelog to project dir and copy it to features when deploying …
dchelimsky authored
68 sh "rm features/Changelog.md"
39e9ca9 @dchelimsky add relish task
dchelimsky authored
69 end
70
b4525d3 @dchelimsky Separate cli specs from the rest (they're SLOW)
dchelimsky authored
71 task :default => [:spec, "spec:ui", :cucumber]
Something went wrong with that request. Please try again.