Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-temple for openSUSE:Factory 
checked in at 2023-04-21 18:47:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-temple (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-temple.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-temple"

Fri Apr 21 18:47:38 2023 rev:5 rq:1081282 version:0.10.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-temple/rubygem-temple.changes    
2022-10-29 20:18:32.454669131 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-temple.new.1533/rubygem-temple.changes  
2023-04-21 18:47:39.528128786 +0200
@@ -1,0 +2,8 @@
+Fri Apr 21 12:58:11 UTC 2023 - Marcus Rueckert <[email protected]>
+
+- updated to version 0.10.0
+  * Regression: Revert changes to :capture_generator since 0.8.2 (#112, #113, 
#137)
+  * Regression: Ensure that output buffer is not reused for capturing in Rails 
(#135)
+  * Drop support for Rails 4.x
+
+-------------------------------------------------------------------

Old:
----
  temple-0.9.1.gem

New:
----
  temple-0.10.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-temple.spec ++++++
--- /var/tmp/diff_new_pack.NmVEg1/_old  2023-04-21 18:47:40.052131823 +0200
+++ /var/tmp/diff_new_pack.NmVEg1/_new  2023-04-21 18:47:40.060131869 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-temple
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-temple
-Version:        0.9.1
+Version:        0.10.0
 Release:        0
 %define mod_name temple
 %define mod_full_name %{mod_name}-%{version}

++++++ temple-0.9.1.gem -> temple-0.10.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGES new/CHANGES
--- old/CHANGES 2022-10-25 10:16:46.000000000 +0200
+++ new/CHANGES 2023-01-23 18:07:59.000000000 +0100
@@ -1,6 +1,13 @@
+0.10.0
+
+  * Regression: Revert changes to :capture_generator since 0.8.2 (#112, #113, 
#137)
+  * Regression: Ensure that output buffer is not reused for capturing in Rails 
(#135)
+  * Drop support for Rails 4.x
+
 0.9.1
 
   * Fix Slim's error in AttributeMerger due to 0.9.0's :capture_generator 
(#137)
+  * Use specified :capture_generator for nested captures (#112)
   * Fix Temple::ERB::Engine's <%= to not escape and <%== to escape expressions
 
 0.9.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2022-10-25 10:16:46.000000000 +0200
+++ new/Gemfile 2023-01-23 18:07:59.000000000 +0100
@@ -1,3 +1,2 @@
 source 'https://rubygems.org/'
 gemspec
-gem 'escape_utils' if ENV['ESCAPE_UTILS']
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/erb/engine.rb new/lib/temple/erb/engine.rb
--- old/lib/temple/erb/engine.rb        2022-10-25 10:16:46.000000000 +0200
+++ new/lib/temple/erb/engine.rb        2023-01-23 18:07:59.000000000 +0100
@@ -7,6 +7,8 @@
       use Temple::ERB::Parser
       use Temple::ERB::Trimming
       filter :Escapable
+      filter :StringSplitter
+      filter :StaticAnalyzer
       filter :MultiFlattener
       filter :StaticMerger
       generator :ArrayBuffer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/filters/string_splitter.rb 
new/lib/temple/filters/string_splitter.rb
--- old/lib/temple/filters/string_splitter.rb   2022-10-25 10:16:46.000000000 
+0200
+++ new/lib/temple/filters/string_splitter.rb   2023-01-23 18:07:59.000000000 
+0100
@@ -7,7 +7,7 @@
   module Filters
     # Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 
'bar']]
     class StringSplitter < Filter
-      if defined?(Ripper) && RUBY_VERSION >= "2.0.0" && 
Ripper.respond_to?(:lex)
+      if defined?(Ripper) && Ripper.respond_to?(:lex)
         class << self
           # `code` param must be valid string literal
           def compile(code)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/generator.rb new/lib/temple/generator.rb
--- old/lib/temple/generator.rb 2022-10-25 10:16:46.000000000 +0200
+++ new/lib/temple/generator.rb 2023-01-23 18:07:59.000000000 +0100
@@ -10,9 +10,9 @@
     include Mixins::Options
 
     define_options :save_buffer,
-                   capture_generator: :self,
+                   capture_generator: 'StringBuffer',
                    buffer: '_buf',
-                   freeze_static: RUBY_VERSION >= '2.1'
+                   freeze_static: true
 
     def call(exp)
       [preamble, compile(exp), postamble].flatten.compact.join('; ')
@@ -54,7 +54,7 @@
     end
 
     def on_capture(name, exp)
-      capture_generator.new(**options, buffer: name).call(exp)
+      capture_generator.new(buffer: name).call(exp)
     end
 
     def on_static(text)
@@ -76,15 +76,9 @@
     end
 
     def capture_generator
-      @capture_generator ||=
-        case options[:capture_generator]
-        when :self
-          self.class
-        when Class
-          options[:capture_generator]
-        else
-          Generators.const_get(options[:capture_generator])
-        end
+      @capture_generator ||= Class === options[:capture_generator] ?
+      options[:capture_generator] :
+        Generators.const_get(options[:capture_generator])
     end
 
     def concat(str)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/generators/rails_output_buffer.rb 
new/lib/temple/generators/rails_output_buffer.rb
--- old/lib/temple/generators/rails_output_buffer.rb    2022-10-25 
10:16:46.000000000 +0200
+++ new/lib/temple/generators/rails_output_buffer.rb    2023-01-23 
18:07:59.000000000 +0100
@@ -9,10 +9,9 @@
     #
     # @api public
     class RailsOutputBuffer < StringBuffer
-      define_options :streaming,
+      define_options :streaming, # ignored
                      buffer_class: 'ActionView::OutputBuffer',
                      buffer: '@output_buffer',
-                     # output_buffer is needed for Rails 3.1 Streaming support
                      capture_generator: RailsOutputBuffer
 
       def call(exp)
@@ -20,7 +19,11 @@
       end
 
       def create_buffer
-        "#{buffer} = output_buffer || #{options[:buffer_class]}.new"
+        if buffer == '@output_buffer'
+          "#{buffer} = output_buffer || #{options[:buffer_class]}.new"
+        else
+          "#{buffer} = #{options[:buffer_class]}.new"
+        end
       end
 
       def concat(str)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/templates/rails.rb 
new/lib/temple/templates/rails.rb
--- old/lib/temple/templates/rails.rb   2022-10-25 10:16:46.000000000 +0200
+++ new/lib/temple/templates/rails.rb   2023-01-23 18:07:59.000000000 +0100
@@ -18,8 +18,8 @@
 
       def self.register_as(*names)
         raise 'Rails is not loaded - Temple::Templates::Rails cannot be used' 
unless defined?(::ActionView)
-        if ::ActiveSupport::VERSION::MAJOR < 3 || 
::ActiveSupport::VERSION::MAJOR == 3 && ::ActiveSupport::VERSION::MINOR < 1
-          raise "Temple supports only Rails 3.1 and greater, your Rails 
version is #{::ActiveSupport::VERSION::STRING}"
+        if ::ActiveSupport::VERSION::MAJOR < 5
+          raise "Temple supports only Rails 5 and greater, your Rails version 
is #{::ActiveSupport::VERSION::STRING}"
         end
         names.each do |name|
           ::ActionView::Template.register_template_handler name.to_sym, new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/utils.rb new/lib/temple/utils.rb
--- old/lib/temple/utils.rb     2022-10-25 10:16:46.000000000 +0200
+++ new/lib/temple/utils.rb     2023-01-23 18:07:59.000000000 +0100
@@ -14,7 +14,8 @@
     # @param html [String] The string to escape
     # @return [String] The escaped string
     def escape_html_safe(html)
-      html.html_safe? ? html : escape_html(html)
+      s = html.to_s
+      s.html_safe? || html.html_safe? ? s : escape_html(s)
     end
 
     if defined?(CGI.escapeHTML)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/temple/version.rb new/lib/temple/version.rb
--- old/lib/temple/version.rb   2022-10-25 10:16:46.000000000 +0200
+++ new/lib/temple/version.rb   2023-01-23 18:07:59.000000000 +0100
@@ -1,3 +1,3 @@
 module Temple
-  VERSION = '0.9.1'
+  VERSION = '0.10.0'
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-10-25 10:16:46.000000000 +0200
+++ new/metadata        2023-01-23 18:07:59.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: temple
 version: !ruby/object:Gem::Version
-  version: 0.9.1
+  version: 0.10.0
 platform: ruby
 authors:
 - Magnus Holm
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2022-10-25 00:00:00.000000000 Z
+date: 2023-01-23 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: tilt
@@ -178,7 +178,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.3.7
+rubygems_version: 3.2.5
 signing_key: 
 specification_version: 4
 summary: Template compilation framework in Ruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/filters/string_splitter_spec.rb 
new/spec/filters/string_splitter_spec.rb
--- old/spec/filters/string_splitter_spec.rb    2022-10-25 10:16:46.000000000 
+0200
+++ new/spec/filters/string_splitter_spec.rb    2023-01-23 18:07:59.000000000 
+0100
@@ -4,7 +4,7 @@
 rescue LoadError
 end
 
-if defined?(Ripper) && RUBY_VERSION >= "2.0.0"
+if defined?(Ripper)
   describe Temple::Filters::StringSplitter do
     before do
       @filter = Temple::Filters::StringSplitter.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/generator_spec.rb new/spec/generator_spec.rb
--- old/spec/generator_spec.rb  2022-10-25 10:16:46.000000000 +0200
+++ new/spec/generator_spec.rb  2023-01-23 18:07:59.000000000 +0100
@@ -62,15 +62,6 @@
       'foo << (D:dynamic); C:code; foo; VAR << (S:after); VAR')
   end
 
-  it 'should compile nested capture with the same capture_generator' do
-    gen = SimpleGenerator.new(buffer: "VAR", capture_generator: 
SimpleGenerator)
-    expect(gen.call([:capture, "foo", [:multi,
-      [:capture, "bar", [:multi,
-        [:static, "a"],
-        [:static, "b"]]]]
-    ])).to eq "VAR = BUFFER; foo = BUFFER; bar = BUFFER; bar << (S:a); bar << 
(S:b); bar; foo; VAR"
-  end
-
   it 'should compile newlines' do
     gen = SimpleGenerator.new(buffer: "VAR")
     expect(gen.call([:multi,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/temple.gemspec new/temple.gemspec
--- old/temple.gemspec  2022-10-25 10:16:46.000000000 +0200
+++ new/temple.gemspec  2023-01-23 18:07:59.000000000 +0100
@@ -1,4 +1,3 @@
-# -*- encoding: utf-8 -*-
 require File.dirname(__FILE__) + '/lib/temple/version'
 require 'date'
 

Reply via email to