Hello community,

here is the log from the commit of package yast2 for openSUSE:Factory checked 
in at 2014-12-03 22:53:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2 (Old)
 and      /work/SRC/openSUSE:Factory/.yast2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2/yast2.changes      2014-11-28 
08:46:58.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.yast2.new/yast2.changes 2014-12-03 
22:53:25.000000000 +0100
@@ -1,0 +2,13 @@
+Mon Dec  1 12:23:34 UTC 2014 - lsle...@suse.cz
+
+- PackageCallbacks: fixed progress reporting (progress overflow was
+  caused by missing stage count)
+- 3.1.113
+
+-------------------------------------------------------------------
+Wed Nov 26 09:49:19 UTC 2014 - jreidin...@suse.com
+
+- Add base class for installation proposal and finish clients
+- 3.1.112
+
+-------------------------------------------------------------------
@@ -5 +17,0 @@
-- 3.1.111

Old:
----
  yast2-3.1.111.tar.bz2

New:
----
  yast2-3.1.113.tar.bz2

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

Other differences:
------------------
++++++ yast2.spec ++++++
--- /var/tmp/diff_new_pack.Rr1RKc/_old  2014-12-03 22:53:27.000000000 +0100
+++ /var/tmp/diff_new_pack.Rr1RKc/_new  2014-12-03 22:53:27.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.111
+Version:        3.1.113
 Release:        0
 Url:            https://github.com/yast/yast-yast2
 

++++++ yast2-3.1.111.tar.bz2 -> yast2-3.1.113.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/src/Makefile.am 
new/yast2-3.1.113/library/general/src/Makefile.am
--- old/yast2-3.1.111/library/general/src/Makefile.am   2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/src/Makefile.am   2014-12-01 
14:56:14.000000000 +0100
@@ -81,6 +81,12 @@
 fillup_DATA = \
   fillup/sysconfig.yast2
 
