[ARVADOS] created: 1.3.0-3273-g33f712764

Git user git at public.arvados.org
Tue Oct 6 18:03:00 UTC 2020


        at  33f712764465c29c20acd025ad8421726df6423f (commit)


commit 33f712764465c29c20acd025ad8421726df6423f
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Oct 6 14:02:17 2020 -0400

    16956: update our zenweb/liquid package to support liquid 4+
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/doc/install/install-compute-ping.html.textile.liquid b/doc/install/install-compute-ping.html.textile.liquid
index be3f58b61..37b36f597 100644
--- a/doc/install/install-compute-ping.html.textile.liquid
+++ b/doc/install/install-compute-ping.html.textile.liquid
@@ -11,4 +11,4 @@ SPDX-License-Identifier: CC-BY-SA-3.0
 
 When a new elastic compute node is booted, it needs to contact Arvados to register itself.  Here is an example ping script to run on boot.
 
-<notextile> {% code 'compute_ping_rb' as ruby %} </notextile>
+<notextile> {% code compute_ping_rb as ruby %} </notextile>
diff --git a/doc/sdk/go/example.html.textile.liquid b/doc/sdk/go/example.html.textile.liquid
index fd62bb67e..688c45bf3 100644
--- a/doc/sdk/go/example.html.textile.liquid
+++ b/doc/sdk/go/example.html.textile.liquid
@@ -1,7 +1,7 @@
 ---
 layout: default
 navsection: sdk
-navmenu: Python
+navmenu: Go
 title: Examples
 ...
 {% comment %}
@@ -76,6 +76,6 @@ h2. Example program
 
 You can save this source as a .go file and run it:
 
-<notextile>{% code 'example_sdk_go' as go %}</notextile>
+<notextile>{% code example_sdk_go as go %}</notextile>
 
 A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree.
diff --git a/doc/user/tutorials/git-arvados-guide.html.textile.liquid b/doc/user/tutorials/git-arvados-guide.html.textile.liquid
index ad719a66e..a552e4ee0 100644
--- a/doc/user/tutorials/git-arvados-guide.html.textile.liquid
+++ b/doc/user/tutorials/git-arvados-guide.html.textile.liquid
@@ -64,7 +64,7 @@ First, create a simple CWL CommandLineTool:
 
 notextile. <pre>~/tutorials$ <code class="userinput">nano hello.cwl</code></pre>
 
-<notextile> {% code 'tutorial_hello_cwl' as yaml %} </notextile>
+<notextile> {% code tutorial_hello_cwl as yaml %} </notextile>
 
 Next, add the file to the git repository.  This tells @git@ that the file should be included on the next commit.
 
diff --git a/doc/zenweb-liquid.rb b/doc/zenweb-liquid.rb
index baa8fe42d..3e8672e02 100644
--- a/doc/zenweb-liquid.rb
+++ b/doc/zenweb-liquid.rb
@@ -50,7 +50,7 @@ module Zenweb
       Liquid::Tag.instance_method(:initialize).bind(self).call(tag_name, markup, tokens)
 
       if markup =~ Syntax
-        @template_name = $1
+        @template_name_expr = $1
         @language = $3
         @attributes    = {}
       else
@@ -61,9 +61,14 @@ module Zenweb
     def render(context)
       require 'coderay'
 
-      partial = load_cached_partial(context)
+      partial = load_cached_partial(@template_name_expr, context)
       html = ''
 
+      # be explicit about errors
+      context.exception_renderer = lambda do |exc|
+        exc.is_a?(Liquid::InternalError) ? "Liquid error: #{exc.cause.message}" : exc
+      end
+
       context.stack do
         html = CodeRay.scan(partial.root.nodelist.join, @language).div
       end
@@ -98,6 +103,11 @@ module Zenweb
         partial = partial[1..-1]
       end
 
+      # be explicit about errors
+      context.exception_renderer = lambda do |exc|
+        exc.is_a?(Liquid::InternalError) ? "Liquid error: #{exc.cause.message}" : exc
+      end
+
       context.stack do
         html = CodeRay.scan(partial, @language).div
       end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list