Hello community,

here is the log from the commit of package yast2-ruby-bindings for 
openSUSE:Factory checked in at 2014-07-27 08:24:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-ruby-bindings (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-ruby-bindings"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-ruby-bindings/yast2-ruby-bindings.changes  
2014-06-18 10:59:32.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 
    2014-07-27 08:25:16.000000000 +0200
@@ -1,0 +2,13 @@
+Wed Jul 23 17:18:58 CEST 2014 - [email protected]
+
+- Builtins.mapmap newly only accepts Hash, otherwise raises
+  a TypeError (bnc#888585)
+- 3.1.22
+
+-------------------------------------------------------------------
+Mon Jul  7 09:31:40 UTC 2014 - [email protected]
+
+- switch to rubygem() based requires so we can easily pass the
+  preferred ruby version using rb_default_ruby_abi
+
+-------------------------------------------------------------------

Old:
----
  yast2-ruby-bindings-3.1.21.tar.bz2

New:
----
  yast2-ruby-bindings-3.1.22.tar.bz2

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

Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.YfmqoE/_old  2014-07-27 08:25:16.000000000 +0200
+++ /var/tmp/diff_new_pack.YfmqoE/_new  2014-07-27 08:25:16.000000000 +0200
@@ -17,8 +17,9 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.21
+Version:        3.1.22
 Release:        0
+Url:            https://github.com/yast/yast-ruby-bindings
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ruby-bindings-%{version}.tar.bz2
 Prefix:         /usr
@@ -29,9 +30,15 @@
 BuildRequires:  yast2-devtools >= 3.1.10
 # libzypp-devel is missing .la requires
 BuildRequires:  ruby-devel
+%if 0%{?suse_version} == 1315
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:fast_gettext)
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
+Requires:       rubygem(%{rb_default_ruby_abi}:fast_gettext)
+%else
 BuildRequires:  rubygem-fast_gettext
 BuildRequires:  rubygem-rspec
 Requires:       rubygem-fast_gettext
+%endif
 Requires:       yast2-core >= 2.24.0
 BuildRequires:  yast2-core-devel >= 2.24.0
 Requires:       yast2-ycp-ui-bindings       >= 2.21.9

++++++ yast2-ruby-bindings-3.1.21.tar.bz2 -> yast2-ruby-bindings-3.1.22.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.changes 
new/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.changes  
2014-06-10 15:51:27.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.changes  
2014-07-25 15:56:08.000000000 +0200
@@ -1,4 +1,17 @@
 -------------------------------------------------------------------
+Wed Jul 23 17:18:58 CEST 2014 - [email protected]
+
+- Builtins.mapmap newly only accepts Hash, otherwise raises
+  a TypeError (bnc#888585)
+- 3.1.22
+
+-------------------------------------------------------------------
+Mon Jul  7 09:31:40 UTC 2014 - [email protected]
+
+- switch to rubygem() based requires so we can easily pass the
+  preferred ruby version using rb_default_ruby_abi
+
+-------------------------------------------------------------------
 Tue Jun 10 12:41:14 UTC 2014 - [email protected]
 
 - fix comparison of float and integer (bnc#865037)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.spec 
new/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.spec     
2014-06-10 15:51:27.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.spec     
2014-07-25 15:56:08.000000000 +0200
@@ -17,7 +17,8 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.21
+Version:        3.1.22
+Url:            https://github.com/yast/yast-ruby-bindings
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ruby-bindings-%{version}.tar.bz2
@@ -29,9 +30,15 @@
 BuildRequires:  yast2-devtools >= 3.1.10
 # libzypp-devel is missing .la requires
 BuildRequires:  ruby-devel
+%if 0%{?suse_version} == 1315
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:fast_gettext)
+BuildRequires:  rubygem(%{rb_default_ruby_abi}:rspec)
+Requires:       rubygem(%{rb_default_ruby_abi}:fast_gettext)
+%else
 BuildRequires:  rubygem-fast_gettext
 BuildRequires:  rubygem-rspec
 Requires:       rubygem-fast_gettext
+%endif
 Requires:       yast2-core >= 2.24.0
 BuildRequires:  yast2-core-devel >= 2.24.0
 Requires:       yast2-ycp-ui-bindings       >= 2.21.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.21/src/binary/Builtin.cc 
new/yast2-ruby-bindings-3.1.22/src/binary/Builtin.cc
--- old/yast2-ruby-bindings-3.1.21/src/binary/Builtin.cc        2014-06-10 
15:51:27.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.22/src/binary/Builtin.cc        2014-07-25 
15:56:08.000000000 +0200
@@ -446,6 +446,7 @@
       return reg_ret;
   }
 
+  // documented in builtins.rb
   static VALUE regexpmatch(VALUE o, VALUE i, VALUE p)
   {
     if (NIL_P(i) || NIL_P(p))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.21/src/ruby/yast/builtins.rb 
new/yast2-ruby-bindings-3.1.22/src/ruby/yast/builtins.rb
--- old/yast2-ruby-bindings-3.1.21/src/ruby/yast/builtins.rb    2014-06-10 
15:51:27.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.22/src/ruby/yast/builtins.rb    2014-07-25 
15:56:08.000000000 +0200
@@ -507,6 +507,9 @@
     # @deprecated use ruby native methods for creating new Hash from other Hash
     def self.mapmap map, &block
       return nil if map.nil?
+      unless map.is_a?(Hash)
+        raise TypeError, "expected a Hash, got a #{map.class}"
+      end
 
       map = Yast::deep_copy(map)
       res = ::Hash.new
@@ -948,6 +951,44 @@
     end
 
     ###########################################################
+    # Documentation of methods implemented in C is here
+    # because I could not figure out how to make yard parse it there.
+
+    # @method self.regexpmatch(string, pattern)
+    #
+    # @param string [String] a string to search
+    # @param pattern [String] a regex in the C(!) syntax
+    # @return [Boolean, nil] does *string* match *pattern*
+    # @deprecated use string =~ pattern
+    #
+    # Searches a string for a POSIX Extended Regular Expression match.
+    #
+    # If *string* or *pattern* is `nil`, or
+    # if pattern is an invalid regex, `nil` is returned.
+    #
+    # **Replacement**
+    #
+    # Notably `^` and `$` match the ends of the entire string,
+    # not each line like in Regexp. Use /\A/ and /\z/
+    # (There is also /\Z/ which matches before a final newline.)
+    #
+    # The dot `.` does match a newline. Use `/pattern/m`.
+    #
+    # To match a literal dot, replace a double backslash `"\\."`
+    # with a single backslash `/\./`
+    #
+    # Literal brackets inside character classes need a backslash
+    # (gh#yast/yast-ruby-bindings#10)
+    #
+    # Unfortunately regexp dialects are full of subtle differences
+    # like this. See  http://www.regular-expressions.info/refflavors.html
+    # and do test.
+    #
+    # **Idiomatic Replacement**
+    #
+    # In a condition, use `string =~ pattern` which returns integer or nil.
+
+    ###########################################################
     # Yast Term Builtins
     ###########################################################
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.21/tests/ruby/builtins_spec.rb 
new/yast2-ruby-bindings-3.1.22/tests/ruby/builtins_spec.rb
--- old/yast2-ruby-bindings-3.1.21/tests/ruby/builtins_spec.rb  2014-06-10 
15:51:28.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.22/tests/ruby/builtins_spec.rb  2014-07-25 
15:56:08.000000000 +0200
@@ -718,6 +718,15 @@
   it "tests mapmap" do
     expect(Yast::Builtins.listmap(nil) {|k,v| next {v => k}}).to eq(nil)
 
+    # bnc#888585: Incorrect input class raises TypeError
+    # Only Hash/nil is allowed
+    expect{Yast::Builtins.mapmap(false) {|k,v| {v => k}}}.to 
raise_error(TypeError)
+    expect{Yast::Builtins.mapmap(['Array']) {|k,v| {v => k}}}.to 
raise_error(TypeError)
+    expect{Yast::Builtins.mapmap('String') {|k,v| {v => k}}}.to 
raise_error(TypeError)
+    expect{Yast::Builtins.mapmap(32) {|k,v| {v => k}}}.to 
raise_error(TypeError)
+
+    expect(Yast::Builtins.mapmap(nil) {|k,v| {v => k}}).to eq(nil)
+
     expect(Yast::Builtins.mapmap({2=>1,4=>3}) {|k,v| next {v => k}}).to 
eq(Hash[1=>2,3=>4])
 
     res = Yast::Builtins.mapmap({2=>1,4=>3}) do |k,v|

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to