Hello community, here is the log from the commit of package rubygem-erubi for openSUSE:Factory checked in at 2018-03-09 10:44:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-erubi (Old) and /work/SRC/openSUSE:Factory/.rubygem-erubi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-erubi" Fri Mar 9 10:44:24 2018 rev:3 rq:584186 version:1.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-erubi/rubygem-erubi.changes 2017-12-07 13:51:18.718789805 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-erubi.new/rubygem-erubi.changes 2018-03-09 10:44:26.071349362 +0100 @@ -1,0 +2,10 @@ +Tue Mar 6 05:29:49 UTC 2018 - [email protected] + +- updated to version 1.7.1 + see installed CHANGELOG + + === 1.7.1 (2018-03-05) + + * Make whitespace handling for <%# %> tags more compatible with Erubis (jeremyevans) (#14) + +------------------------------------------------------------------- Old: ---- erubi-1.7.0.gem New: ---- erubi-1.7.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-erubi.spec ++++++ --- /var/tmp/diff_new_pack.FIStO7/_old 2018-03-09 10:44:26.687327176 +0100 +++ /var/tmp/diff_new_pack.FIStO7/_new 2018-03-09 10:44:26.691327032 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-erubi # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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.7.0 +Version: 1.7.1 Release: 0 %define mod_name erubi %define mod_full_name %{mod_name}-%{version} ++++++ erubi-1.7.0.gem -> erubi-1.7.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 2017-10-09 17:00:55.000000000 +0200 +++ new/CHANGELOG 2018-03-05 23:12:53.000000000 +0100 @@ -1,3 +1,7 @@ +=== 1.7.1 (2018-03-05) + +* Make whitespace handling for <%# %> tags more compatible with Erubis (jeremyevans) (#14) + === 1.7.0 (2017-10-09) * Fix escaping in erubi/capture_end, the setting was previously inverted (jeremyevans) (#10) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE --- old/MIT-LICENSE 2017-10-09 17:00:55.000000000 +0200 +++ new/MIT-LICENSE 2018-03-05 23:12:53.000000000 +0100 @@ -1,5 +1,5 @@ copyright(c) 2006-2011 kuwata-lab.com all rights reserved. -copyright(c) 2016-2017 Jeremy Evans +copyright(c) 2016-2018 Jeremy Evans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.rdoc new/README.rdoc --- old/README.rdoc 2017-10-09 17:00:55.000000000 +0200 +++ new/README.rdoc 2018-03-05 23:12:53.000000000 +0100 @@ -13,7 +13,6 @@ * 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) -* Has an open development model (Erubis doesn't have a public source control repository or bug tracker) * Is not dead (Erubis hasn't been updated since 2011) It is not designed with Erubis API compatibility in mind, though most Erubis @@ -37,9 +36,8 @@ require 'erubi' eval(Erubi::Engine.new(File.read('filename.erb')).src) -Most users are will probably use Erubi via Rails or Tilt. Erubi is the default -erb template handler in Tilt 2.0.6+ and will be the default template handler in -Rails 5.1+. +Most users will probably use Erubi via Rails or Tilt. Erubi is the default +erb template handler in Tilt 2.0.6+ and Rails 5.1+. == Capturing 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 2017-10-09 17:00:55.000000000 +0200 +++ new/lib/erubi.rb 2018-03-05 23:12:53.000000000 +0100 @@ -1,7 +1,7 @@ # frozen_string_literal: true module Erubi - VERSION = '1.7.0' + VERSION = '1.7.1' RANGE_ALL = 0..-1 if RUBY_VERSION >= '1.9' @@ -123,7 +123,7 @@ end end - is_bol = rspace ? true : false + is_bol = rspace add_text(text) if text && !text.empty? case ch when '=' @@ -133,7 +133,7 @@ add_text(rspace) if rspace when '#' n = code.count("\n") + (rspace ? 1 : 0) - if trim + if trim && lspace && rspace add_code("\n" * n) else add_text(lspace) if lspace diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-10-09 17:00:55.000000000 +0200 +++ new/metadata 2018-03-05 23:12:53.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: erubi version: !ruby/object:Gem::Version - version: 1.7.0 + version: 1.7.1 platform: ruby authors: - Jeremy Evans @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2017-10-09 00:00:00.000000000 Z +date: 2018-03-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: minitest @@ -68,7 +68,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.13 +rubygems_version: 2.7.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 2017-10-09 17:00:55.000000000 +0200 +++ new/test/test.rb 2018-03-05 23:12:53.000000000 +0100 @@ -119,6 +119,67 @@ END3 end + it "should strip only whitespace for <%, <%- and <%# tags" do + check_output(<<END1, <<END2, <<END3){} + <% 1 %> +a + <%- 2 %> +b + <%# 3 %> +c + /<% 1 %> +a +/ <%- 2 %> +b +//<%# 3 %> +c + <% 1 %> / +a + <%- 2 %>/ +b + <%# 3 %>// +c +END1 +_buf = String.new; 1 + _buf << 'a +'; 2 + _buf << 'b +'; + _buf << 'c + /'; 1 ; _buf << ' +'; _buf << 'a +/ '; 2 ; _buf << ' +'; _buf << 'b +//'; + _buf << ' +'; _buf << 'c +'; _buf << ' '; 1 ; _buf << ' / +a +'; _buf << ' '; 2 ; _buf << '/ +b +'; _buf << ' ';; _buf << '// +c +'; +_buf.to_s +END2 +a +b +c + / +a +/ +b +// +c + / +a + / +b + // +c +END3 + end + it "should handle ensure option" do list = ['&\'<>"2'] @options[:ensure] = true
