Run of fresh-releases for ruby-temple

Try this locally (using silver-platter):

debian-svp new-upstream ruby-temple 

Merge these changes:

git pull https://janitor.debian.net/git/ruby-temple fresh-releases/main

Summary

Merged new upstream version: 0.8.2 (was: 0.8.0).

Diff

diff --git a/CHANGES b/CHANGES
index 7cacee5..b916158 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,14 @@
+0.8.2
+
+  * Support TruffleRuby in Temple::Filters::StaticAnalyzer (#127)
+  * Support TruffleRuby in Temple::Filters::StringSplitter (#127)
+
+0.8.1
+
+  * Stop relying on deprecated method in Rails (#121)
+  * Fix issue with --enable-frozen-string-literal
+  * Escape html in markdown
+
 0.8.0
 
   * Add Temple::StaticAnalyzer to analyze Ruby expressions
diff --git a/EXPRESSIONS.md b/EXPRESSIONS.md
index 2f499c0..5641b4b 100644
--- a/EXPRESSIONS.md
+++ b/EXPRESSIONS.md
@@ -220,7 +220,7 @@ generates:
 ### [:html, :tag, identifier, attributes, optional-sexp]
 
 HTML tag abstraction. Identifier can be a String or a Symbol. If the optional content Sexp is omitted
-the tag is closed (e.g. <br/> <img/>). The tag is also closed if the content Sexp is empty
+the tag is closed (e.g. `<br/>` `<img/>`). The tag is also closed if the content Sexp is empty
 (consists only of :multi and :newline expressions) and the tag is registered as auto-closing.
 
 Example:
diff --git a/README.md b/README.md
index 91d6d4e..087b6e6 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 Temple
 ======
 
-[![Build Status](https://secure.travis-ci.org/judofyr/temple.png?branch=master)](http://travis-ci.org/judofyr/temple) [![Dependency Status](https://gemnasium.com/judofyr/temple.png?travis)](https://gemnasium.com/judofyr/temple) [![Code Climate](https://codeclimate.com/github/judofyr/temple.png)](https://codeclimate.com/github/judofyr/temple)
+[![Build Status](https://secure.travis-ci.org/judofyr/temple.svg?branch=master)](http://travis-ci.org/judofyr/temple) [![Code Climate](https://codeclimate.com/github/judofyr/temple.svg)](https://codeclimate.com/github/judofyr/temple) [![Gem Version](https://badge.fury.io/rb/temple.svg)](https://rubygems.org/gems/temple)
 
 Temple is an abstraction and a framework for compiling templates to pure Ruby.
 It's all about making it easier to experiment, implement and optimize template
diff --git a/debian/changelog b/debian/changelog
index 65382f5..6e1b98d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,12 @@
-ruby-temple (0.8.0-2) UNRELEASED; urgency=medium
+ruby-temple (0.8.2-1) UNRELEASED; urgency=medium
 
+  [ Utkarsh Gupta ]
   * Add salsa-ci.yml
 
- -- Utkarsh Gupta <guptautkarsh2102@gmail.com>  Tue, 13 Aug 2019 07:56:19 +0530
+  [ Debian Janitor ]
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 15 Sep 2019 18:08:14 +0000
 
 ruby-temple (0.8.0-1) unstable; urgency=medium
 
diff --git a/lib/temple/filters/string_splitter.rb b/lib/temple/filters/string_splitter.rb
index 6f73094..0a454f5 100644
--- a/lib/temple/filters/string_splitter.rb
+++ b/lib/temple/filters/string_splitter.rb
@@ -7,7 +7,7 @@ module Temple
   module Filters
     # Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 'bar']]
     class StringSplitter < Filter
-      if defined?(Ripper) && RUBY_VERSION >= "2.0.0"
+      if defined?(Ripper) && RUBY_VERSION >= "2.0.0" && Ripper.respond_to?(:lex)
         class << self
           # `code` param must be valid string literal
           def compile(code)
diff --git a/lib/temple/mixins/dispatcher.rb b/lib/temple/mixins/dispatcher.rb
index 7d66276..f050542 100644
--- a/lib/temple/mixins/dispatcher.rb
+++ b/lib/temple/mixins/dispatcher.rb
@@ -90,7 +90,8 @@ module Temple
             raise 'Invalid dispatcher node' unless method
             call_method
           else
-            code = "case(exp[#{level}])\n"
+            code = String.new
+            code << "case(exp[#{level}])\n"
             each do |key, child|
               code << "when #{key.inspect}\n  " <<
                 child.compile(level + 1, call_method).gsub("\n".freeze, "\n  ".freeze) << "\n".freeze
diff --git a/lib/temple/static_analyzer.rb b/lib/temple/static_analyzer.rb
index 42e4f58..6efe4af 100644
--- a/lib/temple/static_analyzer.rb
+++ b/lib/temple/static_analyzer.rb
@@ -30,7 +30,7 @@ module Temple
 
     class << self
       def available?
-        defined?(Ripper)
+        defined?(Ripper) && Ripper.respond_to?(:lex)
       end
 
       def static?(code)
diff --git a/lib/temple/templates/rails.rb b/lib/temple/templates/rails.rb
index ceb94dc..ca27351 100644
--- a/lib/temple/templates/rails.rb
+++ b/lib/temple/templates/rails.rb
@@ -3,9 +3,9 @@ module Temple
     class Rails
       extend Mixins::Template
 
-      def call(template)
+      def call(template, source = nil)
         opts = {}.update(self.class.options).update(file: template.identifier)
-        self.class.compile(template.source, opts)
+        self.class.compile((source || template.source), opts)
       end
 
       def supports_streaming?
diff --git a/lib/temple/version.rb b/lib/temple/version.rb
index 8de6cf4..7d26798 100644
--- a/lib/temple/version.rb
+++ b/lib/temple/version.rb
@@ -1,3 +1,3 @@
 module Temple
-  VERSION = '0.8.0'
+  VERSION = '0.8.2'
 end
diff --git a/test/test_static_analyzer.rb b/test/test_static_analyzer.rb
index ac29f5f..1d2b4e8 100644
--- a/test/test_static_analyzer.rb
+++ b/test/test_static_analyzer.rb
@@ -3,7 +3,7 @@ require 'helper'
 describe Temple::StaticAnalyzer do
   describe '.available?' do
     it 'should return true if its dependency is available' do
-      Temple::StaticAnalyzer.available?.should.equal(defined?(Ripper))
+      Temple::StaticAnalyzer.available?.should.equal(defined?(Ripper) && Ripper.respond_to?(:lex))
     end
   end
 

Full worker log Full build log