Hello community,

here is the log from the commit of package yast2-ruby-bindings for 
openSUSE:Factory checked in at 2014-02-21 13:48:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-02-06 07:01:58.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 
    2014-02-21 13:48:19.000000000 +0100
@@ -1,0 +2,12 @@
+Mon Feb 17 10:34:13 UTC 2014 - [email protected]
+
+- fix stack level too deep (BNC#864056,BNC#864180)
+- 3.1.10
+
+-------------------------------------------------------------------
+Mon Feb 10 13:43:23 UTC 2014 - [email protected]
+
+- Do not unload clients after execution (BNC#861529)
+- 3.1.9
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.6RBgeF/_old  2014-02-21 13:48:20.000000000 +0100
+++ /var/tmp/diff_new_pack.6RBgeF/_new  2014-02-21 13:48:20.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.8
+Version:        3.1.10
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ruby-bindings-%{version}.tar.bz2

++++++ yast2-ruby-bindings-3.1.8.tar.bz2 -> yast2-ruby-bindings-3.1.10.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/package/yast2-ruby-bindings.changes 
new/yast2-ruby-bindings-3.1.10/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.8/package/yast2-ruby-bindings.changes   
2014-02-05 15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/package/yast2-ruby-bindings.changes  
2014-02-19 13:30:29.000000000 +0100
@@ -1,4 +1,16 @@
 -------------------------------------------------------------------
+Mon Feb 17 10:34:13 UTC 2014 - [email protected]
+
+- fix stack level too deep (BNC#864056,BNC#864180)
+- 3.1.10
+
+-------------------------------------------------------------------
+Mon Feb 10 13:43:23 UTC 2014 - [email protected]
+
+- Do not unload clients after execution (BNC#861529)
+- 3.1.9
+
+-------------------------------------------------------------------
 Wed Feb  5 14:20:37 UTC 2014 - [email protected]
 
 - Builtins.y2milestone(),... marked as deprecated, use Yast::Logger
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/package/yast2-ruby-bindings.spec 
new/yast2-ruby-bindings-3.1.10/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.8/package/yast2-ruby-bindings.spec      
2014-02-05 15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/package/yast2-ruby-bindings.spec     
2014-02-19 13:30:29.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.8
+Version:        3.1.10
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source0:        yast2-ruby-bindings-%{version}.tar.bz2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/src/binary/Builtin.cc 
new/yast2-ruby-bindings-3.1.10/src/binary/Builtin.cc
--- old/yast2-ruby-bindings-3.1.8/src/binary/Builtin.cc 2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/src/binary/Builtin.cc        2014-02-19 
13:30:29.000000000 +0100
@@ -31,7 +31,6 @@
 #include "Y2YCPTypeConv.h"
 #include "Y2RubyTypeConv.h"
 #include "RubyLogger.h"
-#include "YRuby.h"
 #include "Y2RubyUtils.h"
 
 static VALUE rb_mSCR;
@@ -49,7 +48,6 @@
 
   static VALUE call_builtin(const string &qualified_name, int argc, VALUE 
*argv)
   {
-    YRuby::yRuby();
     extern StaticDeclaration static_declarations;
     YaST::ee.setFilename(RSTRING_PTR(argv[0]));
     YaST::ee.setLinenumber(FIX2INT(argv[1]));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/src/ruby/yast/wfm.rb 
new/yast2-ruby-bindings-3.1.10/src/ruby/yast/wfm.rb
--- old/yast2-ruby-bindings-3.1.8/src/ruby/yast/wfm.rb  2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/src/ruby/yast/wfm.rb 2014-02-19 
13:30:29.000000000 +0100
@@ -207,21 +207,6 @@
           )
         end
         return false
-      ensure
-        # unload the client class to ensure that the includes will be
-        # fully initialized when running it next time
-        # (Yast.include skips initialize_<include> calls when the include
-        # module is already present in the target class)
-        client_without_suffix = File.basename(client).sub(/\.rb$/, "")
-        client_name = (client_without_suffix.
-          gsub(/^./)     { |s| s.upcase }.
-          gsub(/[-_.]./) { |s| s[1].upcase } +
-          "Client").to_sym
-
-        if Yast.constants.include?(client_name)
-          Yast.y2debug "Unloading client class #{client_name}"
-          Yast.send(:remove_const, client_name)
-        end
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/src/ruby/yast/yast.rb 
new/yast2-ruby-bindings-3.1.10/src/ruby/yast/yast.rb
--- old/yast2-ruby-bindings-3.1.8/src/ruby/yast/yast.rb 2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/src/ruby/yast/yast.rb        2014-02-19 
13:30:29.000000000 +0100
@@ -111,13 +111,29 @@
 
     mod = Yast.const_get module_name
 
-    return if target.class.include? mod
-
-    target.class.send(:include, mod)
-
-    method_name = "initialize_" + path_without_suffix.gsub(/[-.\/]/, "_")
-
-    target.send method_name.to_sym, target if target.respond_to? 
method_name.to_sym
+    # if never included, then include
+    if !target.class.include? mod
+      target.class.send(:include, mod)
+    end
+
+    encoded_name = path_without_suffix.gsub(/[-.\/]/, "_")
+    initialized_variable = "@" + encoded_name + "initialized"
+    method_name = "initialize_" + encoded_name
+
+    # tricky condition. Here collide two yast features that had old ycp
+    # 1) in clients reapeated call results in new client object, but client 
base class
+    #    is already defined, so not needed to include again, but it's
+    #    needed to be reinitialized, so we need to call initialization method
+    #    even if module is already included
+    # 2) if there is multi include, then only first one must call 
initialization
+    #    because other calls are ignored
+    if target.respond_to?(method_name.to_sym) &&
+        !target.instance_variable_defined?(initialized_variable)
+      # allways set initialized before method call otherwise endless loop in
+      # circle include calls
+      target.instance_variable_set(initialized_variable, true)
+      target.send(method_name.to_sym, target)
+    end
   end
 
   # imports component module with given name and create wrapper for it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/tests/ruby/import_test.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/import_test.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/import_test.rb     2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/import_test.rb    2014-02-19 
13:30:29.000000000 +0100
@@ -7,11 +7,6 @@
 require "yast"
 
 class YcpImportTest < Yast::TestCase
-  def setup
-    module_path = File.expand_path("../modules",__FILE__)+'/'
-    Yast.add_module_path module_path
-  end
-
   def test_import
     Yast.import( "ExampleTestModule" )
     assert Yast::ExampleTestModule.respond_to?(:sparc_map)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/tests/ruby/include/example.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/include/example.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/include/example.rb 2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/include/example.rb        
1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
-module Yast
-  module ExampleInclude
-    def initialize_example target
-      @test = 15
-    end
-
-    def test_plus_five
-      @test + 5
-    end
-  end
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/tests/ruby/include_test.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/include_test.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/include_test.rb    2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/include_test.rb   2014-02-19 
13:30:29.000000000 +0100
@@ -19,7 +19,7 @@
 
   class DoubleIncludeTest < Module
     def initialize
-      YCP.include self, "example.rb"
+      Yast.include self, "example.rb"
       @test = 5
       # second include should not call again init, so @test is kept to 5
       Yast.include self, "example.rb"
@@ -27,16 +27,11 @@
 
     attr_reader :test
   end
-  DIT = IncludeTest.new
+  DIT = DoubleIncludeTest.new
 end
 
 
 class IncludeTest < Yast::TestCase
-  def setup
-    include_path = File.expand_path("../include",__FILE__)+'/'
-    Yast.add_include_path include_path
-  end
-
   def test_include
     assert_equal 15, Yast::IT.test
   end
Files old/yast2-ruby-bindings-3.1.8/tests/ruby/modules/ExampleTestModule.ybc 
and new/yast2-ruby-bindings-3.1.10/tests/ruby/modules/ExampleTestModule.ybc 
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/tests/ruby/modules/ExampleTestModule.ycp 
new/yast2-ruby-bindings-3.1.10/tests/ruby/modules/ExampleTestModule.ycp
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/modules/ExampleTestModule.ycp      
2014-02-05 15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/modules/ExampleTestModule.ycp     
1970-01-01 01:00:00.000000000 +0100
@@ -1,18 +0,0 @@
-//WARNING compile after each change!
-{
-    module "ExampleTestModule";
-
-    global string example_string = "x86_64";
-
-    global map<string,integer> sparc_map() {
-        return $["one": 1, "two": 2];
-    }
-
-    global boolean is_xen() {
-        return false;
-    }
-
-    global string arch_short() {
-        return "ZX Spectrum";
-    }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/tests/ruby/ops.ycp 
new/yast2-ruby-bindings-3.1.10/tests/ruby/ops.ycp
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/ops.ycp    2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/ops.ycp   1970-01-01 
01:00:00.000000000 +0100
@@ -1,116 +0,0 @@
-{
-  y2milestone ("nil same: %1", nil == nil);
-  y2milestone ("integers same: %1", 1 == 1);
-  y2milestone ("floats same: %1", 1.1 == 1.1);
-  y2milestone ("strings same: %1", "s" == "s");
-  y2milestone ("symbols same: %1", `s == `s);
-  y2milestone ("booleans same: %1", false == false);
-  y2milestone ("lists same: %1", [1] == [1]);
-  y2milestone ("maps same: %1", $[1:2] == $[1:2]);
-  y2milestone ("paths same: %1", .etc == .etc);
-  y2milestone ("terms same: %1", `a(`b) == `a(`b));
-
-  y2milestone ("nil differ: %1", nil != nil);
-  y2milestone ("integers differ: %1", 1 != 1);
-  y2milestone ("floats differ: %1", 1.1 != 1.1);
-  y2milestone ("strings differ: %1", "s" != "s");
-  y2milestone ("symbols differ: %1", `s != `s);
-  y2milestone ("booleans differ: %1", false != false);
-  y2milestone ("lists differ: %1", [1] != [1]);
-  y2milestone ("maps differ: %1", $[1:2] != $[1:2]);
-  y2milestone ("paths differ: %1", .etc != .etc);
-  y2milestone ("terms differ: %1", `a(`b) != `a(`b));
-
-  y2milestone ("integers not same: %1", 1 == 2);
-  y2milestone ("floats not same: %1", 1.1 == 1.2);
-  y2milestone ("strings not same: %1", "s" == "st");
-  y2milestone ("symbols not same: %1", `s == `st);
-  y2milestone ("booleans not same: %1", false == true);
-  y2milestone ("lists not same: %1", [1] == [1,2]);
-  y2milestone ("maps not same: %1", $[1:2] == $[1:2, 2:3]);
-  y2milestone ("paths not same: %1", .etc == .);
-  y2milestone ("terms not same: %1", `a(`b) == `a());
-
-  y2milestone ("integers not differ: %1", 1 != 2);
-  y2milestone ("floats not differ: %1", 1.1 != 1.2);
-  y2milestone ("strings not differ: %1", "s" != "st");
-  y2milestone ("symbols not differ: %1", `s != `st);
-  y2milestone ("booleans not differ: %1", false != true);
-  y2milestone ("lists not differ: %1", [1] != [1,2]);
-  y2milestone ("maps not differ: %1", $[1:2] != $[1:2, 2:3]);
-  y2milestone ("paths not differ: %1", .etc != .);
-  y2milestone ("terms not differ: %1", `a(`b) != `a());
-
-  y2milestone ("integer x nil compare: %1", 1 == nil);
-  y2milestone ("nil x compare compare: %1", nil == 1);
-  y2milestone ("integer x nil not_equal: %1", 1 != nil);
-  y2milestone ("nil x compare not_equal: %1", nil != 1);
-
-//  only same type can be compared, exception is nil as seen above
-//  y2milestone ("integer x string compare: %1", 1 == "1");
-
-//comparison
-  y2milestone ("integers bigger: %1", 1 < 2);
-  y2milestone ("integer nil bigger: %1", 1 < nil);
-  y2milestone ("integer nil bigger equal: %1", 1 <= nil);
-  y2milestone ("integer nil lesser: %1", 1 > nil);
-  y2milestone ("integer nil lesser equal: %1", 1 >= nil);
-  y2milestone ("nil integer bigger: %1", nil < 1);
-  y2milestone ("nil integer bigger equal: %1", nil <= 1);
-  y2milestone ("nil integer lesser: %1", nil > 1);
-  y2milestone ("nil integer lesser equal: %1", nil >= 1);
-
-  y2milestone ("string bigger: %1", "s" < "t" );
-  y2milestone ("symbol bigger: %1", `s < `t );
-  y2milestone ("boolean bigger: %1", false < true );
-  y2milestone ("list bigger: %1", [1] < [2] );
-  y2milestone ("list bigger: %1", [1,1] < [nil,1] );
-  y2milestone ("list bigger: %1", [1,1] < [1,1,1] );
-  y2milestone ("list bigger: %1", [1,1,1,1] > [1,1,1] );
-  y2milestone ("map bigger: %1", $[1:2,"s":3] >= $[2:3,"s":2] );
-  y2milestone ("path bigger: %1", .ba >= ."a?" );
-  y2milestone ("path bigger: %1", ."b?" >= .ab );
-//cannot mix types, only if it can be convert
-//y2milestone ("symbol string bigger: %1", `s < "t" );
-
-  map<string,map<string,string> > m = $["a" : $["b":"c"] ];
-  y2milestone ("clear map: %1", m["a","b"]:"n" );
-  y2milestone ("clear map: %1", m["a","c"]:"n" );
-
-  list<list<string> > l = [["b","c"]];
-  y2milestone ("clear list: %1", l[0,1]:"n" );
-  y2milestone ("clear list: %1", l[0,2]:"n" );
-  y2milestone ("clear list: %1", l[1,0]:"n" );
-
-  term t = `a(`b,`c);
-  y2milestone ("clear list: %1", t[1]:`n );
-  y2milestone ("clear list: %1", t[2]:`n );
-  y2milestone ("clear list: %1", t[0]:`n );
-
-  map<string,list<string> > n = $["a":["b","c"]];
-  y2milestone ("map list: %1", n["a",0]:"n" );
-  y2milestone ("map list: %1", n["a",2]:"n" );
-
-  map<string,any> z = $["a":["b","c"], "b":`a(`b,`c)];
-  y2milestone ("map term: %1", z["a",0]:"n" );
-  y2milestone ("map term: %1", z["b",1]:`n );
-  y2milestone ("map term: %1", z["b",2]:`n );
-  
-  list ta = [0];
-  list ma = [[0]];
-  y2milestone ("list add: %1", ta+1);
-  y2milestone ("list add: %1", ta+ma);
-
-  y2milestone ("string add %1", "s"+15);
-  y2milestone ("string add %1", "s"+`c);
-  y2milestone ("string add %1", "s"+.etc);
-
-  y2milestone ("float substract: %1", 1.2-2.3);
-
-  y2milestone ("int modulo: %1", 5%2);
-
-  y2milestone ("int negate: %1", ~5);
-  y2milestone ("int negate: %1", ~8589934592);
-  y2milestone ("int negate: %1", ~-558589934592);
-
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/tests/ruby/test_helper.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_helper.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/test_helper.rb     2014-02-05 
15:41:24.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/test_helper.rb    2014-02-19 
13:30:29.000000000 +0100
@@ -4,7 +4,9 @@
 if !File.exists? "#{binary_path}/yast"
   FileUtils.ln_s binary_path, "#{binary_path}/yast" #to load builtinx.so
 end
+if !File.exists? "#{binary_path}/plugin"
+  FileUtils.ln_s binary_path, "#{binary_path}/plugin" #to load py2lang_ruby.so 
for calling testing ruby clients
+end
 $:.unshift binary_path # yastx.so
 $:.unshift "#{ROOT_DIR}/src/ruby"       # yast.rb
-ENV["Y2DIR"] = File.dirname(__FILE__)
-
+ENV["Y2DIR"] = binary_path + ":" + File.dirname(__FILE__) + "/test_module"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/clients/test_client.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/clients/test_client.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/clients/test_client.rb 
1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/clients/test_client.rb    
    2014-02-19 13:30:29.000000000 +0100
@@ -0,0 +1,15 @@
+module Yast
+  class TestClient
+    A_CONSTANT = 1
+
+    def main
+      Yast.include self, "example.rb"
+      @test
+    end
+  end unless const_defined? :TestClient
+  # Clients are re-eval-ed to mimic the YCP behavior;
+  # but we skip the class redefinition
+  # to avoid warnings about redefined constants
+end
+
+Yast::TestClient.new.main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/include/example.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/include/example.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/include/example.rb     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/include/example.rb    
2014-02-19 13:30:29.000000000 +0100
@@ -0,0 +1,11 @@
+module Yast
+  module ExampleInclude
+    def initialize_example target
+      @test = 15
+    end
+
+    def test_plus_five
+      @test + 5
+    end
+  end
+end
Files 
old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/modules/ExampleTestModule.ybc
 and 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/modules/ExampleTestModule.ybc
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/modules/ExampleTestModule.ycp
 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/modules/ExampleTestModule.ycp
--- 
old/yast2-ruby-bindings-3.1.8/tests/ruby/test_module/modules/ExampleTestModule.ycp
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-ruby-bindings-3.1.10/tests/ruby/test_module/modules/ExampleTestModule.ycp
 2014-02-19 13:30:29.000000000 +0100
@@ -0,0 +1,18 @@
+//WARNING compile after each change!
+{
+    module "ExampleTestModule";
+
+    global string example_string = "x86_64";
+
+    global map<string,integer> sparc_map() {
+        return $["one": 1, "two": 2];
+    }
+
+    global boolean is_xen() {
+        return false;
+    }
+
+    global string arch_short() {
+        return "ZX Spectrum";
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.8/tests/ruby/wfm_spec.rb 
new/yast2-ruby-bindings-3.1.10/tests/ruby/wfm_spec.rb
--- old/yast2-ruby-bindings-3.1.8/tests/ruby/wfm_spec.rb        1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-ruby-bindings-3.1.10/tests/ruby/wfm_spec.rb       2014-02-19 
13:30:29.000000000 +0100
@@ -0,0 +1,33 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper_rspec"
+
+require "yast"
+
+module Yast
+  describe WFM do
+    describe ".CallFunction" do
+      it "calls yast client via component system returning its value" do
+        expect(WFM.CallFunction("test_client")).to eq 15
+      end
+
+      it "always properly initialize client (BNC#861529)" do
+        expect(WFM.CallFunction("test_client")).to eq 15
+        expect(WFM.CallFunction("test_client")).to eq 15
+      end
+
+      it "produces no warning (about redefined constants)" do
+        # require_relative does not work in -e
+        helper = $LOADED_FEATURES.grep(/test_helper_rspec/).first
+        script = <<-EOS
+          load '#{helper}'
+          require 'yast'
+          Yast::WFM.CallFunction('test_client')
+          Yast::WFM.CallFunction('test_client')
+        EOS
+        stdout_stderr = `ruby -e "#{script}" 2>&1`
+        expect(stdout_stderr).to eq ""
+      end
+    end
+  end
+end

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

Reply via email to