Hello community,
here is the log from the commit of package yast2-ruby-bindings for
openSUSE:Factory checked in at 2016-10-18 13:26:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2016-09-20 13:18:28.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes
2016-10-18 13:26:06.000000000 +0200
@@ -1,0 +2,7 @@
+Thu Oct 13 08:55:07 UTC 2016 - [email protected]
+
+- properly document usage of CallFunction and have useful error
+ when misused (bsc#889980)
+- 3.2.0
+
+-------------------------------------------------------------------
Old:
----
yast2-ruby-bindings-3.1.51.tar.bz2
New:
----
yast2-ruby-bindings-3.2.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.oq2DMm/_old 2016-10-18 13:26:07.000000000 +0200
+++ /var/tmp/diff_new_pack.oq2DMm/_new 2016-10-18 13:26:07.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.51
+Version: 3.2.0
Release: 0
Url: https://github.com/yast/yast-ruby-bindings
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-ruby-bindings-3.1.51.tar.bz2 -> yast2-ruby-bindings-3.2.0.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-3.1.51/package/yast2-ruby-bindings.changes
new/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.51/package/yast2-ruby-bindings.changes
2016-09-16 14:02:43.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.changes
2016-10-13 11:19:46.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Thu Oct 13 08:55:07 UTC 2016 - [email protected]
+
+- properly document usage of CallFunction and have useful error
+ when misused (bsc#889980)
+- 3.2.0
+
+-------------------------------------------------------------------
Fri Sep 16 10:28:16 UTC 2016 - [email protected]
- Rescue "invalid byte sequence in UTF-8", with a custom message
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-ruby-bindings-3.1.51/package/yast2-ruby-bindings.spec
new/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.51/package/yast2-ruby-bindings.spec
2016-09-16 14:02:43.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.0/package/yast2-ruby-bindings.spec
2016-10-13 11:19:46.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.51
+Version: 3.2.0
Url: https://github.com/yast/yast-ruby-bindings
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.51/src/ruby/yast/wfm.rb
new/yast2-ruby-bindings-3.2.0/src/ruby/yast/wfm.rb
--- old/yast2-ruby-bindings-3.1.51/src/ruby/yast/wfm.rb 2016-09-16
14:02:43.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.0/src/ruby/yast/wfm.rb 2016-10-13
11:19:46.000000000 +0200
@@ -160,24 +160,30 @@
call_builtin_wrapper("Write", path, *args)
end
- # @deprecated use {CallFunction}
- def self.call(*args)
- call_builtin_wrapper("call", *args)
- end
-
# calls client of given name with passed args
#
# @param client[String] name of client to run without suffix
- # @param args additional args passed to client, that can be obtained with
+ # @param args[Array] additional args passed to client, that can be
obtained with
# {WFM.Args}
# @return response from client
#
# @example call inst_moust client living in $Y2DIR/clients/inst_mouse.rb
with parameter true
- # Yast::WFM.CallFunction("inst_mouse", true)
- def self.CallFunction(client, *args)
- call_builtin_wrapper("CallFunction", client, *args)
+ # Yast::WFM.CallFunction("inst_mouse", [true])
+ def self.CallFunction(client, args = [])
+ if !client.is_a?(::String)
+ raise ArgumentError, "CallFunction first
parameter('#{client.inspect}') have to be String."
+ end
+ if !args.is_a?(::Array)
+ raise ArgumentError, "CallFunction second parameter('#{args.inspect}')
have to be Array."
+ end
+
+ call_builtin_wrapper("CallFunction", client, args)
end
+ # @!method call(client, arguments = [])
+ # @deprecated use {CallFunction}
+ singleton_class.send(:alias_method, :call, :CallFunction)
+
# @private wrapper to C code
def self.call_builtin_wrapper(*args)
# caller(1) is one of the functions above
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.51/tests/ruby/wfm_spec.rb
new/yast2-ruby-bindings-3.2.0/tests/ruby/wfm_spec.rb
--- old/yast2-ruby-bindings-3.1.51/tests/ruby/wfm_spec.rb 2016-09-16
14:02:43.000000000 +0200
+++ new/yast2-ruby-bindings-3.2.0/tests/ruby/wfm_spec.rb 2016-10-13
11:19:46.000000000 +0200
@@ -28,6 +28,20 @@
stdout_stderr = `ruby -e "#{script}" 2>&1`
expect(stdout_stderr).to eq ""
end
+
+ it "raises error if first parameter is not string" do
+ expect { WFM.CallFunction(:test_client) }.to raise_error(ArgumentError)
+ end
+
+ it "raises error if second parameter is not array" do
+ expect { WFM.CallFunction("test_client", nil) }.to
raise_error(ArgumentError)
+ end
+ end
+
+ describe ".call" do
+ it "is aliased to CallFunction" do
+ expect(WFM.call("test_client")).to eq 15
+ end
end
describe ".scr_chrooted?" do