-EXTRA_DIST = $(module_DATA) $(client_DATA) $(scrconf_DATA) $(agent_SCRIPTS) 
$(ydata_DATA) $(fillup_DATA)
+ylibdir = "${yast2dir}/lib/installation"
+ylib_DATA = \
+  lib/installation/auto_client.rb \
+  lib/installation/finish_client.rb \
+  lib/installation/proposal_client.rb
+
+EXTRA_DIST = $(module_DATA) $(client_DATA) $(scrconf_DATA) $(agent_SCRIPTS) 
$(ydata_DATA) $(fillup_DATA) $(ylib_DATA)
 
 include $(top_srcdir)/Makefile.am.common
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/src/lib/installation/auto_client.rb 
new/yast2-3.1.113/library/general/src/lib/installation/auto_client.rb
--- old/yast2-3.1.111/library/general/src/lib/installation/auto_client.rb       
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/src/lib/installation/auto_client.rb       
2014-12-01 14:56:14.000000000 +0100
@@ -0,0 +1,146 @@
+require "yast"
+
+module Installation
+  # An abstract class that simplifies writing `*_auto.rb` clients for AutoYaST.
+  #
+  # It provides a single entry point
+  # which dispatches calls to the abstract methods that all proposal clients
+  # need to implement.
+  #
+  # You need to implement all the methods, except {#packages}.
+  #
+  # "Autoinstall" basically means {#import}, then {#write}.
+  # "Clone" means {#read}, then {#export}.
+  #
+  # @example how to run a client
+  #   require "installation/example_auto"
+  #   ::Installation::ExampleAuto.run
+  #
+  # @see 
https://github.com/yast/yast-bootloader/blob/master/src/clients/bootloader_auto.rb
+  #   Example client, bootloader_auto.rb
+  # @see http://users.suse.com/~ug/autoyast_doc/devel/ar01s05.html
+  #   Code-related configuration and some old documenation.
+  class AutoClient < Yast::Client
+    include Yast::Logger
+
+    # Entry point for calling the client.
+    # The only part needed in client rb file.
+    # @return response from abstract methods
+    def self.run
+      self.new.run
+    end
+
+    # Dispatches to abstract method based on passed Arguments to client
+    def run
+      func, param = Yast::WFM.Args
+      log.info "Called #{self.class}.run with #{func} and params #{param}"
+
+      case func
+      when "Import"
+        import(param)
+      when "Export"
+        export
+      when "Summary"
+        summary
+      when "Reset"
+        reset
+      when "Change"
+        change
+      when "Write"
+        write
+      when "Packages"
+        packages
+      when "Read"
+        read
+      when "GetModified"
+        modified?
+      when "SetModified"
+        modified
+      else
+        raise ArgumentError, "Invalid action for auto client '#{func.inspect}'"
+      end
+    end
+
+  protected
+
+    # Import data from AutoYaST profile.
+    #
+    # The profile is a Hash or an Array according to the configuration item
+    # `X-SuSE-YaST-AutoInstDataType`
+    # @param profile [Hash, Array] profile data specific to this module.
+    # @return true on success
+    def import(profile)
+      raise NotImplementedError, "Calling abstract method 'import'"
+    end
+
+    # Export profile data from AutoYaST.
+    #
+    # The profile is a Hash or an Array according to the configuration item
+    # `X-SuSE-YaST-AutoInstDataType`
+    # @return [Hash, Array] profile data
+    def export
+      raise NotImplementedError, "Calling abstract method 'export'"
+    end
+
+    # Provide a brief summary of configuration.
+    # @return [String] description in RichText format
+    def summary
+      raise NotImplementedError, "Calling abstract method 'summary'"
+    end
+
+    # Reset configuration to default state.
+    # @return [void]
+    def reset
+      raise NotImplementedError, "Calling abstract method 'reset'"
+    end
+
+    # Run UI to modify the  configuration.
+    # @return [Symbol] If one of `:accept`, `:next`, `:finish` is returned,
+    #   the changes are accepted, otherwise they are discarded.
+    def change
+      raise NotImplementedError, "Calling abstract method 'change'"
+    end
+
+
+    # Write settings to the target system.
+    # @return [Boolean] true on success
+    def write
+      raise NotImplementedError, "Calling abstract method 'write'"
+    end
+
+    # Get a list of packages needed for configuration.
+    #
+    # The default implementation returns an empty list.
+    # @return [Array<String>] list of required packages
+    def packages
+      log.info "#{self.class}#packages not implemented, returning []."
+
+      []
+    end
+
+    # Read settings from the target system.
+    #
+    # It is used to initialize configuration from the current system
+    # for further represent in AutoYaST profile.
+    # @return [void]
+    def read
+      raise NotImplementedError, "Calling abstract method 'write'"
+    end
+
+    # Set that the profile data has beed modified
+    # and should be exported from the interactive editor,
+    # or included in the cloned data.
+    # @return [void]
+    def modified
+      raise NotImplementedError, "Calling abstract method 'modified'"
+    end
+
+    # Query whether the profile data has beed modified
+    # and should be exported from the interactive editor,
+    # or included in the cloned data.
+    # @return [Boolean]
+    def modified?
+      raise NotImplementedError, "Calling abstract method 'modified?'"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/src/lib/installation/finish_client.rb 
new/yast2-3.1.113/library/general/src/lib/installation/finish_client.rb
--- old/yast2-3.1.111/library/general/src/lib/installation/finish_client.rb     
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/src/lib/installation/finish_client.rb     
2014-12-01 14:56:14.000000000 +0100
@@ -0,0 +1,99 @@
+require "yast"
+
+module Installation
+  # Abstract class that simplify writting finish clients for installation.
+  # It provides single entry point and abstract methods, that all finish 
clients
+  # need to implement.
+  # @example how to run client
+  #   require "installation/example_finish"
+  #   ::Installation::ExampleFinish.run
+  # @see for example client in installation clone_finish.rb
+  #
+  # # Inst-Finish Scripts
+  # ## About
+  # They are called by the inst_finish.ycp installation client at the end of 
the
+  # first stage installation.
+  #
+  # Part of these clients are called with SCR connected to inst-sys, the others
+  # are called after SCR gets switched to the installed system (chrooted).
+  #
+  # Script inst_finish.ycp contains several stages, every has
+  #
+  #   * label - visible in the writing progress
+  #
+  #   * steps - list of additional inst_finish scripts that are called
+  #   ("bingo" -> "bingo_finish.ycp")
+  #   Important script is "switch_scr", after that call, SCR is connected to 
the
+  #   just installed system.
+  #
+  # ## Finish Scripts
+  #
+  # Every single finish script is a non-interactive script (write-only). It's
+  # basically called twice:
+  #
+  #   * At first "Info" returns in which modes "Write" should be called
+  #
+  #   * Then "Write" should be called to do the job
+  #
+  class FinishClient < Yast::Client
+    include Yast::Logger
+
+    # Entry point for calling client.
+    # The only part needed in client rb file.
+    # @return response from abstract methods
+    def self.run
+      self.new.run
+    end
+
+    # Dispatches to abstract method based on passed arguments to client
+    def run
+      func = Yast::WFM.Args.first
+      log.info "Called #{self.class}.run with #{func}"
+
+      case func
+      when "Info"
+        info
+      when "Write"
+        write
+      else
+        raise ArgumentError, "Invalid action for proposal '#{func.inspect}'"
+      end
+    end
+
+    protected
+
+    # Write configuration.
+    def write
+      raise NotImplementedError, "Calling abstract method 'write'"
+    end
+
+    # Restrict in which modes it should run.
+    # @return [Array<Symbol>, nil]
+    #   Valid values are `:autoinst`, `:autoupg`, `:installation`,
+    #   `:live_installation`, and `:update`. NOTE that these values
+    #   are NOT consistent with the names used in {Yast::ModeClass Mode}.
+    #   By default it returns `nil`, meaning to run always.
+    def modes
+      nil
+    end
+
+    # @return [Integer] the number of client steps.
+    def steps
+      1
+    end
+
+    # @return [String] a title used to display to the user what is happening.
+    def title
+      raise NotImplementedError, "Calling abstract method 'title'"
+    end
+
+    # Adapt the metadata for inst_finish API
+    def info
+      {
+        "when " => modes,
+        "steps" => steps,
+        "title" => title
+      }
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/src/lib/installation/proposal_client.rb 
new/yast2-3.1.113/library/general/src/lib/installation/proposal_client.rb
--- old/yast2-3.1.111/library/general/src/lib/installation/proposal_client.rb   
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/src/lib/installation/proposal_client.rb   
2014-12-01 14:56:14.000000000 +0100
@@ -0,0 +1,240 @@
+require "yast"
+
+module Installation
+  # Abstract class that simplifies writing proposal clients for installation.
+  # It provides a single entry point
+  # which dispatches calls to the abstract methods that all proposal clients
+  # need to implement.
+  #
+  # It is recommended to use {Installation::ProposalClient} as base class for
+  # new clients.
+  #
+  # @example how to run a client
+  #   require "installation/example_proposal"
+  #   ::Installation::ExampleProposal.run
+  # @see for example client in installation clone_proposal.rb
+  #
+  # # API for YaST2 installation proposal
+  #
+  # ## Motivation
+  #
+  # After five releases, YaST2 is now smart enough to make reasonable
+  # proposals for (nearly) every installation setting, thus it is no longer
+  # necessary to ask the user that many questions during installation:
+  # Most users simply hit the [next] button anyway.
+  #
+  # Hence, YaST2 now collects all the individual proposals from its submodules
+  # and presents them for confirmation right away. The user can change each
+  # individual setting, but he is no longer required to go through all the
+  # steps just to change some simple things. The only that (currently) really
+  # has to be queried is the installation language - this cannot reasonably be
+  # guessed (yet?).
+  #
+  # ## Overview
+  #
+  # YaST2 installation modules should cooperate with the main program in a
+  # consistent API. General usage:
+  #
+  # * inst_proposal (main program) creates an empty dialog with RichText widget
+  #
+  # * inst_proposal calls each sub-module in turn to make a proposal
+  #
+  # * the user may choose to change individual settings
+  #   (by clicking on a hyperlink)
+  #
+  # * inst_proposal starts that module's sub-workflow which runs
+  #   independently.  After this, inst_proposal tells all subsequent (all?)
+  #   modules to check their states and return whether a change of their
+  #   proposal is necessary after the user interaction.
+  #
+  # * main program calls each sub-module to write the settings to the system
+  #
+  class ProposalClient < Yast::Client
+    include Yast::Logger
+
+    # The entry point for calling a client.
+    # The only part needed in client rb file.
+    # @return response from abstract methods
+    def self.run
+      self.new.run
+    end
+
+    # Dispatches to abstract method based on passed Arguments to client
+    def run
+      func, param = Yast::WFM.Args
+      log.info "Called #{self.class}.run with #{func} and params #{param}"
+
+      case func
+      when "MakeProposal"
+        make_proposal(param)
+      when "AskUser"
+        ask_user(param)
+      when "Description"
+        description
+      when "Write"
+        write(param)
+      else
+        raise ArgumentError, "Invalid action for proposal '#{func.inspect}'"
+      end
+    end
+
+  protected
+
+    # Abstract method to create proposal suggestion for installation
+    #
+    # @option attrs [Boolean] "force_reset"
+    #   If `true`, discard anything that may be cached
+    #   and start over from scratch.
+    #   If `false`, use cached values from the last invocation if there are 
any.
+    #
+    # @option attrs [Boolean] "language_changed"
+    #   The installation language has changed since the last call of
+    #   {#make_proposal}.
+    #   This is important only if there is a language change mechanism
+    #   in one of the other submodules.
+    #   If this parameter is "true", any texts the user can see in
+    #   the proposal need to be retranslated. The internal translator mechanism
+    #   will take care of this itself if the corresponding strings are once 
more
+    #   put through it (the `_("...")` function). Only very few
+    #   submodules that translate any strings internally based on internal maps
+    #   (e.g., keyboard etc.) need to take more action.
+    #
+    # @return [Hash] containing:
+    #
+    #   * **`"links"`** [Array<String>] ---
+    #     A list of additional hyperlink IDs used in summaries returned by this
+    #     section. All possible values must be included.
+    #
+    #   * **`"preformatted_proposal"`** [String, nil] ---
+    #     Human readable proposal preformatted in HTML. It is possible to use
+    #     the {Yast::HTMLClass Yast::HTML} module for such formatting.
+    #
+    #   * **`"raw_proposal"`** [Array<String>, nil]
+    #     (only used if `preformatted_proposal` is not present) ---
+    #     Human readable proposal, not formatted yet.
+    #     The caller will format each item as a HTML list item (`<li>`). The
+    #     proposal can contain hyperlinks with IDs listed in the list `links`.
+    #
+    #   * **`"warning"`** [String, nil] ---
+    #     Warning in human readable format without HTML tags other than 
`\<br>`.
+    #     The warning will be embedded in appropriate HTML format 
specifications
+    #     according to `warning_level` below.
+    #
+    #   * **`"warning_level"`** [Symbol, nil] ---
+    #     Determines the severity and the visual display of the warning.
+    #     The valid values are
+    #     `:notice`, `:warning` (default), `:error`, `:blocker` and `:fatal`.
+    #     A _blocker_ will prevent the user from continuing the installation.
+    #     If any proposal contains a _blocker_ warning, the Accept
+    #     button in the proposal dialog will be disabled - the user needs
+    #     to fix that blocker before continuing.
+    #     _Fatal_ is like _blocker_ but also stops building the proposal.
+    #
+    #   * **`"language_changed"`** [Boolean] ---
+    #     This module just caused a change of the installation language.
+    #     This is only relevant for the "language" module.
+    #
+    #   * **`"mode_changed"`** [Boolean, nil] ---
+    #     This module just caused a change of the installation mode.
+    #     This is only relevant for the "inst mode" module.
+    #
+    #   * **`"rootpart_changed"`** [Boolean, nil] ---
+    #     This module just caused a change of the root partition.
+    #     This is only relevant for the "root part" module.
+    #
+    #   * **`"help"`** [String, nil] ---
+    #     Help text for this module which appears in the standard dialog
+    #     help (particular helps for modules sorted by presentation order).
+    #
+    def make_proposal(attrs)
+      raise NotImplementedError, "Calling abstract method 'make_proposal'"
+    end
+
+    # An abstract method to run an interactive workflow -- let the user
+    # decide upon values he might want to change.
+    #
+    # It may contain one single dialog, a sequence of dialogs, or one master
+    # dialog with one or more "expert" dialogs. It can also be a 
non-interactive
+    # response to clicking on a hyperlink. The module is responsible for
+    # controlling the workflow sequence (i.e., "Next", "Back" buttons etc.).
+    #
+    # Submodules do not provide an "Abort" button to abort the entire
+    # installation. If the user wishes to do that, he can always go back to
+    # the main dialog (the installation proposal) and choose "Abort" there.
+    #
+    # @option attrs [Boolean] "has_next"
+    #   Use a "Next" button even if the module by itself has only one step, 
thus
+    #   would normally have an "OK" button - or would rename the "Next" button
+    #   to something like "Finish" or "Accept".
+    #
+    # @option attrs [String, nil] "chosen_id"
+    #   If a section proposal contains hyperlinks and the user clicks
+    #   on one of them, this defines the ID of the hyperlink.
+    #   All hyperlink IDs must be set in the map returned by {#description}.
+    #   If the user did not click on a proposal hyperlink,
+    #   this parameter is not defined.
+    #
+    # @return [Hash] containing:
+    #
+    #   * **`"workflow_sequence"`** [Symbol] with these possible values:
+    #
+    #       * `:next` (default) --- Everything OK - continue with the next
+    #                               step in workflow sequence.
+    #
+    #       * `:back`   --- User requested to go back in the workflow sequence.
+    #
+    #       * `:again`  --- Call this submodule again
+    #                       (i.e., re-initialize the submodule)
+    #
+    #       * `:auto`   --- Continue with the workflow sequence in the current
+    #                       direction: forward if the last submodule returned
+    #                       `:next`, backward otherwise.
+    #
+    #       * `:finish` --- Finish the installation. This is specific
+    #                       to "inst_mode.ycp" when the user selected
+    #                       "boot system" there.
+    #
+    #   * **`"language_changed"`** [Boolean, nil] ---
+    #     This module just caused a change of the installation language.
+    #     This is only relevant for the "language" module.
+    #
+    def ask_user(attrs)
+      raise NotImplementedError, "Calling abstract method 'ask_user'"
+    end
+
+
+    # An abstract method to return human readable titles both for the RichText
+    # (HTML) widget and for menu entries. It also specifies an ID which is used
+    # when the user selects the module.
+    #
+    # @return [Hash] containing:
+    #
+    #   * **`"rich_text_title"`** [String] ---
+    #     A translated human readable title for this section in
+    #     the `RichText` widget without any HTML formatting.
+    #     This will be embedded in `<h3><a href="#???"> ... </a></h3>`
+    #     so make sure not to add any additional HTML formatting.
+    #     Keyboard shortcuts are not (yet?) supported, so do not include
+    #     any `&` characters.
+    #
+    #   * **`"menu_title"`** [String] ---
+    #     A translated human readable menu entry for this section.
+    #     It must contain a keyboard shortcut (`&`). It should NOT contain
+    #     a trailing ellipsis (`...`), the caller will add it.
+    #
+    #   * **`"id"`** [String] ---
+    #     A programmer-readable unique identifier for this section. This is not
+    #     auto-generated to keep the log file readable.
+    #
+    #   This map may be empty. In this case, this proposal section will 
silently
+    #   be ignored. Proposal modules may use this if there is no useful 
proposal
+    #   at all. Use with caution - this may be confusing for the user.
+    #
+    #   In this case, all other proposal functions must return a useful success
+    #   value so they can be called without problems.
+    #
+    def description
+      raise NotImplementedError, "Calling abstract method 'description'"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/Makefile.am 
new/yast2-3.1.113/library/general/test/Makefile.am
--- old/yast2-3.1.111/library/general/test/Makefile.am  2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/Makefile.am  2014-12-01 
14:56:14.000000000 +0100
@@ -1,9 +1,12 @@
 TESTS = \
   asciifile_test.rb \
