-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
49 lines (38 loc) · 1.06 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
require 'rake'
require 'rake/gempackagetask'
spec = Gem::Specification.new do |s|
s.name = 'randall'
s.version = '0.1.1'
s.summary = 'Generate random instances of any classes.'
s.description = s.summary
s.author = 'Diego Che'
s.email = '[email protected]'
s.files = %w(README.rdoc LICENSE lib/regexp.treetop) +
Dir.glob('lib/**/*.rb')
s.required_ruby_version = '>= 1.9'
s.platform = Gem::Platform::RUBY
s.add_dependency 'treetop', '>= 1.4.7'
s.add_development_dependency 'bacon', '>= 1.1.0'
s.rdoc_options << '--title' << 'Randall' <<
'--main' << 'README.rdoc' <<
'--line-numbers' << '--exclude="spec/*"'
end
task :default => :spec
Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
p.need_zip = true
p.need_tar = true
end
desc 'Run spec'
task :spec do
begin
require 'bacon'
Bacon.extend Bacon::TestUnitOutput
Dir.glob('spec/*.rb').each do |f|
require f
end
puts
rescue LoadError
$stderr.puts "Bacon is needed to run spec. "
end
end