-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
63 lines (54 loc) · 1.74 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
require 'rake'
require 'rake/rdoctask'
require 'rcov/rcovtask'
begin
require 'spec/rake/spectask'
rescue LoadError
puts 'To use rspec for testing you must install rspec gem:'
puts '$ sudo gem install rspec'
exit
end
desc "Default task is to run specs"
task :default => :show_all_tasks
desc "Run all examples with RCov"
Spec::Rake::SpecTask.new('rcov') do |t|
t.spec_files = FileList['spec/**/*.rb']
t.spec_opts = ['--options', '"spec/spec.opts"']
# rcov
t.rcov = true
t.rcov_dir = 'doc/coverage'
t.rcov_opts = ['-p', '-T', '--exclude', 'spec']
end
desc "Run the specs under spec"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--diff', '--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Print Specdoc for all specs"
Spec::Rake::SpecTask.new('specdoc') do |t|
t.spec_opts = ["--format", "specdoc", "--dry-run", "--options", 'spec/spec.opts']
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Generate RDoc documentation"
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README.rdoc' << '--charset' << 'utf-8'
rdoc.rdoc_dir = "doc"
rdoc.rdoc_files.include 'README.rdoc'
rdoc.rdoc_files.include('lib/**/*.rb')
end
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "lego-core"
gemspec.summary = "It's all about the bits and peices"
gemspec.description = "It's all about the bits and peices"
gemspec.email = "[email protected]"
gemspec.homepage = "http://github.com/stjernstrom/lego-core"
gemspec.authors = ["Mathias Stjernström", "Patrik Hedman"]
end
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
task :show_all_tasks do
system "rake -T"
end