+  auto_client_test.rb \
+  finish_client_test.rb \
   hooks_test.rb \
   linuxrc_test.rb \
   os_release_test.rb \
   popup_test.rb \
+  proposal_client_test.rb \
   agents_test/proc_meminfo_agent_test.rb
 
 TEST_EXTENSIONS = .rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/asciifile_test.rb 
new/yast2-3.1.113/library/general/test/asciifile_test.rb
--- old/yast2-3.1.111/library/general/test/asciifile_test.rb    2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/asciifile_test.rb    2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,7 @@
 #! /usr/bin/env rspec
 
-require File.expand_path("../test_helper.rb", __FILE__)
+require_relative "test_helper"
 
-require "yast"
 include Yast
 
 Yast.import "AsciiFile"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/test/auto_client_test.rb 
new/yast2-3.1.113/library/general/test/auto_client_test.rb
--- old/yast2-3.1.111/library/general/test/auto_client_test.rb  1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/auto_client_test.rb  2014-12-01 
14:56:14.000000000 +0100
@@ -0,0 +1,176 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+require "installation/auto_client"
+
+class TestAuto < ::Installation::AutoClient
+  def import(args)
+    args.empty? ? "import" : args
+  end
+
+  ["export", "summary", "reset", "change", "write", "packages", "read", 
"modified?", "modified"].each do |m|
+    define_method(m.to_sym) { m }
+  end
+end
+
+describe ::Installation::AutoClient do
+  subject { ::TestAuto }
+  describe ".run" do
+    it "raise ArgumentError exception if unknown first argument is passed" do
+      allow(Yast::WFM).to receive(:Args).and_return(["Unknown", {}])
+      expect{::Installation::AutoClient.run}.to raise_error(ArgumentError)
+    end
+
+    context "first client argument is Import" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Import", {}])
+      end
+
+      it "dispatch call to abstract method import" do
+        expect(subject.run).to eq "import"
+      end
+
+      it "passes argument hash to abstract method" do
+        test_params = { :a => :b, :c => :d }
+        allow(Yast::WFM).to receive(:Args).and_return(["Import", test_params])
+
+        expect(subject.run).to eq test_params
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Export" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Export", {}])
+      end
+
+      it "dispatch call to abstract method export" do
+        expect(subject.run).to eq "export"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Summary" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Summary", {}])
+      end
+
+      it "dispatch call to abstract method summary" do
+        expect(subject.run).to eq "summary"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Reset" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Reset", {}])
+      end
+
+      it "dispatch call to abstract method reset" do
+        expect(subject.run).to eq "reset"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Change" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Change", {}])
+      end
+
+      it "dispatch call to abstract method change" do
+        expect(subject.run).to eq "change"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Write" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Write", {}])
+      end
+
+      it "dispatch call to abstract method write" do
+        expect(subject.run).to eq "write"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Read" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Read", {}])
+      end
+
+      it "dispatch call to abstract method read" do
+        expect(subject.run).to eq "read"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is GetModified" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["GetModified", {}])
+      end
+
+      it "dispatch call to abstract method modified?" do
+        expect(subject.run).to eq "modified?"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is SetModified" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["SetModified", {}])
+      end
+
+      it "dispatch call to abstract method modified" do
+        expect(subject.run).to eq "modified"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::AutoClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Packages" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Packages", {}])
+      end
+
+      it "dispatch call to abstract method packages" do
+        expect(subject.run).to eq "packages"
+      end
+
+      it "just log if optional abstract method not defined" do
+        expect{::Installation::AutoClient.run}.to_not raise_error
+      end
+
+      it "returns empty array if optional abstract method not defined" do
+        expect(::Installation::AutoClient.run).to eq []
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/test/finish_client_test.rb 
new/yast2-3.1.113/library/general/test/finish_client_test.rb
--- old/yast2-3.1.111/library/general/test/finish_client_test.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/finish_client_test.rb        
2014-12-01 14:56:14.000000000 +0100
@@ -0,0 +1,53 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+require "installation/finish_client"
+
+class TestFinish < ::Installation::FinishClient
+  def info
+    "info"
+  end
+
+  def write
+    "write"
+  end
+end
+
+describe ::Installation::FinishClient do
+  subject { ::TestFinish }
+  describe ".run" do
+    it "raise ArgumentError exception if unknown first argument is passed" do
+      allow(Yast::WFM).to receive(:Args).and_return(["Unknown", {}])
+      expect{::Installation::FinishClient.run}.to raise_error(ArgumentError)
+    end
+
+    context "first client argument is Info" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Info"])
+      end
+
+      it "dispatch call to abstract method info" do
+        expect(subject.run).to eq "info"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::FinishClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Write" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Write"])
+      end
+
+      it "dispatch call to abstract method write" do
+        expect(subject.run).to eq "write"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::FinishClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/hooks_test.rb 
new/yast2-3.1.113/library/general/test/hooks_test.rb
--- old/yast2-3.1.111/library/general/test/hooks_test.rb        2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/hooks_test.rb        2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,6 @@
 #! /usr/bin/env rspec
 
