Permalink
Browse files

add pandoc task in Rakefile (rake readme)

to preview the README.mdown as .html
  • Loading branch information...
1 parent 684f110 commit 2b60d492f31d47a81d7e83a6b918cee0d9032020 @jmettraux jmettraux committed Aug 3, 2012
Showing with 21 additions and 1 deletion.
  1. +2 −0 Gemfile
  2. +2 −0 Gemfile.lock
  3. +17 −1 Rakefile
View
@@ -13,6 +13,8 @@ gem 'yajl-ruby', :require => 'yajl'
#gem 'ruote', :path => '~/w/ruote/'
gem 'ruote', :git => 'git://github.com/jmettraux/ruote.git'
+gem 'rake'
+
#group :test do
# gem 'rspec', '2.4.0'
# gem 'rack-test'
View
@@ -37,6 +37,7 @@ GEM
rack
rack-test (0.5.7)
rack (>= 1.0)
+ rake (0.9.2.2)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
@@ -85,6 +86,7 @@ PLATFORMS
DEPENDENCIES
rack-test (= 0.5.7)
+ rake
rspec (>= 2.5.0)
ruote!
ruote-kit!
View
@@ -1,10 +1,11 @@
+
require 'rubygems'
require 'rubygems/user_interaction' if Gem::RubyGemsVersion == '1.5.0'
require 'bundler'
require 'rake'
require 'rake/clean'
-require 'rake/rdoctask'
+require 'rdoc/task'
require 'rspec/core/rake_task'
Bundler::GemHelper.install_tasks
@@ -62,3 +63,18 @@ task :upload_rdoc => [ :clean, :rdoc ] do
sh "rsync -azv -e ssh rdoc/#{GEMSPEC.name}_rdoc #{account}:#{webdir}/"
end
+
+#
+# previewing the README
+
+desc %{
+ preview the README (requires http://johnmacfarlane.net/pandoc/)
+}
+task :readme do
+
+ exec(
+ 'mkdir tmp; ' +
+ 'pandoc -s README.mdown -o tmp/README.html; ' +
+ 'open tmp/README.html')
+end
+

0 comments on commit 2b60d49

Please sign in to comment.