Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-erubi for openSUSE:Factory 
checked in at 2023-11-05 12:18:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-erubi (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-erubi.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-erubi"

Sun Nov  5 12:18:30 2023 rev:8 rq:1123003 version:1.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-erubi/rubygem-erubi.changes      
2022-08-07 18:33:54.345148660 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-erubi.new.17445/rubygem-erubi.changes   
2023-11-05 12:18:35.648697395 +0100
@@ -1,0 +2,10 @@
+Thu Nov  2 15:46:33 UTC 2023 - Dan Čermák <dan.cer...@posteo.net>
+
+- === 1.12.0 (2022-12-22)
+
+* Use erb/escape for faster html escaping if available (jeremyevans)
+
+* Default :freeze_template_literals option to false if running with 
--enable-frozen-string-literal (casperisfine) (#35)
+
+
+-------------------------------------------------------------------

Old:
----
  erubi-1.11.0.gem

New:
----
  erubi-1.12.0.gem

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

Other differences:
------------------
++++++ rubygem-erubi.spec ++++++
--- /var/tmp/diff_new_pack.B9K4iw/_old  2023-11-05 12:18:38.048785438 +0100
+++ /var/tmp/diff_new_pack.B9K4iw/_new  2023-11-05 12:18:38.048785438 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-erubi
 #
-# 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,11 +24,10 @@
 #
 
 Name:           rubygem-erubi
-Version:        1.11.0
+Version:        1.12.0
 Release:        0
 %define mod_name erubi
 %define mod_full_name %{mod_name}-%{version}
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
 BuildRequires:  %{ruby}
@@ -38,7 +37,6 @@
 Source1:        gem2rpm.yml
 Summary:        Small ERB Implementation
 License:        MIT
-Group:          Development/Languages/Ruby
 
 %description
 Erubi is a ERB template engine for ruby. It is a simplified fork of Erubis.

++++++ erubi-1.11.0.gem -> erubi-1.12.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG new/CHANGELOG
--- old/CHANGELOG       2022-08-02 17:40:35.000000000 +0200
+++ new/CHANGELOG       2022-12-22 20:28:09.000000000 +0100
@@ -1,3 +1,9 @@
+=== 1.12.0 (2022-12-22)
+
+* Use erb/escape for faster html escaping if available (jeremyevans)
+
+* Default :freeze_template_literals option to false if running with 
--enable-frozen-string-literal (casperisfine) (#35)
+
 === 1.11.0 (2022-08-02)
 
 * Support :freeze_template_literals option for configuring whether to add 
.freeze to template literal strings (casperisfine) (#33)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2022-08-02 17:40:35.000000000 +0200
+++ new/README.rdoc     2022-12-22 20:28:09.000000000 +0100
@@ -9,7 +9,7 @@
 * Automatically freezes strings for template text when ruby optimizes it (on 
ruby 2.1+)
 * Escapes <tt>'</tt> (apostrophe) when escaping for better XSS protection 
 * Has 6x faster escaping on ruby 2.3+ by using cgi/escape
-* Has 86% smaller memory footprint
+* Has 81% smaller memory footprint (calculated using 
+ObjectSpace.memsize_of_all+)
 * Does no monkey patching (Erubis adds a method to Kernel)
 * Uses an immutable design (all options passed to the constructor, which 
returns a frozen object)
 * Has simpler internals (1 file, <150 lines of code)
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.rb new/lib/erubi.rb
--- old/lib/erubi.rb    2022-08-02 17:40:35.000000000 +0200
+++ new/lib/erubi.rb    2022-12-22 20:28:09.000000000 +0100
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 module Erubi
-  VERSION = '1.11.0'
+  VERSION = '1.12.0'
 
   # :nocov:
   if RUBY_VERSION >= '1.9'
@@ -14,33 +14,41 @@
 
   MATCH_METHOD = RUBY_VERSION >= '2.4' ? :match? : :match
   SKIP_DEFINED_FOR_INSTANCE_VARIABLE = RUBY_VERSION > '3'
+  FREEZE_TEMPLATE_LITERALS = !eval("''").frozen? && RUBY_VERSION >= '2.1'
   # :nocov:
 
   begin
-    require 'cgi/escape'
+    require 'erb/escape'
     # :nocov:
-    unless CGI.respond_to?(:escapeHTML) # work around for JRuby 9.1
-      CGI = Object.new
-      CGI.extend(defined?(::CGI::Escape) ? ::CGI::Escape : ::CGI::Util)
-    end
+    define_singleton_method(:h, ERB::Escape.instance_method(:html_escape))
     # :nocov:
-    # Escape characters with their HTML/XML equivalents.
-    def self.h(value)
-      CGI.escapeHTML(value.to_s)
-    end
   rescue LoadError
-    # :nocov:
-    ESCAPE_TABLE = {'&' => '&amp;'.freeze, '<' => '&lt;'.freeze, '>' => 
'&gt;'.freeze, '"' => '&quot;'.freeze, "'" => '&#39;'.freeze}.freeze
-    if RUBY_VERSION >= '1.9'
-      def self.h(value)
-        value.to_s.gsub(/[&<>"']/, ESCAPE_TABLE)
+    begin
+      require 'cgi/escape'
+      # :nocov:
+      unless CGI.respond_to?(:escapeHTML) # work around for JRuby 9.1
+        CGI = Object.new
+        CGI.extend(defined?(::CGI::Escape) ? ::CGI::Escape : ::CGI::Util)
       end
-    else
+      # :nocov:
+      # Escape characters with their HTML/XML equivalents.
       def self.h(value)
-        value.to_s.gsub(/[&<>"']/){|s| ESCAPE_TABLE[s]}
+        CGI.escapeHTML(value.to_s)
       end
+    rescue LoadError
+      # :nocov:
+      ESCAPE_TABLE = {'&' => '&amp;'.freeze, '<' => '&lt;'.freeze, '>' => 
'&gt;'.freeze, '"' => '&quot;'.freeze, "'" => '&#39;'.freeze}.freeze
+      if RUBY_VERSION >= '1.9'
+        def self.h(value)
+          value.to_s.gsub(/[&<>"']/, ESCAPE_TABLE)
+        end
+      else
+        def self.h(value)
+          value.to_s.gsub(/[&<>"']/){|s| ESCAPE_TABLE[s]}
+        end
+      end
+      # :nocov:
     end
-    # :nocov:
   end
 
   class Engine
@@ -95,7 +103,7 @@
       preamble   = properties[:preamble] || "#{bufvar} = #{bufval};"
       postamble  = properties[:postamble] || "#{bufvar}.to_s\n"
       @chain_appends = properties[:chain_appends]
-      @text_end = if properties.fetch(:freeze_template_literals, RUBY_VERSION 
>= '2.1')
+      @text_end = if properties.fetch(:freeze_template_literals, 
FREEZE_TEMPLATE_LITERALS)
         "'.freeze"
       else
         "'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-08-02 17:40:35.000000000 +0200
+++ new/metadata        2022-12-22 20:28:09.000000000 +0100
@@ -1,15 +1,15 @@
 --- !ruby/object:Gem::Specification
 name: erubi
 version: !ruby/object:Gem::Version
-  version: 1.11.0
+  version: 1.12.0
 platform: ruby
 authors:
 - Jeremy Evans
 - kuwata-lab.com
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain: []
-date: 2022-08-02 00:00:00.000000000 Z
+date: 2022-12-22 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: minitest
@@ -59,9 +59,10 @@
 - MIT
 metadata:
   bug_tracker_uri: https://github.com/jeremyevans/erubi/issues
+  mailing_list_uri: https://github.com/jeremyevans/erubi/discussions
   changelog_uri: https://github.com/jeremyevans/erubi/blob/master/CHANGELOG
   source_code_uri: https://github.com/jeremyevans/erubi
-post_install_message: 
+post_install_message:
 rdoc_options:
 - "--quiet"
 - "--line-numbers"
@@ -83,8 +84,8 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.3.7
-signing_key: 
+rubygems_version: 3.3.26
+signing_key:
 specification_version: 4
 summary: Small ERB Implementation
 test_files: []

Reply via email to