forked from rspec/rspec-expectations
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
76 lines (64 loc) · 2.15 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
require 'bundler'
Bundler.setup
$LOAD_PATH << File.expand_path("../lib", __FILE__)
require 'rake'
require 'rake/rdoctask'
require 'rspec/expectations/version'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rspec-expectations"
gem.version = RSpec::Expectations::Version::STRING
gem.summary = "rspec-expectations-#{RSpec::Expectations::Version::STRING}"
gem.description = "rspec expectations (should[_not] and matchers)"
gem.rubyforge_project = "rspec"
gem.email = "[email protected];[email protected]"
gem.homepage = "http://github.com/rspec/expectations"
gem.authors = ["David Chelimsky", "Chad Humphries"]
gem.add_dependency('diff-lcs', ">= 1.1.2")
gem.add_development_dependency('cucumber', ">= 0.6.2")
gem.add_development_dependency('aruba', ">= 0.1.1")
gem.add_development_dependency('rspec-core', ">= #{RSpec::Expectations::Version::STRING}")
gem.add_development_dependency('rspec-mocks', ">= #{RSpec::Expectations::Version::STRING}")
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
namespace :gem do
desc "push to gemcutter"
task :push => :build do
system "gem push pkg/rspec-expectations-#{RSpec::Expectations::Version::STRING}.gem"
end
end
RSpec::Core::RakeTask.new(:spec)
class Cucumber::Rake::Task::ForkedCucumberRunner
# When cucumber shells out, we still need it to run in the context of our
# bundle.
def run
sh "bundle exec #{RUBY} " + args.join(" ")
end
end
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w{--format progress}
end
task :default => [:check_dependencies, :spec, :cucumber]
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION.yml')
config = YAML.load(File.read('VERSION.yml'))
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
else
version = ""
end
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "rspec-expectations #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
task :clobber do
rm_rf 'doc'
rm_rf 'pkg'
rm_rf 'tmp'
rm_rf 'coverage'
end