summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Hobson2014-01-28 20:18:47 -0800
committerZack Hobson2014-01-29 09:48:44 -0800
commit7fd295c0fb4392c7c698d9586bee7aa633ee2363 (patch)
treeffe1d8cafbc4ef2ca9446808051067e56e7169b2
parent7dcf670853d9c7e8d28af06e94b278023cd7b018 (diff)
downloadhcl-7fd295c0fb4392c7c698d9586bee7aa633ee2363.tar.bz2
rakefile: use ronn ruby API instead of shelling out
-rw-r--r--Rakefile7
-rw-r--r--hcl.gemspec4
2 files changed, 8 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 5d74ebf..1ab7b71 100644
--- a/Rakefile
+++ b/Rakefile
@@ -10,8 +10,13 @@ Rake::TestTask.new do |t|
end
task :default => :test
+require 'ronn'
task :man do
- system 'ronn -r man/hcl.1.ronn'
+ print "Writing manual page..."
+ File.open('man/hcl.1','w').tap do |man|
+ man.write Ronn::Document.new('man/hcl.1.ronn').to_roff
+ end
+ puts "done."
end
task 'build:gem' => [:man]
diff --git a/hcl.gemspec b/hcl.gemspec
index d70ff4e..ab61793 100644
--- a/hcl.gemspec
+++ b/hcl.gemspec
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
s.email = "zack@zackhobson.com"
s.description = "HCl is a command-line client for manipulating Harvest time sheets."
s.executables = ["hcl"]
- s.files = %w[LICENSE Rakefile Gemfile] + Dir['*.markdown'] +
- Dir['bin/*'] + Dir['lib/**/*.rb'] + Dir['test/**/*.rb'] + Dir['man/hcl.1']
+ s.files = %w[LICENSE Rakefile Gemfile bin/hcl man/hcl.1] + Dir['*.markdown'] +
+ Dir['lib/**/*.rb'] + Dir['test/**/*.rb']
s.homepage = "http://zackhobson.com/hcl/"
s.licenses = ["MIT"]
s.summary = "Harvest timesheets from the command-line"