-require File.expand_path("../test_helper.rb", __FILE__)
-
-require "yast"
+require_relative "test_helper"
 
 module Yast
   import 'Hooks'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/linuxrc_test.rb 
new/yast2-3.1.113/library/general/test/linuxrc_test.rb
--- old/yast2-3.1.111/library/general/test/linuxrc_test.rb      2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/linuxrc_test.rb      2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,7 @@
 #!/usr/bin/env rspec
 
-require File.expand_path("../test_helper.rb", __FILE__)
+require_relative "test_helper"
 
-require "yast"
 include Yast
 
 Yast.import "Linuxrc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/test/os_release_test.rb 
new/yast2-3.1.113/library/general/test/os_release_test.rb
--- old/yast2-3.1.111/library/general/test/os_release_test.rb   2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/os_release_test.rb   2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,6 @@
 #! /usr/bin/env rspec
 
-require File.expand_path("../test_helper.rb", __FILE__)
-
-require "yast"
+require_relative "test_helper"
 
 Yast.import "OSRelease"
 Yast.import "FileUtils"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/popup_test.rb 
new/yast2-3.1.113/library/general/test/popup_test.rb
--- old/yast2-3.1.111/library/general/test/popup_test.rb        2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/popup_test.rb        2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,7 @@
 #! /usr/bin/env rspec
 
