-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
executable file
·68 lines (60 loc) · 1.79 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
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "Helipad"
s.author = "Lonnon Foster"
s.email = "[email protected]"
s.homepage = "http://nyerm.com/helipad"
s.platform = Gem::Platform::RUBY
s.summary = "Ruby interface to the excellent Helipad online notepad"
s.require_path = "lib"
s.files = ["lib/helipad.rb"]
s.test_file = "test/test_helipad.rb"
s.has_rdoc = true
s.rdoc_options << "--title" << "Helipad Documentation" <<
"--main" << "README" <<
"--inline-source"
s.extra_rdoc_files << "README"
s.rubyforge_project = "helipad"
end
Jeweler::GemcutterTasks.new
Jeweler::RubyforgeTasks.new do |rubyforge|
rubyforge.doc_task = "rdoc"
end
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
desc "Remove all generated files"
task :clobber => [:clobber_rdoc, :clobber_package]
desc "Remove rdoc generated files"
task :clobber_rdoc do |t|
FileUtils.rm_rf "doc"
end
desc "Remove generated package"
task :clobber_package do |t|
FileUtils.rm_rf "pkg"
end
desc "Build the rdoc HTML files"
task :rdoc do |t|
sh "rdoc #{quote_options(spec.rdoc_options).join(" ")} lib README"
end
desc "Force a rebuild of the rdoc files"
task :rerdoc do |t|
sh "rdoc #{quote_options(spec.rdoc_options).join(" ")} --force-update lib README"
end
desc "Run tests"
task :test, [:email, :password] do |t, args|
if args.email.nil? or args.password.nil?
raise(ArgumentError, 'Usage: rake "test[email, password]"', caller)
end
sh "ruby test/test_helipad.rb -- #{args.email} #{args.password}"
end
def quote_options(options)
options.collect do |option|
if option =~ /\s/
%{"#{option}"}
else
option
end
end
end