Hello community, here is the log from the commit of package rubygem-erubi for openSUSE:Factory checked in at 2019-11-13 13:26:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-erubi (Old) and /work/SRC/openSUSE:Factory/.rubygem-erubi.new.2990 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-erubi" Wed Nov 13 13:26:58 2019 rev:5 rq:747801 version:1.9.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-erubi/rubygem-erubi.changes 2019-03-04 09:19:54.748605978 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-erubi.new.2990/rubygem-erubi.changes 2019-11-13 13:26:58.707613317 +0100 @@ -1,0 +2,7 @@ +Tue Nov 12 16:33:16 UTC 2019 - Manuel Schnitzer <[email protected]> + +- updated to version 1.9.0 + + * Change default :bufvar from 'String.new' to '::String.new' to work with BasicObject (jeremyevans) + +------------------------------------------------------------------- Old: ---- erubi-1.8.0.gem New: ---- erubi-1.9.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-erubi.spec ++++++ --- /var/tmp/diff_new_pack.VIN3O0/_old 2019-11-13 13:26:59.183613812 +0100 +++ /var/tmp/diff_new_pack.VIN3O0/_new 2019-11-13 13:26:59.187613817 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-erubi # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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-erubi -Version: 1.8.0 +Version: 1.9.0 Release: 0 %define mod_name erubi %define mod_full_name %{mod_name}-%{version} ++++++ erubi-1.8.0.gem -> erubi-1.9.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 2018-12-18 23:43:37.000000000 +0100 +++ new/CHANGELOG 2019-09-25 17:47:29.000000000 +0200 @@ -1,3 +1,7 @@ +=== 1.9.0 (2019-09-25) + +* Change default :bufvar from 'String.new' to '::String.new' to work with BasicObject (jeremyevans) + === 1.8.0 (2018-12-18) * Support :yield_returns_buffer option in capture_end for always returning the (potentially modified) buffer in <%|= tags (evanleck) (#15) Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/erubi/capture_end.rb new/lib/erubi/capture_end.rb --- old/lib/erubi/capture_end.rb 2018-12-18 23:43:37.000000000 +0100 +++ new/lib/erubi/capture_end.rb 2019-09-25 17:47:29.000000000 +0200 @@ -21,7 +21,7 @@ escape = properties.fetch(:escape){properties.fetch(:escape_html, false)} @escape_capture = properties.fetch(:escape_capture, escape) @yield_returns_buffer = properties.fetch(:yield_returns_buffer, false) - @bufval = properties[:bufval] ||= 'String.new' + @bufval = properties[:bufval] ||= '::String.new' @bufstack = '__erubi_stack' properties[:regexp] ||= /<%(\|?={1,2}|-|\#|%|\|)?(.*?)([-=])?%>([ \t]*\r?\n)?/m super diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/erubi.rb new/lib/erubi.rb --- old/lib/erubi.rb 2018-12-18 23:43:37.000000000 +0100 +++ new/lib/erubi.rb 2019-09-25 17:47:29.000000000 +0200 @@ -1,7 +1,7 @@ # frozen_string_literal: true module Erubi - VERSION = '1.8.0' + VERSION = '1.9.0' RANGE_ALL = 0..-1 if RUBY_VERSION >= '1.9' @@ -51,9 +51,9 @@ # Initialize a new Erubi::Engine. Options: # :bufval :: The value to use for the buffer variable, as a string. - # :bufvar :: The variable name to use for the buffer variable, as a string. + # :bufvar :: The variable name to use for the buffer variable, as a string (default '::String.new') # :ensure :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. - # :escapefunc :: The function to use for escaping, as a string (default: ::Erubi.h). + # :escapefunc :: The function to use for escaping, as a string (default: '::Erubi.h'). # :escape :: Whether to make <%= escape by default, and <%== not escape by default. # :escape_html :: Same as :escape, with lower priority. # :filename :: The filename for the template. @@ -69,7 +69,7 @@ trim = properties[:trim] != false @filename = properties[:filename] @bufvar = bufvar = properties[:bufvar] || properties[:outvar] || "_buf" - bufval = properties[:bufval] || 'String.new' + bufval = properties[:bufval] || '::String.new' regexp = properties[:regexp] || /<%(={1,2}|-|\#|%)?(.*?)([-=])?%>([ \t]*\r?\n)?/m preamble = properties[:preamble] || "#{bufvar} = #{bufval};" postamble = properties[:postamble] || "#{bufvar}.to_s\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-12-18 23:43:37.000000000 +0100 +++ new/metadata 2019-09-25 17:47:29.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: erubi version: !ruby/object:Gem::Version - version: 1.8.0 + version: 1.9.0 platform: ruby authors: - Jeremy Evans @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2018-12-18 00:00:00.000000000 Z +date: 2019-09-25 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: minitest @@ -25,6 +25,20 @@ - - ">=" - !ruby/object:Gem::Version version: '0' +- !ruby/object:Gem::Dependency + name: minitest-global_expectations + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' description: Erubi is a ERB template engine for ruby. It is a simplified fork of Erubis email: [email protected] executables: [] @@ -67,8 +81,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.7.6 +rubygems_version: 3.0.3 signing_key: specification_version: 4 summary: Small ERB Implementation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test.rb new/test/test.rb --- old/test/test.rb 2018-12-18 23:43:37.000000000 +0100 +++ new/test/test.rb 2019-09-25 17:47:29.000000000 +0200 @@ -25,8 +25,8 @@ require 'erubi/capture_end' ENV['MT_NO_PLUGINS'] = '1' # Work around stupid autoloading of plugins -require 'minitest/spec' -require 'minitest/autorun' +gem 'minitest' +require 'minitest/global_expectations/autorun' describe Erubi::Engine do before do @@ -94,7 +94,7 @@ </table> <%== i+1 %> END1 -_buf = String.new; _buf << '<table> +_buf = ::String.new; _buf << '<table> <tbody> '; i = 0 list.each_with_index do |item, i| @@ -142,7 +142,7 @@ <%# 3 %>// c END1 -_buf = String.new; 1 +_buf = ::String.new; 1 _buf << 'a '; 2 _buf << 'b @@ -201,7 +201,7 @@ </table> <%== i+1 %> END1 -begin; __original_outvar = @a if defined?(@a); @a = String.new; @a << '<table> +begin; __original_outvar = @a if defined?(@a); @a = ::String.new; @a << '<table> <tbody> '; i = 0 list.each_with_index do |item, i| @@ -265,9 +265,9 @@ </tbody> </table> END1 -#{'__erubi = ::Erubi;' unless escape}@a = String.new; @a << '<table> +#{'__erubi = ::Erubi;' unless escape}@a = ::String.new; @a << '<table> <tbody> -'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << (( bar do @a << ' +'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << (( bar do @a << ' '; @a << ' <b>'; @a << #{!escape ? '__erubi' : '::Erubi'}.h(( '&' )); @a << '</b> '; @a << ' '; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @a << ' </tbody> @@ -301,9 +301,9 @@ </tbody> </table> END1 -#{'__erubi = ::Erubi;' if escape}@a = String.new; @a << '<table> +#{'__erubi = ::Erubi;' if escape}@a = ::String.new; @a << '<table> <tbody> -'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( bar do @a << ' +'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( bar do @a << ' '; @a << ' <b>'; @a << #{escape ? '__erubi' : '::Erubi'}.h(( '&' )); @a << '</b> '; @a << ' '; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @a << ' </tbody> @@ -335,9 +335,9 @@ </tbody> </table> END1 -#{'__erubi = ::Erubi;' if escape}@a = String.new; @a << '<table> +#{'__erubi = ::Erubi;' if escape}@a = ::String.new; @a << '<table> <tbody> -'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( quux do |i| @a << ' +'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( quux do |i| @a << ' '; @a << ' <b>'; @a << #{escape ? '__erubi' : '::Erubi'}.h(( "\#{i}&" )); @a << '</b> '; @a << ' '; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @a << ' </tbody> @@ -374,11 +374,11 @@ </tbody> </table> END1 -#{'__erubi = ::Erubi;' if escape}@a = String.new; @a << '<table> +#{'__erubi = ::Erubi;' if escape}@a = ::String.new; @a << '<table> <tbody> -'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( bar do @a << ' +'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( bar do @a << ' '; @a << ' <b>'; @a << #{escape ? '__erubi' : '::Erubi'}.h(( '&' )); @a << '</b> -'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( baz do @a << 'e'; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' +'; @a << ' ';begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << #{escape ? '__erubi' : '::Erubi'}.h(( baz do @a << 'e'; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @a << ' '; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @a << ' </tbody> </table> @@ -414,7 +414,7 @@ </table> END1 # frozen_string_literal: true -@_out_buf = String.new; @_out_buf << '<table> +@_out_buf = ::String.new; @_out_buf << '<table> '; for item in @items @_out_buf << ' <tr> <td>'; @_out_buf << ( i+1 ).to_s; @_out_buf << '</td> @@ -448,7 +448,7 @@ <%% end %> </table> END1 -_buf = String.new; _buf << '<table> +_buf = ::String.new; _buf << '<table> '; _buf << '<% for item in @items %> '; _buf << ' <tr> <td>';; _buf << '</td> @@ -488,7 +488,7 @@ <% i %> </table> END1 -_buf = String.new; _buf << '<table> +_buf = ::String.new; _buf << '<table> '; _buf << ' '; for item in @items ; _buf << ' '; _buf << ' <tr> <td>'; @@ -537,7 +537,7 @@ </table> <%== i+1 %> END1 -_buf = String.new; _buf << '<table> +_buf = ::String.new; _buf << '<table> <tbody> '; i = 0 list.each_with_index do |item, i| @@ -581,7 +581,7 @@ </tbody> </table> END1 -__erubi = ::Erubi;_buf = String.new; _buf << '<table> +__erubi = ::Erubi;_buf = ::String.new; _buf << '<table> <tbody> '; i = 0 list.each_with_index do |item, i| @@ -653,6 +653,12 @@ Erubi::Engine.new('', :outvar=>'foo').bufvar.must_equal 'foo' end + it "should work with BasicObject methods" do + c = Class.new(BasicObject) + c.class_eval("def a; #{Erubi::Engine.new('2').src} end") + c.new.a.must_equal '2' + end if defined?(BasicObject) + it "should return frozen object" do Erubi::Engine.new('').frozen?.must_equal true end @@ -687,7 +693,7 @@ Let's eat <%= item %>! <% nil %><%| end %> END1 -@a = String.new;begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << (( bar do |item| @a << ' +@a = ::String.new;begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << (( bar do |item| @a << ' '; @a << 'Let\\'s eat '; @a << ( item ).to_s; @a << '! '; nil ; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @@ -703,7 +709,7 @@ Let's eat <%= item %>! <% nil %><%| end %> END1 -@a = String.new;begin; (__erubi_stack ||= []) << @a; @a = String.new; __erubi_stack.last << (( bar do |item| @a << ' +@a = ::String.new;begin; (__erubi_stack ||= []) << @a; @a = ::String.new; __erubi_stack.last << (( bar do |item| @a << ' '; @a << 'Let\\'s eat '; @a << ( item ).to_s; @a << '! '; nil ; @a; end )).to_s; ensure; @a = __erubi_stack.pop; end; @a << ' '; @@ -736,7 +742,7 @@ Delicious! END1 -_buf = String.new;begin; (__erubi_stack ||= []) << _buf; _buf = String.new; __erubi_stack.last << (( bar do _buf << ' +_buf = ::String.new;begin; (__erubi_stack ||= []) << _buf; _buf = ::String.new; __erubi_stack.last << (( bar do _buf << ' '; _buf << 'Let\\'s eat the tacos! '; _buf; end )).to_s; ensure; _buf = __erubi_stack.pop; end; _buf << ' '; _buf << ' @@ -758,7 +764,7 @@ Delicious! END1 -_buf = String.new;begin; (__erubi_stack ||= []) << _buf; _buf = String.new; __erubi_stack.last << (( bar(\"Don't eat the burgers!\") do _buf << ' +_buf = ::String.new;begin; (__erubi_stack ||= []) << _buf; _buf = ::String.new; __erubi_stack.last << (( bar(\"Don't eat the burgers!\") do _buf << ' '; _buf << 'Let\\'s eat burgers! '; _buf; end )).to_s; ensure; _buf = __erubi_stack.pop; end; _buf << ' '; _buf << '
