Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-csv for openSUSE:Factory 
checked in at 2023-11-15 21:07:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-csv (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-csv.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-csv"

Wed Nov 15 21:07:32 2023 rev:2 rq:1126251 version:3.2.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-csv/rubygem-csv.changes  2022-10-12 
18:27:28.058056534 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-csv.new.17445/rubygem-csv.changes       
2023-11-15 21:08:32.520152029 +0100
@@ -1,0 +2,5 @@
+Tue Nov 14 14:54:32 UTC 2023 - Dan Čermák <[email protected]>
+
+- New upstream release 3.2.8, no changelog found
+
+-------------------------------------------------------------------

Old:
----
  csv-3.2.5.gem

New:
----
  csv-3.2.8.gem

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

Other differences:
------------------
++++++ rubygem-csv.spec ++++++
--- /var/tmp/diff_new_pack.6Xb1kU/_old  2023-11-15 21:08:33.960205161 +0100
+++ /var/tmp/diff_new_pack.6Xb1kU/_new  2023-11-15 21:08:33.964205309 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-csv
 #
-# 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-csv
-Version:        3.2.5
+Version:        3.2.8
 Release:        0
 %define mod_name csv
 %define mod_full_name %{mod_name}-%{version}
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  %{ruby >= 2.5.0}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{rubygem rdoc > 3.10}
@@ -38,7 +37,6 @@
 Source1:        gem2rpm.yml
 Summary:        CSV Reading and Writing
 License:        BSD-2-Clause AND Ruby
-Group:          Development/Languages/Ruby
 
 %description
 The CSV library provides a complete interface to CSV files and data. It offers

++++++ csv-3.2.5.gem -> csv-3.2.8.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/NEWS.md new/NEWS.md
--- old/NEWS.md 2022-08-26 07:49:41.000000000 +0200
+++ new/NEWS.md 2023-11-08 08:17:10.000000000 +0100
@@ -1,5 +1,96 @@
 # News
 
+## 3.2.8 - 2023-11-08
+
+### Improvements
+
+  * Added `CSV::InvalidEncodingError`.
+
+    Patch by Kosuke Shibata.
+
+    GH-287
+
+### Thanks
+
+  * Kosuke Shibata
+
+## 3.2.7 - 2023-06-26
+
+### Improvements
+
+  * Removed an unused internal variable.
+    [GH-273](https://github.com/ruby/csv/issues/273)
+    [Patch by Mau Magnaguagno]
+
+  * Changed to use `https://` instead of `http://` in documents.
+    [GH-274](https://github.com/ruby/csv/issues/274)
+    [Patch by Vivek Bharath Akupatni]
+
+  * Added prefix to a helper module in test.
+    [GH-278](https://github.com/ruby/csv/issues/278)
+    [Patch by Luke Gruber]
+
+  * Added a documentation for `liberal_parsing: {backslash_quotes: true}`.
+    [GH-280](https://github.com/ruby/csv/issues/280)
+    [Patch by Mark Schneider]
+
+### Fixes
+
+  * Fixed a wrong execution result in documents.
+    [GH-276](https://github.com/ruby/csv/issues/276)
+    [Patch by Yuki Tsujimoto]
+
+  * Fixed a bug that the same line is used multiple times.
+    [GH-279](https://github.com/ruby/csv/issues/279)
+    [Reported by Gabriel Nagy]
+
+### Thanks
+
+  * Mau Magnaguagno
+
+  * Vivek Bharath Akupatni
+
+  * Yuki Tsujimoto
+
+  * Luke Gruber
+
+  * Mark Schneider
+
+  * Gabriel Nagy
+
+## 3.2.6 - 2022-12-08
+
+### Improvements
+
+  * `CSV#read` consumes the same lines with other methods like
+    `CSV#shift`.
+    [[GitHub#258](https://github.com/ruby/csv/issues/258)]
+    [Reported by Lhoussaine Ghallou]
+
+  * All `Enumerable` based methods consume the same lines with other
+    methods. This may have a performance penalty.
+    [[GitHub#260](https://github.com/ruby/csv/issues/260)]
+    [Reported by Lhoussaine Ghallou]
+
+  * Simplify some implementations.
+    [[GitHub#262](https://github.com/ruby/csv/pull/262)]
+    [[GitHub#263](https://github.com/ruby/csv/pull/263)]
+    [Patch by Mau Magnaguagno]
+
+### Fixes
+
+  * Fixed `CSV.generate_lines` document.
+    [[GitHub#257](https://github.com/ruby/csv/pull/257)]
+    [Patch by Sampat Badhe]
+
+### Thanks
+
+  * Sampat Badhe
+
+  * Lhoussaine Ghallou
+
+  * Mau Magnaguagno
+
 ## 3.2.5 - 2022-08-26
 
 ### Improvements
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doc/csv/options/parsing/liberal_parsing.rdoc 
new/doc/csv/options/parsing/liberal_parsing.rdoc
--- old/doc/csv/options/parsing/liberal_parsing.rdoc    2022-08-26 
07:49:41.000000000 +0200
+++ new/doc/csv/options/parsing/liberal_parsing.rdoc    2023-11-08 
08:17:10.000000000 +0100
@@ -1,13 +1,13 @@
 ====== Option +liberal_parsing+
 
-Specifies the boolean value that determines whether
+Specifies the boolean or hash value that determines whether
 CSV will attempt to parse input not conformant with RFC 4180,
 such as double quotes in unquoted fields.
 
 Default value:
   CSV::DEFAULT_OPTIONS.fetch(:liberal_parsing) # => false
 
-For examples in this section:
+For the next two examples:
   str = 'is,this "three, or four",fields'
 
 Without +liberal_parsing+:
@@ -17,3 +17,22 @@
 With +liberal_parsing+:
   ary = CSV.parse_line(str, liberal_parsing: true)
   ary # => ["is", "this \"three", " or four\"", "fields"]
+
+Use the +backslash_quote+ sub-option to parse values that use
+a backslash to escape a double-quote character.  This
+causes the parser to treat <code>\"</code> as if it were
+<code>""</code>.
+
+For the next two examples:
+  str = 'Show,"Harry \"Handcuff\" Houdini, the one and only","Tampa Theater"'
+
+With +liberal_parsing+, but without the +backslash_quote+ sub-option:
+  # Incorrect interpretation of backslash; incorrectly interprets the quoted 
comma as a field separator.
+  ary = CSV.parse_line(str, liberal_parsing: true)
+  ary # => ["Show", "\"Harry \\\"Handcuff\\\" Houdini", " the one and only\"", 
"Tampa Theater"]
+  puts ary[1] # => "Harry \"Handcuff\" Houdini
+
+With +liberal_parsing+ and its +backslash_quote+ sub-option:
+  ary = CSV.parse_line(str, liberal_parsing: { backslash_quote: true })
+  ary # => ["Show", "Harry \"Handcuff\" Houdini, the one and only", "Tampa 
Theater"]
+  puts ary[1] # => Harry "Handcuff" Houdini, the one and only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/doc/csv/recipes/parsing.rdoc 
new/doc/csv/recipes/parsing.rdoc
--- old/doc/csv/recipes/parsing.rdoc    2022-08-26 07:49:41.000000000 +0200
+++ new/doc/csv/recipes/parsing.rdoc    2023-11-08 08:17:10.000000000 +0100
@@ -520,7 +520,7 @@
 To capture unconverted field values, use option +:unconverted_fields+:
   source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
   parsed = CSV.parse(source, converters: :integer, unconverted_fields: true)
-  parsed # => [["foo", "0"], ["bar", "1"], ["baz", "2"]]
+  parsed # => [["Name", "Value"], ["foo", 0], ["bar", 1], ["baz", 2]]
   parsed.each {|row| p row.unconverted_fields }
 Output:
   ["Name", "Value"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/csv/parser.rb new/lib/csv/parser.rb
--- old/lib/csv/parser.rb       2022-08-26 07:49:41.000000000 +0200
+++ new/lib/csv/parser.rb       2023-11-08 08:17:10.000000000 +0100
@@ -101,7 +101,7 @@
         position = @scanner.pos
         offset = 0
         n_row_separator_chars = row_separator.size
-        # trace(__method__, :start, line, input)
+        # trace(__method__, :start, input)
         while true
           input.each_line(row_separator) do |line|
             @scanner.pos += line.bytesize
@@ -157,6 +157,7 @@
         # trace(__method__, pattern, :done, :last, value) if @last_scanner
         return value if @last_scanner
 
+        # trace(__method__, pattern, :done, :nil) if value.nil?
         return nil if value.nil?
         while @scanner.eos? and read_chunk and (sub_value = 
@scanner.scan(pattern))
           # trace(__method__, pattern, :sub, sub_value)
@@ -200,7 +201,8 @@
           # trace(__method__, :rescan, start, buffer)
           string = @scanner.string
           if scanner == @scanner
-            keep = string.byteslice(start, string.bytesize - start)
+            keep = string.byteslice(start,
+                                    string.bytesize - @scanner.pos - start)
           else
             keep = string
           end
@@ -412,8 +414,7 @@
         else
           lineno = @lineno + 1
         end
-        message = "Invalid byte sequence in #{@encoding}"
-        raise MalformedCSVError.new(message, lineno)
+        raise InvalidEncodingError.new(@encoding, lineno)
       rescue UnexpectedError => error
         if @scanner
           ignore_broken_line
@@ -485,7 +486,6 @@
           message = ":quote_char has to be nil or a single character String"
           raise ArgumentError, message
         end
-        @double_quote_character = @quote_character * 2
         @escaped_quote_character = Regexp.escape(@quote_character)
         @escaped_quote = Regexp.new(@escaped_quote_character)
       end
@@ -875,8 +875,7 @@
               !line.valid_encoding?
             end
             if index
-              message = "Invalid byte sequence in #{@encoding}"
-              raise MalformedCSVError.new(message, @lineno + index + 1)
+              raise InvalidEncodingError.new(@encoding, @lineno + index + 1)
             end
           end
           Scanner.new(string)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/csv/row.rb new/lib/csv/row.rb
--- old/lib/csv/row.rb  2022-08-26 07:49:41.000000000 +0200
+++ new/lib/csv/row.rb  2023-11-08 08:17:10.000000000 +0100
@@ -703,7 +703,7 @@
     # by +index_or_header+ and +specifiers+.
     #
     # The nested objects may be instances of various classes.
-    # See {Dig 
Methods}[https://docs.ruby-lang.org/en/master/dig_methods_rdoc.html].
+    # See {Dig Methods}[rdoc-ref:dig_methods.rdoc].
     #
     # Examples:
     #   source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/csv/table.rb new/lib/csv/table.rb
--- old/lib/csv/table.rb        2022-08-26 07:49:41.000000000 +0200
+++ new/lib/csv/table.rb        2023-11-08 08:17:10.000000000 +0100
@@ -890,9 +890,8 @@
       if @mode == :row or @mode == :col_or_row  # by index
         @table.delete_if(&block)
       else                                      # by header
-        deleted = []
         headers.each do |header|
-          deleted << delete(header) if yield([header, self[header]])
+          delete(header) if yield([header, self[header]])
         end
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/csv/version.rb new/lib/csv/version.rb
--- old/lib/csv/version.rb      2022-08-26 07:49:41.000000000 +0200
+++ new/lib/csv/version.rb      2023-11-08 08:17:10.000000000 +0100
@@ -2,5 +2,5 @@
 
 class CSV
   # The version of the installed library.
-  VERSION = "3.2.5"
+  VERSION = "3.2.8"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/csv.rb new/lib/csv.rb
--- old/lib/csv.rb      2022-08-26 07:49:41.000000000 +0200
+++ new/lib/csv.rb      2023-11-08 08:17:10.000000000 +0100
@@ -70,7 +70,7 @@
 # == What is CSV, really?
 #
 # CSV maintains a pretty strict definition of CSV taken directly from
-# {the RFC}[http://www.ietf.org/rfc/rfc4180.txt]. I relax the rules in only one
+# {the RFC}[https://www.ietf.org/rfc/rfc4180.txt]. I relax the rules in only 
one
 # place and that is to make using this library easier. CSV will parse all valid
 # CSV.
 #
@@ -102,14 +102,6 @@
 
 # == \CSV
 #
-# === In a Hurry?
-#
-# If you are familiar with \CSV data and have a particular task in mind,
-# you may want to go directly to the:
-# - {Recipes for CSV}[doc/csv/recipes/recipes_rdoc.html].
-#
-# Otherwise, read on here, about the API: classes, methods, and constants.
-#
 # === \CSV Data
 #
 # \CSV (comma-separated values) data is a text representation of a table:
@@ -854,6 +846,15 @@
     end
   end
 
+  # The error thrown when the parser encounters invalid encoding in CSV.
+  class InvalidEncodingError < MalformedCSVError
+    attr_reader :encoding
+    def initialize(encoding, line_number)
+      @encoding = encoding
+      super("Invalid byte sequence in #{encoding}", line_number)
+    end
+  end
+
   #
   # A FieldInfo Struct contains details about a field's position in the data
   # source it was read from.  CSV will pass this Struct to some blocks that 
make
@@ -1005,7 +1006,7 @@
     def instance(data = $stdout, **options)
       # create a _signature_ for this method call, data object and options
       sig = [data.object_id] +
-            options.values_at(*DEFAULT_OPTIONS.keys.sort_by { |sym| sym.to_s })
+            options.values_at(*DEFAULT_OPTIONS.keys)
 
       # fetch or create the instance for this signature
       @@instances ||= Hash.new
@@ -1144,7 +1145,7 @@
     #   File.read('t.csv') # => "Name,Value\nFOO,0\nBAR,-1\nBAZ,-2\n"
     #
     # When neither +in_string_or_io+ nor +out_string_or_io+ given,
-    # parses from {ARGF}[https://docs.ruby-lang.org/en/master/ARGF.html]
+    # parses from {ARGF}[rdoc-ref:ARGF]
     # and generates to STDOUT.
     #
     # Without headers:
@@ -1202,7 +1203,7 @@
       # parse options for input, output, or both
       in_options, out_options = Hash.new, {row_sep: InputRecordSeparator.value}
       options.each do |key, value|
-        case key.to_s
+        case key
         when /\Ain(?:put)?_(.+)\Z/
           in_options[$1.to_sym] = value
         when /\Aout(?:put)?_(.+)\Z/
@@ -1314,8 +1315,8 @@
     #
     # Arguments:
     # * Argument +path_or_io+ must be a file path or an \IO stream.
-    # * Argument +mode+, if given, must be a \File mode
-    #   See {Open 
Mode}[https://ruby-doc.org/core/IO.html#method-c-new-label-Open+Mode].
+    # * Argument +mode+, if given, must be a \File mode.
+    #   See {Access 
Modes}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Access+Modes].
     # * Arguments <tt>**options</tt> must be keyword options.
     #   See {Options for Parsing}[#class-CSV-label-Options+for+Parsing].
     # * This method optionally accepts an additional <tt>:encoding</tt> option
@@ -1489,12 +1490,12 @@
     # ---
     #
     # Returns the \String generated from an
-    #   CSV.generate_lines(['foo', '0'], ['bar', '1'], ['baz', '2']) # => 
"foo,0\nbar,1\nbaz.2\n"
+    #   CSV.generate_lines([['foo', '0'], ['bar', '1'], ['baz', '2']]) # => 
"foo,0\nbar,1\nbaz,2\n"
     #
     # ---
     #
     # Raises an exception
-    #   # Raises NoMethodError (undefined method `find' for :foo:Symbol)
+    #   # Raises NoMethodError (undefined method `each' for :foo:Symbol)
     #   CSV.generate_lines(:foo)
     #
     def generate_lines(rows, **options)
@@ -1521,8 +1522,8 @@
     #
     # * Argument +path+, if given, must be the path to a file.
     # :include: ../doc/csv/arguments/io.rdoc
-    # * Argument +mode+, if given, must be a \File mode
-    #   See {Open Mode}[IO.html#method-c-new-label-Open+Mode].
+    # * Argument +mode+, if given, must be a \File mode.
+    #   See {Access 
Modes}[https://docs.ruby-lang.org/en/master/File.html#class-File-label-Access+Modes].
     # * Arguments <tt>**options</tt> must be keyword options.
     #   See {Options for Generating}[#class-CSV-label-Options+for+Generating].
     # * This method optionally accepts an additional <tt>:encoding</tt> option
@@ -2551,7 +2552,13 @@
   #     p row
   #   end
   def each(&block)
-    parser_enumerator.each(&block)
+    return to_enum(__method__) unless block_given?
+    begin
+      while true
+        yield(parser_enumerator.next)
+      end
+    rescue StopIteration
+    end
   end
 
   # :call-seq:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2022-08-26 07:49:41.000000000 +0200
+++ new/metadata        2023-11-08 08:17:10.000000000 +0100
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: csv
 version: !ruby/object:Gem::Version
-  version: 3.2.5
+  version: 3.2.8
 platform: ruby
 authors:
 - James Edward Gray II
@@ -9,7 +9,7 @@
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2022-08-26 00:00:00.000000000 Z
+date: 2023-11-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: bundler
@@ -145,7 +145,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.4.0.dev
+rubygems_version: 3.5.0.dev
 signing_key:
 specification_version: 4
 summary: CSV Reading and Writing

Reply via email to