Hello community, here is the log from the commit of package yast2-ruby-bindings for openSUSE:Factory checked in at 2014-06-18 10:59:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-01 18:56:08.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-ruby-bindings.new/yast2-ruby-bindings.changes 2014-06-18 10:59:32.000000000 +0200 @@ -1,0 +2,19 @@ +Tue Jun 10 12:41:14 UTC 2014 - jreidinger@suse.com + +- fix comparison of float and integer (bnc#865037) +- 3.1.21 + +------------------------------------------------------------------- +Tue Jun 3 17:52:12 UTC 2014 - jreidinger@suse.com + +- fix crash of n_ as now textdomain is array (bnc#881124) +- 3.1.20 + +------------------------------------------------------------------- +Mon Jun 2 14:29:54 UTC 2014 - mvidner@suse.com + +- Converted "should" to "expect" in RSpec, + to be prepared for rspec-3.0. +- 3.1.19 + +------------------------------------------------------------------- Old: ---- yast2-ruby-bindings-3.1.18.tar.bz2 New: ---- yast2-ruby-bindings-3.1.21.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-ruby-bindings.spec ++++++ --- /var/tmp/diff_new_pack.KqjEj5/_old 2014-06-18 10:59:33.000000000 +0200 +++ /var/tmp/diff_new_pack.KqjEj5/_new 2014-06-18 10:59:33.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 3.1.18 +Version: 3.1.21 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: yast2-ruby-bindings-%{version}.tar.bz2 ++++++ yast2-ruby-bindings-3.1.18.tar.bz2 -> yast2-ruby-bindings-3.1.21.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.changes --- old/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.changes 2014-05-30 10:26:45.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.changes 2014-06-10 15:51:27.000000000 +0200 @@ -1,4 +1,23 @@ ------------------------------------------------------------------- +Tue Jun 10 12:41:14 UTC 2014 - jreidinger@suse.com + +- fix comparison of float and integer (bnc#865037) +- 3.1.21 + +------------------------------------------------------------------- +Tue Jun 3 17:52:12 UTC 2014 - jreidinger@suse.com + +- fix crash of n_ as now textdomain is array (bnc#881124) +- 3.1.20 + +------------------------------------------------------------------- +Mon Jun 2 14:29:54 UTC 2014 - mvidner@suse.com + +- Converted "should" to "expect" in RSpec, + to be prepared for rspec-3.0. +- 3.1.19 + +------------------------------------------------------------------- Thu May 29 15:03:23 UTC 2014 - jreidinger@suse.com - fix translation if mixture of textdomain are used in included diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.spec --- old/yast2-ruby-bindings-3.1.18/package/yast2-ruby-bindings.spec 2014-05-30 10:26:45.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/package/yast2-ruby-bindings.spec 2014-06-10 15:51:27.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-ruby-bindings -Version: 3.1.18 +Version: 3.1.21 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.18/src/ruby/yast/i18n.rb new/yast2-ruby-bindings-3.1.21/src/ruby/yast/i18n.rb --- old/yast2-ruby-bindings-3.1.18/src/ruby/yast/i18n.rb 2014-05-30 10:26:45.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/src/ruby/yast/i18n.rb 2014-06-10 15:51:27.000000000 +0200 @@ -43,9 +43,8 @@ # no textdomain configured yet return str unless @my_textdomain - old_text_domain = FastGettext.text_domain # Switching textdomain clears gettext caches so avoid it if possible. - if !@my_textdomain.include?(old_text_domain) || + if !@my_textdomain.include?(FastGettext.text_domain) || !FastGettext.key_exist?(str) # Set domain where key is defined. @my_textdomain.each do |domain| @@ -54,8 +53,6 @@ end end FastGettext::Translation::_ str - ensure - FastGettext.text_domain = old_text_domain end # No translation, only marks the text to be found by gettext when creating POT file, @@ -102,11 +99,17 @@ # no textdomain configured yet return (num == 1) ? singular : plural unless @my_textdomain - old_text_domain = FastGettext.text_domain - FastGettext.text_domain = @my_textdomain + # Switching textdomain clears gettext caches so avoid it if possible. + # difference between _ and n_ is hat we need special cache for plural forms + if !@my_textdomain.include?(FastGettext.text_domain) || + !FastGettext.cached_plural_find(singular, plural) + # Set domain where key is defined. + @my_textdomain.each do |domain| + FastGettext.text_domain = domain + break if FastGettext.cached_plural_find(singular, plural) + end + end FastGettext::Translation::n_(singular, plural, num) - ensure - FastGettext.text_domain = old_text_domain end private @@ -137,6 +140,5 @@ lang end - end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.18/src/ruby/yast/ops.rb new/yast2-ruby-bindings-3.1.21/src/ruby/yast/ops.rb --- old/yast2-ruby-bindings-3.1.18/src/ruby/yast/ops.rb 2014-05-30 10:26:45.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/src/ruby/yast/ops.rb 2014-06-10 15:51:27.000000000 +0200 @@ -468,8 +468,7 @@ @value <=> second end else - if ((@value.class == Fixnum && second.class == Bignum) || - @value.class == Bignum && second.class == Fixnum) + if @value.is_a?(::Numeric) && second.is_a?(::Numeric) return @value <=> second end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.18/tests/ruby/ops_spec.rb new/yast2-ruby-bindings-3.1.21/tests/ruby/ops_spec.rb --- old/yast2-ruby-bindings-3.1.18/tests/ruby/ops_spec.rb 2014-05-30 10:26:46.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/tests/ruby/ops_spec.rb 2014-06-10 15:51:28.000000000 +0200 @@ -35,6 +35,12 @@ expect(Yast::Ops.greater_or_equal(2.0,2.1)).to eq(false) end + it "properly compare between int and float" do + expect(Yast::Ops.less_than(1,1.1)).to eq(true) + expect(Yast::Ops.less_than(1.1,1)).to eq(false) + expect(Yast::Ops.greater_than(44.5, 10000)).to eq(false) + end + it "tests comparison string" do expect(Yast::Ops.less_than("s","sa")).to eq(true) expect(Yast::Ops.less_or_equal("s","s")).to eq(true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.18/tests/ruby/y2logger_spec.rb new/yast2-ruby-bindings-3.1.21/tests/ruby/y2logger_spec.rb --- old/yast2-ruby-bindings-3.1.18/tests/ruby/y2logger_spec.rb 2014-05-30 10:26:46.000000000 +0200 +++ new/yast2-ruby-bindings-3.1.21/tests/ruby/y2logger_spec.rb 2014-06-10 15:51:28.000000000 +0200 @@ -14,32 +14,32 @@ end it "logs debug messages via y2debug()" do - Yast.should_receive(:y2debug).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2debug).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.debug TEST_MESSAGE end it "logs info messages via y2milestone()" do - Yast.should_receive(:y2milestone).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2milestone).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.info TEST_MESSAGE end it "logs warnings via y2warning()" do - Yast.should_receive(:y2warning).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2warning).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.warn TEST_MESSAGE end it "logs errors via y2error()" do - Yast.should_receive(:y2error).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2error).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.error TEST_MESSAGE end it "logs fatal errors via y2error()" do - Yast.should_receive(:y2error).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2error).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.fatal TEST_MESSAGE end it "handles a message passed via block" do - Yast.should_receive(:y2milestone).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) + expect(Yast).to receive(:y2milestone).with(Y2Logger::CALL_FRAME, TEST_MESSAGE) @test_logger.info { TEST_MESSAGE } end end -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org