Script 'mail_helper' called by ro
Hello packager,
This is just FYI. Your package was checked in in distribution "sle12"
by autobuild-member: ro.
Here comes the log...
---------------------------%<------------------------------
Hi,
here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-ruby-bindings -> sle12
## BNC# 877758 : "warnings from Yast::Ops.get_foo do not show the caller" (ASSIGNED/)
Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-ruby-bindings/yast2-ruby-bindings.changes 2014-07-25 16:14:50.000000000 +0200
+++ /mounts/work_src_done/SLE12/yast2-ruby-bindings/yast2-ruby-bindings.changes 2014-08-05 15:25:17.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Jul 30 14:27:09 UTC 2014 - mvidner@suse.com
+
+- Fixed to report the right frame for Ops.get_foo (bnc#877758).
+- Futureproof tests for RSpec 3 even more, avoid be_true.
+- 3.1.23
+
+-------------------------------------------------------------------
calling whatdependson for sle12-i586
Packages directly triggered for rebuild:
- yast2-ruby-bindings
- at least 77 other packages
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/SUSE:SLE-12:GA/yast2-ruby-bindings (Old)
and /mounts/work_src_done/SLE12/yast2-ruby-bindings (BS:build ID:42245 MAIL:yast-commit@opensuse.org) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-ruby-bindings", Maintainer is "yast-commit@opensuse.org"
Old:
----
yast2-ruby-bindings-3.1.22.tar.bz2
New:
----
yast2-ruby-bindings-3.1.23.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-ruby-bindings.spec ++++++
--- /var/tmp/diff_new_pack.yZUnnN/_old 2014-08-06 16:43:42.000000000 +0200
+++ /var/tmp/diff_new_pack.yZUnnN/_new 2014-08-06 16:43:42.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.22
+Version: 3.1.23
Url: https://github.com/yast/yast-ruby-bindings
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-ruby-bindings-3.1.22.tar.bz2 -> yast2-ruby-bindings-3.1.23.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.changes new/yast2-ruby-bindings-3.1.23/package/yast2-ruby-bindings.changes
--- old/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.changes 2014-07-25 15:50:58.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.23/package/yast2-ruby-bindings.changes 2014-08-05 15:20:35.000000000 +0200
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Jul 30 14:27:09 UTC 2014 - mvidner@suse.com
+
+- Fixed to report the right frame for Ops.get_foo (bnc#877758).
+- Futureproof tests for RSpec 3 even more, avoid be_true.
+- 3.1.23
+
+-------------------------------------------------------------------
Wed Jul 23 17:18:58 CEST 2014 - locilka@suse.com
- Builtins.mapmap newly only accepts Hash, otherwise raises
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.spec new/yast2-ruby-bindings-3.1.23/package/yast2-ruby-bindings.spec
--- old/yast2-ruby-bindings-3.1.22/package/yast2-ruby-bindings.spec 2014-07-25 15:50:58.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.23/package/yast2-ruby-bindings.spec 2014-08-05 15:20:35.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-ruby-bindings
-Version: 3.1.22
+Version: 3.1.23
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.22/src/ruby/yast/ops.rb new/yast2-ruby-bindings-3.1.23/src/ruby/yast/ops.rb
--- old/yast2-ruby-bindings-3.1.22/src/ruby/yast/ops.rb 2014-07-25 15:50:58.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.23/src/ruby/yast/ops.rb 2014-08-05 15:20:35.000000000 +0200
@@ -45,15 +45,16 @@
]
Ops::SHORTCUT_TYPES.each do |type|
- eval < 0).to be_true
+ expect(Yast::Builtins.time).to be > 0
end
it "tests find string" do
@@ -345,7 +345,7 @@
end
it "tests srandom" do
- expect(Yast::Builtins.srandom() > 0).to be_true
+ expect(Yast::Builtins.srandom()).to be > 0
expect(Yast::Builtins.srandom(10)).to eq(nil)
end
@@ -742,7 +742,7 @@
# there is quite nice chance with this repetition to test even border or range
100.times do
- expect((0..9).include? Yast::Builtins.random(10)).to be_true
+ expect(0..9).to cover Yast::Builtins.random(10)
end
end
@@ -838,7 +838,7 @@
# crypt is salted so cannot reproduce, just test if run and returns something useful
["", "md5", "blowfish", "sha256", "sha512"].each do |suffix|
res = Yast::Builtins.send(:"crypt#{suffix}", "test")
- expect(res).to be_true
+ expect(res).to be_a String
expect(res.size).to be > 10
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.22/tests/ruby/exportable_spec.rb new/yast2-ruby-bindings-3.1.23/tests/ruby/exportable_spec.rb
--- old/yast2-ruby-bindings-3.1.22/tests/ruby/exportable_spec.rb 2014-07-25 15:50:59.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.23/tests/ruby/exportable_spec.rb 2014-08-05 15:20:35.000000000 +0200
@@ -33,7 +33,6 @@
end
it "tests publish variables" do
- expect(MyTest.class.published_variables[:variable_a]).to be_true
expect(MyTest.class.published_variables[:variable_a].type).to eq("map")
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-ruby-bindings-3.1.22/tests/ruby/ops_spec.rb new/yast2-ruby-bindings-3.1.23/tests/ruby/ops_spec.rb
--- old/yast2-ruby-bindings-3.1.22/tests/ruby/ops_spec.rb 2014-07-25 15:50:59.000000000 +0200
+++ new/yast2-ruby-bindings-3.1.23/tests/ruby/ops_spec.rb 2014-08-05 15:20:35.000000000 +0200
@@ -117,48 +117,104 @@
expect(Yast::Ops.less_than({"a" => 1, 1 => 2},{"a" => 1, "b" => 2})).to eq(true)
end
- it "tests get map" do
- map = { "a" => { "b" => "c" }}
- expect(Yast::Ops.get(map,"a","n")).to eq({ "b" => "c"})
- expect(Yast::Ops.get(map,["a","b"],"n")).to eq("c")
- expect(Yast::Ops.get(map,["a","c"],"n")).to eq("n")
- expect(Yast::Ops.get(map,["c","b"],"n")).to eq("n")
- expect(Yast::Ops.get(map,["c","b"]){ "n" }).to eq("n")
- end
-
- it "tests get list" do
- list = [["a","b"]]
- expect(Yast::Ops.get(list,0,"n")).to eq(["a","b"])
- expect(Yast::Ops.get(list,[0,1],"n")).to eq("b")
- expect(Yast::Ops.get(list,[0,2],"n")).to eq("n")
- expect(Yast::Ops.get(list,[1,1],"n")).to eq("n")
- end
-
- it "tests get term" do
- term = Yast::Term.new(:a,"a","b")
- expect(Yast::Ops.get(term,1,"n")).to eq("b")
- expect(Yast::Ops.get(term,[2],"n")).to eq("n")
- end
-
- it "tests get mixture" do
- map_list = { "a" => ["b","c"]}
- expect(Yast::Ops.get(map_list,["a",1],"n")).to eq("c")
- expect(Yast::Ops.get(map_list,["a",2],"n")).to eq("n")
- map_term = { "a" => Yast::Term.new(:a,"b","c")}
- expect(Yast::Ops.get(map_term,["a",1],"n")).to eq("c")
- expect(Yast::Ops.get(map_term,["a",2],"n")).to eq("n")
- end
-
- it "tests get corner cases" do
- list = ["a"]
- expect(Yast::Ops.get(list,["a"],"n")).to eq("n")
- expect(Yast::Ops.get(list,[0,0],"n")).to eq("n")
- end
-
- it "tests get shortcuts" do
- list = ["a","b"]
- expect(Yast::Ops.get_string(list,0,"n")).to eq("a")
- expect(Yast::Ops.get_integer(list,0,"n")).to eq(nil)
+ describe "Ops.get" do
+ context "when the container is a map" do
+ let(:map) { { "a" => { "b" => "c" }} }
+
+ it "returns value if key exists" do
+ expect(Yast::Ops.get(map,"a","n")).to eq({ "b" => "c"})
+ end
+
+ it "supports nested access with list of keys" do
+ expect(Yast::Ops.get(map,["a","b"],"n")).to eq("c")
+ end
+
+ it "returns default if any key is not available" do
+ expect(Yast::Ops.get(map,["a","c"],"n")).to eq("n")
+ expect(Yast::Ops.get(map,["c","b"],"n")).to eq("n")
+ end
+
+ it "support blocks for default where it return result of block" do
+ expect(Yast::Ops.get(map,["c","b"]){ "n" }).to eq("n")
+ end
+ end
+
+ context "when the container is a list" do
+ let(:list) { [["a","b"]] }
+ let(:list2) { ["a"] }
+
+ it "returns value if key exists" do
+ expect(Yast::Ops.get(list,0,"n")).to eq(["a","b"])
+ end
+
+ it "supports nested access with list of keys" do
+ expect(Yast::Ops.get(list,[0,1],"n")).to eq("b")
+ expect(Yast::Ops.get(list,[0,2],"n")).to eq("n")
+ expect(Yast::Ops.get(list,[1,1],"n")).to eq("n")
+ end
+
+ it "returns default value when indexing with a non-integer" do
+ expect(Yast::Ops.get(list2,["a"],"n")).to eq("n")
+ end
+
+ it "returns default value for too many indices" do
+ expect(Yast::Ops.get(list2,[0,0],"n")).to eq("n")
+ end
+ end
+
+ context "when the container is a term" do
+ let(:term) { Yast::Term.new(:a,"a","b") }
+
+ it "returns value if key exists" do
+ expect(Yast::Ops.get(term,1,"n")).to eq("b")
+ end
+
+ it "returns default if FIXME" do
+ expect(Yast::Ops.get(term,[2],"n")).to eq("n")
+ end
+ end
+
+ context "when the container is heterogeneous" do
+ let(:map_list) { { "a" => ["b","c"]} }
+ let(:map_term) { { "a" => Yast::Term.new(:a,"b","c")} }
+
+ it "supports nested access with list of keys" do
+ expect(Yast::Ops.get(map_list,["a",1],"n")).to eq("c")
+ expect(Yast::Ops.get(map_term,["a",1],"n")).to eq("c")
+ end
+
+ it "returns default if any key is not available" do
+ expect(Yast::Ops.get(map_list,["a",2],"n")).to eq("n")
+ expect(Yast::Ops.get(map_term,["a",2],"n")).to eq("n")
+ end
+ end
+ end
+
+ describe "Ops.get_foo shortcuts" do
+ let(:list) { ["a","b"] }
+
+ it "returns .get result for a matching type" do
+ expect(Yast::Ops.get_string(list,0,"n")).to eq("a")
+ end
+
+ it "returns nil for a mismatching type" do
+ expect(Yast::Ops.get_integer(list,0,"n")).to eq(nil)
+ end
+
+ it "warns when the container is nil" do
+ any_frame = kind_of(Integer)
+ expect(Yast).to receive(:y2milestone).with(any_frame, /called on nil/)
+ Yast::Ops.get_string(nil, 0, "n")
+ end
+
+ it "reports the right location when warning" do
+ # The internal method that sees the file is:
+ # y2_logger(log_level, component, file, line, method, format, args)
+ line = __LINE__ + 3 # this must be the line where get_string is called
+ expect(Yast).to receive(:y2_logger).
+ with(kind_of(Integer), "Ruby", __FILE__, line, //, //)
+ Yast::Ops.get_string(nil, 0, "n")
+ end
end
it "tests set" do
@@ -424,12 +480,12 @@
end
it "tests is" do
- expect(Yast::Ops.is("t", "string")).to be_true
- expect(!Yast::Ops.is("t", "integer")).to be_true
+ expect(Yast::Ops.is("t", "string")).to be true
+ expect(Yast::Ops.is("t", "integer")).to be false
end
it "tests is shortcut" do
- expect(Yast::Ops.is_string?("t")).to be_true
- expect(!Yast::Ops.is_void?("t")).to be_true
+ expect(Yast::Ops.is_string?("t")).to be true
+ expect(Yast::Ops.is_void?("t")).to be false
end
end
continue with "q"...
Checked in at Wed Aug 6 16:43:58 CEST 2014 by ro
Remember to have fun...
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org