Started tinkering with zenweb
authorPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 31 Dec 2013 21:49:42 +0000 (16:49 -0500)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Tue, 31 Dec 2013 21:49:42 +0000 (16:49 -0500)
doc/Gemfile
doc/Gemfile.lock
doc/README_FOR_APP [deleted file]
doc/Rakefile [new file with mode: 0755]
doc/_config.yml
doc/zenweb-textile.rb [new file with mode: 0644]

index a9cccb48f8e0698c785024b38a23b06d3e4266b0..ea40d14c11490efff44f4b1b7c25b32152d6ffba 100644 (file)
@@ -1,4 +1,4 @@
 source 'https://rubygems.org'
 
-gem 'jekyll'
-gem 'RedCloth'
+gem 'zenweb'
+gem 'zenweb-textile'
index 80a56193745d1eb5498d25842dcbd7b54a74d0fe..608a00195b5c63e947ca765afdcd0dece34abb99 100644 (file)
@@ -2,48 +2,27 @@ GEM
   remote: https://rubygems.org/
   specs:
     RedCloth (4.2.9)
-    classifier (1.3.3)
-      fast-stemmer (>= 1.0.0)
-    colorator (0.1)
-    commander (4.1.5)
-      highline (~> 1.6.11)
-    fast-stemmer (1.0.2)
-    ffi (1.9.3)
-    highline (1.6.20)
-    jekyll (1.3.0)
-      classifier (~> 1.3)
-      colorator (~> 0.1)
-      commander (~> 4.1.3)
-      liquid (~> 2.5.2)
-      listen (~> 1.3)
-      maruku (~> 0.6.0)
-      pygments.rb (~> 0.5.0)
-      redcarpet (~> 2.3.0)
-      safe_yaml (~> 0.9.7)
-    liquid (2.5.4)
-    listen (1.3.1)
-      rb-fsevent (>= 0.9.3)
-      rb-inotify (>= 0.9)
-      rb-kqueue (>= 0.2)
-    maruku (0.6.1)
-      syntax (>= 1.0.0)
-    posix-spawn (0.3.6)
-    pygments.rb (0.5.4)
-      posix-spawn (~> 0.3.6)
-      yajl-ruby (~> 1.1.0)
-    rb-fsevent (0.9.3)
-    rb-inotify (0.9.2)
-      ffi (>= 0.5.0)
-    rb-kqueue (0.2.0)
-      ffi (>= 0.5.0)
-    redcarpet (2.3.0)
-    safe_yaml (0.9.7)
-    syntax (1.0.0)
-    yajl-ruby (1.1.0)
+    coderay (1.1.0)
+    kramdown (0.14.2)
+    less (1.2.21)
+      mutter (>= 0.4.2)
+      treetop (>= 1.4.2)
+    mutter (0.5.3)
+    polyglot (0.3.3)
+    treetop (1.4.15)
+      polyglot
+      polyglot (>= 0.3.1)
+    zenweb (3.0.0.b3)
+      coderay (~> 1.0)
+      kramdown (~> 0.13)
+      less (~> 1.2)
+    zenweb-textile (0.0.1)
+      RedCloth (~> 4.2.9)
+      zenweb (= 3.0.0.b3)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
-  RedCloth
-  jekyll
+  zenweb
+  zenweb-textile
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
deleted file mode 100644 (file)
index fe41f5c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Use this README file to introduce your application and point to useful places in the API for learning more.
-Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
diff --git a/doc/Rakefile b/doc/Rakefile
new file mode 100755 (executable)
index 0000000..12f87b1
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env rake
+
+require "rubygems"
+require "zenweb/tasks"
+load "zenweb-textile.rb"
+
index a4fed53b19ca5f79e499c5643e7a19092042e1b2..108ec24a23bd7ce857abac8e8c9ef0a8f480df17 100644 (file)
@@ -1,3 +1,4 @@
+exclude: ["Rakefile", "tmp"]
 baseurl: /doc
 arvados_api_host: qr1hi.arvadosapi.com
 navbar:
diff --git a/doc/zenweb-textile.rb b/doc/zenweb-textile.rb
new file mode 100644 (file)
index 0000000..bdd7162
--- /dev/null
@@ -0,0 +1,23 @@
+require 'zenweb'
+
+module ZenwebTextile
+  VERSION = '0.0.1'
+end
+
+module Zenweb
+  class Page
+    
+    ##
+    # Render a page's textile and return the resulting html
+    def render_textile page, content
+      textile body
+    end
+
+    ##
+    # Render textile in +content+ 
+    def textile content
+      require 'RedCloth'
+      @textile = RedCloth.new(content).to_html
+    end
+  end
+end