Hello community, here is the log from the commit of package rubygem-sexp_processor for openSUSE:Factory checked in at 2018-07-18 22:51:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-sexp_processor (Old) and /work/SRC/openSUSE:Factory/.rubygem-sexp_processor.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-sexp_processor" Wed Jul 18 22:51:31 2018 rev:29 rq:621035 version:4.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-sexp_processor/rubygem-sexp_processor.changes 2018-02-16 21:43:35.373430653 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-sexp_processor.new/rubygem-sexp_processor.changes 2018-07-18 22:52:27.431255910 +0200 @@ -1,0 +2,12 @@ +Wed Apr 11 09:48:52 UTC 2018 - factory-auto@kulow.org + +- updated to version 4.11.0 + see installed History.rdoc + + === 4.11.0 / 2018-04-05 + + * 1 minor enhancement: + + * Extended deep_each to skip subtrees if block returns :skip. + +------------------------------------------------------------------- Old: ---- sexp_processor-4.10.1.gem New: ---- sexp_processor-4.11.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-sexp_processor.spec ++++++ --- /var/tmp/diff_new_pack.JHbPte/_old 2018-07-18 22:52:27.783254743 +0200 +++ /var/tmp/diff_new_pack.JHbPte/_new 2018-07-18 22:52:27.787254730 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-sexp_processor -Version: 4.10.1 +Version: 4.11.0 Release: 0 %define mod_name sexp_processor %define mod_full_name %{mod_name}-%{version} ++++++ sexp_processor-4.10.1.gem -> sexp_processor-4.11.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/History.rdoc new/History.rdoc --- old/History.rdoc 2018-02-15 10:22:15.000000000 +0100 +++ new/History.rdoc 2018-04-06 00:55:28.000000000 +0200 @@ -1,3 +1,9 @@ +=== 4.11.0 / 2018-04-05 + +* 1 minor enhancement: + + * Extended deep_each to skip subtrees if block returns :skip. + === 4.10.1 / 2018-02-15 * 1 minor enhancement: Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/checksums.yaml.gz.sig new/checksums.yaml.gz.sig --- old/checksums.yaml.gz.sig 2018-02-15 10:22:15.000000000 +0100 +++ new/checksums.yaml.gz.sig 2018-04-06 00:55:28.000000000 +0200 @@ -1 +1,3 @@ -$^¿vÆ©‰Môw“¸Dþ2Fùýg•h·A”sõuv� 34H%‹×†¾È7»¬|‘øÖ5ýqø–FÄa1¦Ó½Õ;Z¾âÅeÆU··Çíê^Fr¤°2ãÛ2ÐØ‹Ââ4ƒŒe›ƒc¬Å¨O¢*¥� °=í0J„¯!4Šxºû•C!œò°Æk/½ã"ˆ—pŒ,kAõ× Ívõ :·s�ý«Ã@Q’¸å€I×ë’i»§ŸµWIÞïEÇIè;Lï+à„wQâ}¤í®"éªd×Esp¢J»<Ê©Æ!Af±Aý2Ì–TéÈî±Y#¥‘‚¬ÇéüM +Ú=¡v#pÚdlÉKé4„›]膖H%ÛQªÄ+a–ó(²ìÇcr¡Ñµë:NÏ”Å~Â’v4´ |©^ÈÝy¥øêŒ­Õ:HKeÓ@¾ÒOev!\cTõc:t©Åܺç¾pY'ÑúWV,¬¯Õ.¦E(9VÊ�)†ùMG“uÀ¥4ñb·ÿëuùó+Òáé\�ð¦5(�uý%ó`½ú:Û}†�°A£EÓ»yŸ†LÜ8€ÑÄÓÍ \ No newline at end of file Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sexp.rb new/lib/sexp.rb --- old/lib/sexp.rb 2018-02-15 10:22:15.000000000 +0100 +++ new/lib/sexp.rb 2018-04-06 00:55:28.000000000 +0200 @@ -86,12 +86,19 @@ ## # Recursively enumerates the sexp yielding to +block+ for every element. + # + # Returning :skip will stop traversing that subtree: + # + # sexp.deep_each do |s| + # next :skip if s.sexp_type == :if + # # ... + # end def deep_each &block return enum_for(:deep_each) unless block_given? self.each_sexp do |sexp| - block[sexp] + next if block[sexp] == :skip sexp.deep_each(&block) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/sexp_processor.rb new/lib/sexp_processor.rb --- old/lib/sexp_processor.rb 2018-02-15 10:22:15.000000000 +0100 +++ new/lib/sexp_processor.rb 2018-04-06 00:55:28.000000000 +0200 @@ -34,7 +34,7 @@ class SexpProcessor # duh - VERSION = "4.10.1" + VERSION = "4.11.0" ## # Automatically shifts off the Sexp type before handing the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-02-15 10:22:15.000000000 +0100 +++ new/metadata 2018-04-06 00:55:28.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: sexp_processor version: !ruby/object:Gem::Version - version: 4.10.1 + version: 4.11.0 platform: ruby authors: - Ryan Davis @@ -29,7 +29,7 @@ AhXhF6Wi2GTMezlj5jlI5XV7WsJUSwTp/YiVvcmT74ZaCRvexm6EnNhkrvJJ1Xeu V+HB+LYYhXWitInO/eXxDrFB -----END CERTIFICATE----- -date: 2018-02-15 00:00:00.000000000 Z +date: 2018-04-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rdoc Binary files old/metadata.gz.sig and new/metadata.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_sexp.rb new/test/test_sexp.rb --- old/test/test_sexp.rb 2018-02-15 10:22:15.000000000 +0100 +++ new/test/test_sexp.rb 2018-04-06 00:55:28.000000000 +0200 @@ -641,15 +641,28 @@ assert_equal 5, s(:a, s(:b, s(:c, s(:d, s(:e))))).depth end + DEEP_EXP = [:lasgn, :str, :if, + :and, :true, :lit, + :if, :lvar, :str, :true] + def test_deep_each - result = [] - @complex_sexp.deep_each { |s| result << s if s.sexp_type == :if } - assert_equal [:if, :if], result.map { |k, _| k } + act = [] + + @complex_sexp.deep_each { |s| act << s } + assert_equal DEEP_EXP, act.map { |k, _| k } + end + + def test_deep_each_skip + exp = DEEP_EXP.first(3) + DEEP_EXP.last(4) + act = [] + + @complex_sexp.deep_each { |s| next :skip if s.sexp_type == :and; act << s } + assert_equal exp, act.map { |k, _| k } end def test_deep_each_without_block assert_kind_of Enumerator, @complex_sexp.deep_each - assert_equal [:if, :if], @complex_sexp.deep_each.select { |s, _| s == :if }.map { |k, _| k } + assert_equal DEEP_EXP, @complex_sexp.deep_each.map(&:first) end def test_unary_not