-require File.expand_path("../test_helper.rb", __FILE__)
+require_relative "test_helper"
 
-require "yast"
 include Yast
 
 Yast.import "Popup"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/general/test/proposal_client_test.rb 
new/yast2-3.1.113/library/general/test/proposal_client_test.rb
--- old/yast2-3.1.111/library/general/test/proposal_client_test.rb      
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/proposal_client_test.rb      
2014-12-01 14:56:14.000000000 +0100
@@ -0,0 +1,89 @@
+#! /usr/bin/env rspec
+
+require_relative "test_helper"
+
+require "installation/proposal_client"
+
+class TestProposal < ::Installation::ProposalClient
+  def make_proposal(args)
+    args.empty? ? "make_proposal" : args
+  end
+
+  def ask_user(args)
+    args.empty? ? "ask_user" : args
+  end
+
+  def description
+    "description"
+  end
+
+  def write(args)
+    args.empty? ? "write" : args
+  end
+end
+
+describe ::Installation::ProposalClient do
+  subject { ::TestProposal }
+  describe ".run" do
+    it "raise ArgumentError exception if unknown first argument is passed" do
+      allow(Yast::WFM).to receive(:Args).and_return(["Unknown", {}])
+      expect{::Installation::ProposalClient.run}.to raise_error(ArgumentError)
+    end
+
+    context "first client argument is MakeProposal" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["MakeProposal", {}])
+      end
+
+      it "dispatch call to abstract method make_proposal" do
+        expect(subject.run).to eq "make_proposal"
+      end
+
+      it "passes argument hash to abstract method" do
+        test_params = { :a => :b, :c => :d }
+        allow(Yast::WFM).to receive(:Args).and_return(["MakeProposal", 
test_params])
+
+        expect(subject.run).to eq test_params
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::ProposalClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is AskUser" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["AskUser", {}])
+      end
+
+      it "dispatch call to abstract method ask_user" do
+        expect(subject.run).to eq "ask_user"
+      end
+
+      it "passes argument hash to abstract method" do
+        test_params = { :a => :b, :c => :d }
+        allow(Yast::WFM).to receive(:Args).and_return(["AskUser", test_params])
+
+        expect(subject.run).to eq test_params
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::ProposalClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+
+    context "first client argument is Description" do
+      before do
+        allow(Yast::WFM).to receive(:Args).and_return(["Description", {}])
+      end
+
+      it "dispatch call to abstract method description" do
+        expect(subject.run).to eq "description"
+      end
+
+      it "raise NotImplementedError exception if abstract method not defined" 
do
+        expect{::Installation::ProposalClient.run}.to 
raise_error(NotImplementedError)
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/library/general/test/test_helper.rb 
new/yast2-3.1.113/library/general/test/test_helper.rb
--- old/yast2-3.1.111/library/general/test/test_helper.rb       2014-11-26 
10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/general/test/test_helper.rb       2014-12-01 
14:56:14.000000000 +0100
@@ -1,8 +1,9 @@
-
 top_srcdir = File.expand_path("../../../..", __FILE__)
 inc_dirs = Dir.glob("#{top_srcdir}/library/*/src")
 ENV["Y2DIR"] = inc_dirs.join(":")
 
