Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (84 sloc) 3.0 kB
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
1 require "bundler"
2 Bundler.setup
3
b8c562c @dchelimsky upgrade to jeweler 1.4.0
dchelimsky authored
4 gem "jeweler", ">= 1.4.0"
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
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 $:.unshift File.expand_path("../lib", __FILE__)
b3df3a2 @spicycode Fixing Ruby 1.9.1 compatibility issues
spicycode authored
9
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
10 require "rake/rdoctask"
11 require "rspec/core/rake_task"
12 require "rspec/core/version"
13 require "cucumber/rake/task"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
14
15 begin
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
16 require "jeweler"
c71c8f1 @spicycode Fixing Ruby 1.9.1 run, use RUBY_VERSION, not RUBY_PLATFORM
spicycode authored
17 Jeweler::Tasks.new do |gem|
18 gem.name = "rspec-core"
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
19 gem.version = RSpec::Core::Version::STRING
20 gem.summary = "rspec-core-#{RSpec::Core::Version::STRING}"
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
21 gem.description = "RSpec runner and example groups"
c71c8f1 @spicycode Fixing Ruby 1.9.1 run, use RUBY_VERSION, not RUBY_PLATFORM
spicycode authored
22 gem.email = "dchelimsky@gmail.com;chad.humphries@gmail.com"
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
23 gem.homepage = "http://github.com/rspec/rspec-core"
4b576e7 @dchelimsky names
dchelimsky authored
24 gem.authors = ["Chad Humphries", "David Chelimsky"]
6b43fc4 @dchelimsky config
dchelimsky authored
25 gem.rubyforge_project = "rspec"
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
26 gem.add_development_dependency "rspec-expectations", ">= #{RSpec::Core::Version::STRING}"
27 gem.add_development_dependency "rspec-mocks", ">= #{RSpec::Core::Version::STRING}"
496acdf @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
28 gem.add_development_dependency "cucumber", ">= 0.5.3"
29 gem.add_development_dependency "autotest", ">= 4.2.9"
7155004 @dchelimsky add post install message
dchelimsky authored
30 gem.post_install_message = <<-EOM
31 #{"*"*50}
32
33 Thank you for installing #{gem.summary}
65bbb80 @dchelimsky Whitespace gone
dchelimsky authored
34
4508682 @dchelimsky update post-commit hook
dchelimsky authored
35 Please be sure to look at Upgrade.markdown to see what might have changed
36 since the last release.
37
7155004 @dchelimsky add post install message
dchelimsky authored
38 #{"*"*50}
39 EOM
c71c8f1 @spicycode Fixing Ruby 1.9.1 run, use RUBY_VERSION, not RUBY_PLATFORM
spicycode authored
40 end
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
41 rescue LoadError
d256659 @spicycode Updating cucumber version dependency
spicycode authored
42 puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
43 end
44
51cbaff @dchelimsky add gem:push task (was removed from jeweler)
dchelimsky authored
45 namespace :gem do
46 desc "push to gemcutter"
47 task :push => :build do
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
48 system "gem push pkg/rspec-core-#{RSpec::Core::Version::STRING}.gem"
51cbaff @dchelimsky add gem:push task (was removed from jeweler)
dchelimsky authored
49 end
50 end
51
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
52 RSpec::Core::RakeTask.new(:spec)
059d4ee @spicycode Making the default rakefile give friendlier errors when bumping gem v…
spicycode authored
53
9773a34 @dchelimsky paths, deps, etc
dchelimsky authored
54 desc "Run all examples using rcov"
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
55 RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
9773a34 @dchelimsky paths, deps, etc
dchelimsky authored
56 t.rcov = true
57 t.rcov_opts = %[-Ilib -Ispec --exclude "mocks,expectations,gems/*,spec/resources,spec/lib,spec/spec_helper.rb,db/*,/Library/Ruby/*,config/*"]
58 t.rcov_opts << %[--no-html --aggregate coverage.data]
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
59 end
60
063425e @spicycode Run rcov by default on specs and features
spicycode authored
61 task :cleanup_rcov_files do
62 rm_rf 'coverage.data'
63 end
c402235 @dchelimsky add cucumber task
dchelimsky authored
64
0ecca50 @dchelimsky add clobber task
dchelimsky authored
65 task :clobber do
66 rm_rf 'pkg'
67 rm_rf 'tmp'
c2d2025 @dchelimsky add coverage dir to clobber
dchelimsky authored
68 rm_rf 'coverage'
0ecca50 @dchelimsky add clobber task
dchelimsky authored
69 end
70
d1a1901 @dchelimsky Override cucumber's run method to use 'bundle exec' when it shells out.
dchelimsky authored
71 class Cucumber::Rake::Task::ForkedCucumberRunner
72 # When cucumber shells out, we still need it to run in the context of our
73 # bundle.
74 def run
75 sh "bundle exec #{RUBY} " + args.join(" ")
76 end
77 end
78
022f907 @dchelimsky remove unnecessaries from Rakefile
dchelimsky authored
79 if RUBY_VERSION.to_f >= 1.9
6ceb826 @dchelimsky rename features to cucumber
dchelimsky authored
80 Cucumber::Rake::Task.new(:cucumber) do |t|
1a0ac5c @spicycode Tidy up build output, and minimize the amount of work rcov has to do
spicycode authored
81 t.cucumber_opts = %w{--format progress}
82 end
063425e @spicycode Run rcov by default on specs and features
spicycode authored
83
6ceb826 @dchelimsky rename features to cucumber
dchelimsky authored
84 task :default => [:check_dependencies, :spec, :cucumber]
788bd9f @spicycode Run coverage by default in ruby 1.8
spicycode authored
85 else
6ceb826 @dchelimsky rename features to cucumber
dchelimsky authored
86 Cucumber::Rake::Task.new(:cucumber) do |t|
063425e @spicycode Run rcov by default on specs and features
spicycode authored
87 t.rcov = true
88 t.rcov_opts = %[-Ilib -Ispec --exclude "mocks,expectations,gems/*,features,spec/ruby_forker,spec/rspec,spec/resources,spec/lib,spec/spec_helper.rb,db/*,/Library/Ruby/*,config/*"]
1a0ac5c @spicycode Tidy up build output, and minimize the amount of work rcov has to do
spicycode authored
89 t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
90 t.cucumber_opts = %w{--format progress}
063425e @spicycode Run rcov by default on specs and features
spicycode authored
91 end
92
6ceb826 @dchelimsky rename features to cucumber
dchelimsky authored
93 task :default => [:check_dependencies, :rcov, :cucumber]
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
94 end
95
96 Rake::RDocTask.new do |rdoc|
97 rdoc.rdoc_dir = 'rdoc'
bcb1dfa @dchelimsky change top-level module from Rspec to RSpec
dchelimsky authored
98 rdoc.title = "rspec-core #{RSpec::Core::Version::STRING}"
a3f941f @spicycode Initial commit to rspec-core.
spicycode authored
99 rdoc.rdoc_files.include('README*')
100 rdoc.rdoc_files.include('lib/**/*.rb')
101 end
102
Something went wrong with that request. Please try again.