Hello community, here is the log from the commit of package rubygem-slop for openSUSE:Factory checked in at 2018-03-06 10:46:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-slop (Old) and /work/SRC/openSUSE:Factory/.rubygem-slop.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-slop" Tue Mar 6 10:46:03 2018 rev:22 rq:581503 version:4.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-slop/rubygem-slop.changes 2017-12-07 13:51:22.570649523 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-slop.new/rubygem-slop.changes 2018-03-06 10:46:03.994931417 +0100 @@ -1,0 +2,14 @@ +Tue Feb 27 05:34:59 UTC 2018 - [email protected] + +- updated to version 4.6.1 + see installed CHANGELOG.md + + v4.6.1 (2017-11-20) + ------------------- + + Bug fixes/Enhancements + * Fix separator so it doesn't mutate user data. #223 (Marc-André Lafortune) + * Add additional tests for `Options#separator` and fix issue where + the last separator was ignored. #222 + +------------------------------------------------------------------- Old: ---- slop-4.6.0.gem New: ---- slop-4.6.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-slop.spec ++++++ --- /var/tmp/diff_new_pack.gKRwAY/_old 2018-03-06 10:46:04.998895149 +0100 +++ /var/tmp/diff_new_pack.gKRwAY/_new 2018-03-06 10:46:05.002895005 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-slop # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-slop -Version: 4.6.0 +Version: 4.6.1 Release: 0 %define mod_name slop %define mod_full_name %{mod_name}-%{version} ++++++ slop-4.6.0.gem -> slop-4.6.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2017-10-06 14:34:48.000000000 +0200 +++ new/CHANGELOG.md 2017-11-20 20:10:41.000000000 +0100 @@ -1,6 +1,14 @@ Changelog ========= +v4.6.1 (2017-11-20) +------------------- + +Bug fixes/Enhancements + * Fix separator so it doesn't mutate user data. #223 (Marc-André Lafortune) + * Add additional tests for `Options#separator` and fix issue where + the last separator was ignored. #222 + v4.6.0 (2017-10-06) ------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-10-06 14:34:48.000000000 +0200 +++ new/README.md 2017-11-20 20:10:41.000000000 +0100 @@ -30,14 +30,15 @@ end end -ARGV #=> -v --host 192.168.0.1 --check-ssl-certificate +ARGV #=> -v --login alice --host 192.168.0.1 --check-ssl-certificate opts[:host] #=> 192.168.0.1 +opts[:login] #=> alice opts.verbose? #=> true opts.quiet? #=> false opts.check_ssl_certificate? #=> true -opts.to_hash #=> { host: "192.168.0.1", port: 80, verbose: true, quiet: false, check_ssl_certificate: true } +opts.to_hash #=> { host: "192.168.0.1", login: "alice", port: 80, verbose: true, quiet: false, check_ssl_certificate: true } ``` Note that the block we've added to the `--version` flag will be executed Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/slop/options.rb new/lib/slop/options.rb --- old/lib/slop/options.rb 2017-10-06 14:34:48.000000000 +0200 +++ new/lib/slop/options.rb 2017-11-20 20:10:41.000000000 +0100 @@ -61,7 +61,7 @@ # the help text. def separator(string) if separators[options.size] - separators.last << "\n#{string}" + separators[-1] += "\n#{string}" else separators[options.size] = string end @@ -111,6 +111,10 @@ str << "#{prefix}#{opt.to_s(offset: len)}\n" end + if sep = separators[options.size] + str << "#{sep}\n" + end + str end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/slop.rb new/lib/slop.rb --- old/lib/slop.rb 2017-10-06 14:34:48.000000000 +0200 +++ new/lib/slop.rb 2017-11-20 20:10:41.000000000 +0100 @@ -6,7 +6,7 @@ require 'slop/error' module Slop - VERSION = '4.6.0' + VERSION = '4.6.1' # Parse an array of options (defaults to ARGV). Accepts an # optional hash of configuration options and block. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2017-10-06 14:34:48.000000000 +0200 +++ new/metadata 2017-11-20 20:10:41.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: slop version: !ruby/object:Gem::Version - version: 4.6.0 + version: 4.6.1 platform: ruby authors: - Lee Jarvis autorequire: bindir: bin cert_chain: [] -date: 2017-10-06 00:00:00.000000000 Z +date: 2017-11-20 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -87,7 +87,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.13 +rubygems_version: 2.5.2.1 signing_key: specification_version: 4 summary: Simple Lightweight Option Parsing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/options_test.rb new/test/options_test.rb --- old/test/options_test.rb 2017-10-06 14:34:48.000000000 +0200 +++ new/test/options_test.rb 2017-11-20 20:10:41.000000000 +0100 @@ -36,6 +36,36 @@ end end + describe "#separator" do + it "appends separators between options in order" do + @options.separator("foo") + @options.on("--foo") + @options.separator("bar") + + assert_equal ["foo", "bar"], @options.separators + end + + it "appends strings to the last separator if no options exist" do + @options.separator("foo") + @options.separator("bar") + + assert_equal ["foo\nbar"], @options.separators + end + + it "includes separators in the help text" do + @options.on("--foo") + @options.separator("bar") + + help = @options.to_s.squeeze(" ") + assert help.end_with?("--foo \nbar\n") + end + + it "accepts a frozen argument, even when called multiple times for the same option" do + @options.separator("foo".freeze) + @options.separator("bar".freeze) + end + end + describe "#method_missing" do it "uses the method name as an option type" do option = @options.string("--name") @@ -86,7 +116,7 @@ describe "custom banner" do it "is prefixed with defined banner" do @options_config = Slop::Options.new({banner: "custom banner"}) - assert_match(/^custom banner/, @options_config.to_s) + assert_match(/^custom banner/, @options_config.to_s) end it "banner is disabled" do @options_config = Slop::Options.new({banner: false})