+require "yast"
+
 def set_root_path(directory)
   check_version = false
   handle = Yast::WFM.SCROpen("chroot=#{directory}:scr", check_version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-3.1.111/library/packages/src/modules/PackageCallbacks.rb 
new/yast2-3.1.113/library/packages/src/modules/PackageCallbacks.rb
--- old/yast2-3.1.111/library/packages/src/modules/PackageCallbacks.rb  
2014-11-26 10:36:13.000000000 +0100
+++ new/yast2-3.1.113/library/packages/src/modules/PackageCallbacks.rb  
2014-12-01 14:56:14.000000000 +0100
@@ -2777,8 +2777,9 @@
           opened = true
         end
 
-        # set 100% as max value
-        Progress.New(task, "", 100, stages, [], help)
+        # set 100 + number of stages as the max value,
+        # Progress module counts stages as extra steps
+        Progress.New(task, "", 100 + stages.size, stages, [], help)
         Progress.Title(task)
         @last_stage = 0
       end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/package/yast2.changes 
new/yast2-3.1.113/package/yast2.changes
--- old/yast2-3.1.111/package/yast2.changes     2014-11-26 10:36:13.000000000 
+0100
+++ new/yast2-3.1.113/package/yast2.changes     2014-12-01 14:56:14.000000000 
+0100
@@ -1,8 +1,20 @@
 -------------------------------------------------------------------
+Mon Dec  1 12:23:34 UTC 2014 - lsle...@suse.cz
+
+- PackageCallbacks: fixed progress reporting (progress overflow was
+  caused by missing stage count)
+- 3.1.113
+
+-------------------------------------------------------------------
+Wed Nov 26 09:49:19 UTC 2014 - jreidin...@suse.com
+
+- Add base class for installation proposal and finish clients
+- 3.1.112
+
+-------------------------------------------------------------------
 Wed Nov 26 09:31:55 UTC 2014 - g...@opensuse.org
 
 - remove support for the unmaintained GTK UI plugin (bnc#901511)
-- 3.1.111
 
 -------------------------------------------------------------------
 Wed Nov 12 14:04:51 UTC 2014 - lsle...@suse.cz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-3.1.111/package/yast2.spec 
new/yast2-3.1.113/package/yast2.spec
--- old/yast2-3.1.111/package/yast2.spec        2014-11-26 10:36:13.000000000 
+0100
+++ new/yast2-3.1.113/package/yast2.spec        2014-12-01 14:56:14.000000000 
+0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2
-Version:        3.1.111
+Version:        3.1.113
 Release:        0
 URL:            https://github.com/yast/yast-yast2
 

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to