Hello community,

here is the log from the commit of package yast2-ruby-bindings for 
openSUSE:Factory checked in at 2014-10-20 07:27:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-09-18 07:12:28.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 
    2014-10-20 07:27:04.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Oct 15 05:00:32 UTC 2014 - [email protected]
+
+- switch to rubygem() for Factory too
+- 3.1.25
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.zx1LOg/_old  2014-10-20 07:27:05.000000000 +0200
+++ /var/tmp/diff_new_pack.zx1LOg/_new  2014-10-20 07:27:05.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.24
+Version:        3.1.25
 Release:        0
 Url:            https://github.com/yast/yast-ruby-bindings
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -30,16 +30,10 @@
 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
+Requires:       rubygem(%{rb_default_ruby_abi}:fast_gettext)
 BuildRequires:  yast2-core-devel >= 2.24.0
 Requires:       yast2-ycp-ui-bindings       >= 2.21.9
 BuildRequires:  yast2-ycp-ui-bindings-devel >= 2.21.9

++++++ yast2-ruby-bindings-3.1.24.tar.bz2 -> yast2-ruby-bindings-3.1.25.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.24/MAINTAINER 
new/yast2-ruby-bindings-3.1.25/MAINTAINER
--- old/yast2-ruby-bindings-3.1.24/MAINTAINER   2014-09-12 14:45:10.000000000 
+0200
+++ new/yast2-ruby-bindings-3.1.25/MAINTAINER   2014-10-16 17:00:10.000000000 
+0200
@@ -1,2 +1 @@
-Josef Reidinger <[email protected]>
-
+Deprecated file. Use `osc maintainer yast2-ruby-bindings` instead.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.24/README.md 
new/yast2-ruby-bindings-3.1.25/README.md
--- old/yast2-ruby-bindings-3.1.24/README.md    2014-09-12 14:45:10.000000000 
+0200
+++ new/yast2-ruby-bindings-3.1.25/README.md    2014-10-16 17:00:10.000000000 
+0200
@@ -1,5 +1,109 @@
 # Yast2-ruby-bindings
