Hello community, here is the log from the commit of package rubygem-diffy for openSUSE:Factory checked in at 2020-09-27 11:50:16 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-diffy (Old) and /work/SRC/openSUSE:Factory/.rubygem-diffy.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-diffy" Sun Sep 27 11:50:16 2020 rev:6 rq:837811 version:3.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-diffy/rubygem-diffy.changes 2019-01-21 10:53:50.667765553 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-diffy.new.4249/rubygem-diffy.changes 2020-09-27 11:50:16.796075989 +0200 @@ -1,0 +2,7 @@ +Fri Sep 25 13:51:36 UTC 2020 - Stephan Kulow <[email protected]> + +updated to version 3.4.0 + see installed CHANGELOG + + +------------------------------------------------------------------- Old: ---- diffy-3.3.0.gem New: ---- diffy-3.4.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-diffy.spec ++++++ --- /var/tmp/diff_new_pack.yHsClH/_old 2020-09-27 11:50:17.392076631 +0200 +++ /var/tmp/diff_new_pack.yHsClH/_new 2020-09-27 11:50:17.396076635 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-diffy # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 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-diffy -Version: 3.3.0 +Version: 3.4.0 Release: 0 %define mod_name diffy %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 -Url: http://github.com/samg/diffy +URL: http://github.com/samg/diffy Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: A convenient way to diff string in ruby ++++++ diffy-3.3.0.gem -> diffy-3.4.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-12-30 06:04:12.000000000 +0100 +++ new/README.md 2020-08-07 18:27:59.000000000 +0200 @@ -277,6 +277,15 @@ foo bar +### `:ignore_crlf` when doing HTML compares + +You can make the HTML output ignore the CRLF by passing the `:ignore_crlf` option a truthy value. + + >> puts Diffy::Diff.new(" foo\nbar\n", "foo\r\nbar\r\n", ignore_crlf: true).to_s(:html) + "<div class=\"diff\"></div>" + + + Default Diff Options -------------------- Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/diffy/diff.rb new/lib/diffy/diff.rb --- old/lib/diffy/diff.rb 2018-12-30 06:04:12.000000000 +0100 +++ new/lib/diffy/diff.rb 2020-08-07 18:27:59.000000000 +0200 @@ -174,7 +174,7 @@ # options pass to diff program def diff_options - Array(options[:context] ? "-U #{options[:context]}" : options[:diff]) + Array(options[:context] ? "-U#{options[:context]}" : options[:diff]) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/diffy/html_formatter.rb new/lib/diffy/html_formatter.rb --- old/lib/diffy/html_formatter.rb 2018-12-30 06:04:12.000000000 +0100 +++ new/lib/diffy/html_formatter.rb 2020-08-07 18:27:59.000000000 +0200 @@ -90,10 +90,14 @@ def split_characters(chunk) chunk.gsub(/^./, '').each_line.map do |line| - chars = line.sub(/([\r\n]$)/, '').split('') - # add escaped newlines - chars << '\n' - chars.map{|chr| ERB::Util.h(chr) } + if @options[:ignore_crlf] + (line.chomp.split('') + ['\n']).map{|chr| ERB::Util.h(chr) } + else + chars = line.sub(/([\r\n]$)/, '').split('') + # add escaped newlines + chars << '\n' + chars.map{|chr| ERB::Util.h(chr) } + end end.flatten.join("\n") + "\n" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/diffy/version.rb new/lib/diffy/version.rb --- old/lib/diffy/version.rb 2018-12-30 06:04:12.000000000 +0100 +++ new/lib/diffy/version.rb 2020-08-07 18:27:59.000000000 +0200 @@ -1,3 +1,3 @@ module Diffy - VERSION = '3.3.0' + VERSION = '3.4.0' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-12-30 06:04:12.000000000 +0100 +++ new/metadata 2020-08-07 18:27:59.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: diffy version: !ruby/object:Gem::Version - version: 3.3.0 + version: 3.4.0 platform: ruby authors: - Sam Goldstein -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2018-12-30 00:00:00.000000000 Z +date: 2020-08-07 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -68,7 +68,7 @@ licenses: - MIT metadata: {} -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -83,9 +83,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.6.11 -signing_key: +rubygems_version: 3.0.6 +signing_key: specification_version: 4 summary: A convenient way to diff string in ruby test_files: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/diffy_spec.rb new/spec/diffy_spec.rb --- old/spec/diffy_spec.rb 2018-12-30 06:04:12.000000000 +0100 +++ new/spec/diffy_spec.rb 2020-08-07 18:27:59.000000000 +0200 @@ -503,6 +503,13 @@ expect(@diff.to_s(:html)).to eq(html) end + it "should treat unix vs windows newlines as same if option :ignore_crlf" do + @diff = Diffy::Diff.new("one\ntwo\nthree\n", "one\r\ntwo\r\nthree\r\n", + ignore_crlf: true) + empty_diff = "<div class=\"diff\"></div>" + expect(@diff.to_s(:html)).to eq(empty_diff) + end + describe 'with lines that include \n' do before do string1 = 'a\nb'"\n"
