Sha256: da1024bc80e2ee1f284d387b9f6fe4c6d86771913e1a3421904949b741bbc3be
Contents?: true
Size: 1.68 KB
Versions: 9
Compression:
Stored size: 1.68 KB
Contents
#!/usr/bin/env rake require "bundler/gem_tasks" require 'rake/clean' require "rake/testtask" task :default => [:test] Rake::TestTask.new do |t| t.libs << 'test' t.pattern = 'test/*_test.rb' end desc 'Run simple benchmarks' task :bench do exec "ruby test/bench.rb" end # ROCCO =============================================================== require 'rdiscount' require 'rocco/tasks' Rocco::make 'docs/' desc 'Build rocco docs' task :docs => :rocco directory 'docs/' desc 'Build docs and open in browser for the reading' task :read => :docs do sh 'open docs/lib/m.html' end # Make index.html a copy of rocco.html file 'docs/index.html' => 'docs/lib/m.html' do |f| cp 'docs/lib/m.html', 'docs/index.html', :preserve => true end task :docs => 'docs/index.html' CLEAN.include 'docs/index.html' # Alias for docs task task :doc => :docs # GITHUB PAGES =============================================================== desc "really kill docs folder" task :clean_docs do sh "rm -rf docs/" end desc 'Update gh-pages branch' task :pages => [:clean_docs, 'docs/.git', :docs] do rev = `git rev-parse --short HEAD`.strip Dir.chdir 'docs' do sh "mv lib/m m" sh "mv lib/m.html m.html" sh "git add -A" sh "git commit -m 'rebuild pages from #{rev}'" do |ok,res| if ok verbose { puts "gh-pages updated" } sh "git push -q o HEAD:gh-pages" end end end end # Update the pages/ directory clone file 'docs/.git' => ['docs/'] do |f| sh "cd docs && git init -q && git remote add o ../.git" if !File.exist?(f.name) sh "cd docs && git fetch -q o && git reset -q --hard o/gh-pages && git rm -r . && git commit -m 'blank out' && touch ." end CLOBBER.include 'docs/.git'
Version data entries
9 entries across 9 versions & 1 rubygems
Version | Path |
---|---|
m-1.3.2 | Rakefile |
m-1.3.1 | Rakefile |
m-1.3.0 | Rakefile |
m-1.2.1 | Rakefile |
m-1.2.0 | Rakefile |
m-1.1.0 | Rakefile |
m-1.0.1 | Rakefile |
m-1.0.0 | Rakefile |
m-1.0.0.pre | Rakefile |