-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathRakeFile
More file actions
43 lines (38 loc) · 1.36 KB
/
Copy pathRakeFile
File metadata and controls
43 lines (38 loc) · 1.36 KB
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
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "gift-parser"
gemspec.summary = "Moodle GIFT format parser"
gemspec.description = "A library for parsing the Moodle GIFT question format."
gemspec.email = "stuart.coyle@gmail.com"
gemspec.homepage = "http://github.com/stuart/gift-parser"
gemspec.authors = ["Stuart Coyle"]
gemspec.add_runtime_dependency "treetop", ">=1.4.5"
gemspec.add_development_dependency "treetop", ">=1.4.5"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
task :default => [:treetop, :test]
task :test do
# Run all the tests
Dir.glob("test/*_test.rb").each do |file|
require file
end
end
task :treetop do
# Generate the parser from the treetop source
print "Generating the parser..."
system("tt #{File.expand_path('../src/gift_parser.treetop', __FILE__)}" )
system("mv #{File.expand_path('../src/gift_parser.rb',__FILE__)} #{File.expand_path('../lib/gift_parser.rb',__FILE__)}" )
puts "done."
end
task :clean do
system( "rm -r #{File.expand_path("../doc/*", __FILE__)}")
system( "rmdir #{File.expand_path("../doc", __FILE__)}")
system( "rm #{File.expand_path("../lib/gift_parser.rb", __FILE__)}")
end
task :doc do
system("rdoc --exclude #{File.expand_path("../lib/gift_parser.rb", __FILE__)}")
end