-The bindings allow YaST modules to be written using the Ruby language and also 
Ruby scripts can use YaST agents, APIs and modules.
+It is part of [YaST](http://yast.github.io) where you can find more information
+about YaST and its component system. Ruby bindings covers only connection to
+component system and provide some ruby helpers.
+
+It starts as experimental project to allow writting in ruby, but after decision
+to switch from own language YCP to ruby, it is major part of YaST needed by
+almost all parts. Relict from language switch is construct to keep backward
+compatibility, then need human decision to remove it.
+
+## Features
+
+### Publish, Import and Include
+Connection to YaST component system has two parts. The first one is ability
+to be called from component system. Clients can be called via WFM (see below )
+and modules provide interface via publish method, where is specified type.
+Publish is very similar to dbus interface provision. For more details see 
inline
+documentation of {Yast::Exportable#publish}. If method is needed only from 
ruby,
+then publish is not needed.
+
+The second part is calling methods from component system. Clients are called
+via WFM (see below). Methods from modules are imported with {Yast.import}, that
+load component and create ruby object in Yast namespace from it, on which can 
be
+called exported methods. Note that calling from ruby to ruby published methods
+are optimized, so it do not go thrue component system resulting in no speed
+penalty. If call is done from ruby to ruby, then it is not limited by component
+system and its protocol, so all ruby features can be used.
+
+```ruby
+# how to import module and call it
+require "yast"
+Yast.import "IP"
+puts Yast::IP.Valid4
+```
+
+Relict from transformation from ycp to ruby is {Yast.include} which adds 
methods
+from included class to passed object. It is very similar to ruby `include` with
+exception Include object can include other Include objects and thus there is
+special constructor instead of common ruby `included`.
+
+### Ruby Helpers
+Ruby bindings provides set of various helpers for work with YaST component
+system or to make translation from ycp to ruby easier. Here is overview of
+important provided classes with link to inline documentation and short 
explanation:
+
+* {Yast::ArgRef} class to be used for passing arguments by reference. Works
+  even for ruby immutable types like Fixnum or Symbol.
+* {Yast::Builtins} module contains ycp builtins that need to be simulated in
+  ruby. For new code it should not be used.
+* {Yast::Client} base class for clients in ruby. It is not required.
+  Just add helpers.
+* {Yast::Convert} simulate type conversion. Not needed in new code.
+* {Yast::Exportable} provides method publish ( see above )
+* {Yast::FunRef} container used to pass reference to method to component 
system.
+* {Yast::I18n} Provides methods used for translations.
+* {Yast::Module} base class for YaST modules in ruby. It is not required.
+  Just add helpers.
+* {Yast::Ops} module contains ycp operators that need to be simulated in
+  ruby. For new code it should not be used.
+* {Yast::Path} represents path type from YCP protocol.
+* {Yast::SCR} allows usage of SCR component for communication with system.
+* {Yast::Term} represents term type from YCP protocol. Often used for UI.
+* {Yast::WFM} allows usage of WFM component. WFM is used to call clients, gets
+  argument from call and for setting new SCR instance as global one.
+* {Yast::Y2Logger} ruby logger configured to work like yast log with proper
+  place to use. Module {Yast::Logger} provides easy access to log via method
+  `log`.
+* {Yast} namespace itself contains few helpers to be used. It contains
+  shortcuts and method for deep copy of object.
+
+### UI Shortcuts
+{Yast::UIShortcuts} provides shortcut to UI terms. It is useful to construct
+dialogs or even popups.
+
+```ruby
+# usage with term
+content = Yast::Term.new(
+  :ButtonBox,
+  Yast::Term.new(
+    :PushButton,
+    Yast::Term.new(:id, :ok_button),
+    "OK"
+  )
+  Yast::Term.new(
+    :PushButton,
+    Yast::Term.new(:id, :cancel_button),
+    "Cancel"
+  )
+)
+
+# usage with shortcuts
+include Yast::UIShortcuts
+content = ButtonBox(
+  PushButton(Id(:ok_button), "OK"),
+  PushButton(Id(:cancel_button), "Cancel")
+)
+```
+
+### Testing
+YaST team encourages to use rspec for testing YaST code in ruby. There is
+a plan to create helper to allow easier testing.
+
+### Further Information
+
+More information about YaST can be found on its 
[homepage](http://yast.github.io).
+More information about ruby bindings can be found in generated documentation.
 
 ## Packager information
 ### How to compile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.24/package/yast2-ruby-bindings.changes 
new/yast2-ruby-bindings-3.1.25/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.24/package/yast2-ruby-bindings.changes  
2014-09-12 14:45:10.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.25/package/yast2-ruby-bindings.changes  
2014-10-16 17:00:10.000000000 +0200
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Wed Oct 15 05:00:32 UTC 2014 - [email protected]
+
+- switch to rubygem() for Factory too
+- 3.1.25
+
+-------------------------------------------------------------------
 Fri Sep 12 12:22:37 UTC 2014 - [email protected]
 
 - GC-guard some Ruby values to prevent a crash in slideshow
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-ruby-bindings-3.1.24/package/yast2-ruby-bindings.spec 
new/yast2-ruby-bindings-3.1.25/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.24/package/yast2-ruby-bindings.spec     
2014-09-12 14:45:10.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.25/package/yast2-ruby-bindings.spec     
2014-10-16 17:00:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-ruby-bindings
-Version:        3.1.24
+Version:        3.1.25
 Url:            https://github.com/yast/yast-ruby-bindings
 Release:        0
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -30,15 +30,9 @@
 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.24/src/ruby/yast/convert.rb 
new/yast2-ruby-bindings-3.1.25/src/ruby/yast/convert.rb
--- old/yast2-ruby-bindings-3.1.24/src/ruby/yast/convert.rb     2014-09-12 
14:45:10.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.25/src/ruby/yast/convert.rb     2014-10-16 
17:00:10.000000000 +0200
@@ -8,7 +8,34 @@
   # there is generated shortcuts for conversion to_<type>
   # @deprecated ruby need not type conversion and int<->float conversion is 
explicit
   module Convert
-    #generate shortcuts
+    # @!method  self.to_boolean(       object )
+    #   @return        [Boolean, nil] *object*, or `nil` if it is not `true` 
or `false`
+    # @!method  self.to_string(        object )
+    #   @see Builtins.tostring
+    #   @return        [String, nil]  *object*, or `nil` if it is not a String
+    # @!method  self.to_symbol(        object )
+    #   @see Builtins.tosymbol
+    #   @return        [Symbol, nil]  *object*, or `nil` if it is not a Symbol
+    # @!method  self.to_integer(       object )
+    #   @see Builtins.tointeger
+    #   @return        [Integer, nil] *object*, or `nil` if it is not a Integer
+    # @!method  self.to_float(         object )
+    #   @see Builtins.tofloat
+    #   @return        [Float, nil]   *object*, or `nil` if it is not a Float
+    # @!method  self.to_list(          object )
+    #   @see Builtins.tolist
+    #   @return        [Array, nil]   *object*, or `nil` if it is not a Array
+    # @!method  self.to_map(           object )
+    #   @see Builtins.tomap
+    #   @return        [Hash, nil]    *object*, or `nil` if it is not a Hash
+    # @!method  self.to_term(          object )
+    #   @see Builtins.toterm
+    #   @return        [Term, nil]    *object*, or `nil` if it is not a Term
+    # @!method  self.to_path(          object )
+    #   @see Builtins.topath
+    #   @return        [Path, nil]    *object*, or `nil` if it is not a Path
+    # @!method  self.to_locale(        object )
+    #   @return        [String, nil]  *object*, or `nil` if it is not a String
     Ops::SHORTCUT_TYPES.each do |type|
       eval <<END
         def self.to_#{type}(object)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-ruby-bindings-3.1.24/src/ruby/yast/ops.rb 
new/yast2-ruby-bindings-3.1.25/src/ruby/yast/ops.rb
--- old/yast2-ruby-bindings-3.1.24/src/ruby/yast/ops.rb 2014-09-12 
14:45:10.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.25/src/ruby/yast/ops.rb 2014-10-16 
17:00:10.000000000 +0200
@@ -29,8 +29,9 @@
       'byteblock' => Yast::Byteblock
     }
 
-    # Types for which we generate shortcut methods, e.g. 
{Yast::Ops.get_string} or
-    # {Yast::Convert.to_string}.
+    # Types for which we generate shortcut methods,
+    # e.g. {Yast::Ops.get_string}
+    # or   {Yast::Convert.to_string}.
     SHORTCUT_TYPES = [
       "boolean",
       "string",
@@ -44,6 +45,26 @@
       "locale"
     ]
 
+    # @!method                    self.get_boolean(       obj, idx, def )
+    #   @return [Boolean, nil] {Convert.to_boolean}({get}(obj, idx, def))
+    # @!method                     self.get_string(       obj, idx, def )
+    #   @return [String, nil]   {Convert.to_string}({get}(obj, idx, def))
+    # @!method                     self.get_symbol(       obj, idx, def )
+    #   @return [Symbol, nil]   {Convert.to_symbol}({get}(obj, idx, def))
+    # @!method                    self.get_integer(       obj, idx, def )
+    #   @return [Integer, nil] {Convert.to_integer}({get}(obj, idx, def))
+    # @!method                      self.get_float(       obj, idx, def )
+    #   @return [Float, nil]     {Convert.to_float}({get}(obj, idx, def))
+    # @!method                       self.get_list(       obj, idx, def )
+    #   @return [Array, nil]      {Convert.to_list}({get}(obj, idx, def))
+    # @!method                        self.get_map(       obj, idx, def )
+    #   @return [Hash, nil]        {Convert.to_map}({get}(obj, idx, def))
+    # @!method                       self.get_term(       obj, idx, def )
+    #   @return [Term, nil]       {Convert.to_term}({get}(obj, idx, def))
+    # @!method                       self.get_path(       obj, idx, def )
+    #   @return [Path, nil]       {Convert.to_path}({get}(obj, idx, def))
+    # @!method                     self.get_locale(       obj, idx, def )
+    #   @return [String, nil]   {Convert.to_locale}({get}(obj, idx, def))
     Ops::SHORTCUT_TYPES.each do |type|
       eval <<END, binding, __FILE__, __LINE__ + 1
         def self.get_#{type}(object, indexes, default=nil, &block)
@@ -65,10 +86,31 @@
     # @deprecated Use the native Ruby operator `[]`
     #
     # Gets value from *object* at *indexes*.
-    # In case value is not found, then return *default* value.
+    # Eager to return *default* at slightest provocation.
     #
+    # **Replacement**
+    #
+    # Consider using
+    #
+    # - `object[index]`
+    # - `object[i1][i2]`
+    # - `object[index] || default` if the value cannot be `false` or `nil`
+    # - `object.fetch(index, default)`
+    # - `object.fetch(index)` if you want an exception when index is absent
+    #
+    # @param object [Array, Hash, Yast::Term]
+    # @param indexes Usually a scalar, but also an array of scalars
+    #    to recursively descend into *object*
+    # @param default the default value returned (via {deep_copy}) for any 
error;
+    #    if a **block** is given, it is called to provide the default value
+    #    (only when the default is needed, so it is useful for values
+    #    that are expensive to compute).
     # @param skip_frames [Integer] private, how many caller frames to skip
-    #  when reporting warnings or exceptions (0 by default)
+    #  when reporting warnings or exceptions
+    #
+    # @return The value in *object* at *indexes*, if it exists.
+    #    The *default* value if *object*, *indexes* are nil, have wrong type,
+    #    or *indexes* does not exist in *object*.
     def self.get (object, indexes, default=nil, skip_frames = 0)
       res = object
       default = Yast.deep_copy(default)

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

Reply via email to