Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-thor for openSUSE:Factory checked in at 2021-02-20 22:12:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-thor (Old) and /work/SRC/openSUSE:Factory/.rubygem-thor.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-thor" Sat Feb 20 22:12:10 2021 rev:23 rq:869954 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-thor/rubygem-thor.changes 2019-12-21 12:32:37.619398777 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-thor.new.28504/rubygem-thor.changes 2021-02-20 22:12:15.455036991 +0100 @@ -1,0 +2,12 @@ +Sat Feb 6 11:37:41 UTC 2021 - Manuel Schnitzer <[email protected]> + +- updated to version 1.1.0 + + * Don't use ANSI colors when terminal is dumb. + * Ensure default option/argument is not erroneously aliased. + * Fixes a bug in the calculation of the print_wrapped method. + * Obey `:mute` and `options[:quiet]` in `Shell#say`. + * Support Ruby 3.0. + * Add force option to the `gsub_file` action. + +------------------------------------------------------------------- Old: ---- thor-1.0.1.gem New: ---- thor-1.1.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-thor.spec ++++++ --- /var/tmp/diff_new_pack.kUZviS/_old 2021-02-20 22:12:15.859037420 +0100 +++ /var/tmp/diff_new_pack.kUZviS/_new 2021-02-20 22:12:15.863037424 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-thor # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # 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-thor -Version: 1.0.1 +Version: 1.1.0 Release: 0 %define mod_name thor %define mod_full_name %{mod_name}-%{version} @@ -33,7 +33,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives -Url: http://whatisthor.com/ +URL: http://whatisthor.com/ Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Thor is a toolkit for building powerful command-line interfaces ++++++ thor-1.0.1.gem -> thor-1.1.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2019-12-17 16:13:21.000000000 +0100 +++ new/CHANGELOG.md 2021-01-20 17:54:19.000000000 +0100 @@ -1,3 +1,11 @@ +# 1.1.0 +* Don't use ANSI colors when terminal is dumb. +* Ensure default option/argument is not erroneously aliased. +* Fixes a bug in the calculation of the print_wrapped method. +* Obey `:mute` and `options[:quiet]` in `Shell#say`. +* Support Ruby 3.0. +* Add force option to the `gsub_file` action. + # 1.0.1 * Fix thor when `thor/base` and `thor/group` are required without `thor.rb`. * Handle relative source path in `create_link`. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/actions/file_manipulation.rb new/lib/thor/actions/file_manipulation.rb --- old/lib/thor/actions/file_manipulation.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/actions/file_manipulation.rb 2021-01-20 17:54:19.000000000 +0100 @@ -251,7 +251,8 @@ # path<String>:: path of the file to be changed # flag<Regexp|String>:: the regexp or string to be replaced # replacement<String>:: the replacement, can be also given as a block - # config<Hash>:: give :verbose => false to not log the status. + # config<Hash>:: give :verbose => false to not log the status, and + # :force => true, to force the replacement regardles of runner behavior. # # ==== Example # @@ -262,9 +263,10 @@ # end # def gsub_file(path, flag, *args, &block) - return unless behavior == :invoke config = args.last.is_a?(Hash) ? args.pop : {} + return unless behavior == :invoke || config.fetch(:force, false) + path = File.expand_path(path, destination_root) say_status :gsub, relative_to_original_destination_root(path), config.fetch(:verbose, true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/actions.rb new/lib/thor/actions.rb --- old/lib/thor/actions.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/actions.rb 2021-01-20 17:54:19.000000000 +0100 @@ -219,7 +219,7 @@ contents = if is_uri require "open-uri" - open(path, "Accept" => "application/x-thor-template", &:read) + URI.open(path, "Accept" => "application/x-thor-template", &:read) else open(path, &:read) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/error.rb new/lib/thor/error.rb --- old/lib/thor/error.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/error.rb 2021-01-20 17:54:19.000000000 +0100 @@ -1,5 +1,5 @@ class Thor - Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) + Correctable = if defined?(DidYouMean::SpellChecker) && defined?(DidYouMean::Correctable) # rubocop:disable Naming/ConstantName # In order to support versions of Ruby that don't have keyword # arguments, we need our own spell checker class that doesn't take key # words. Even though this code wouldn't be hit because of the check diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/parser/arguments.rb new/lib/thor/parser/arguments.rb --- old/lib/thor/parser/arguments.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/parser/arguments.rb 2021-01-20 17:54:19.000000000 +0100 @@ -30,7 +30,11 @@ arguments.each do |argument| if !argument.default.nil? - @assigns[argument.human_name] = argument.default + begin + @assigns[argument.human_name] = argument.default.dup + rescue TypeError # Compatibility shim for un-dup-able Fixnum in Ruby < 2.4 + @assigns[argument.human_name] = argument.default + end elsif argument.required? @non_assigned_required << argument end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/parser/options.rb new/lib/thor/parser/options.rb --- old/lib/thor/parser/options.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/parser/options.rb 2021-01-20 17:54:19.000000000 +0100 @@ -133,15 +133,16 @@ protected - def assign_result!(option, result) - if option.repeatable && option.type == :hash - (@assigns[option.human_name] ||= {}).merge!(result) - elsif option.repeatable - (@assigns[option.human_name] ||= []) << result - else - @assigns[option.human_name] = result + def assign_result!(option, result) + if option.repeatable && option.type == :hash + (@assigns[option.human_name] ||= {}).merge!(result) + elsif option.repeatable + (@assigns[option.human_name] ||= []) << result + else + @assigns[option.human_name] = result + end end - end + # Check if the current value in peek is a registered switch. # # Two booleans are returned. The first is true if the current value diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/shell/basic.rb new/lib/thor/shell/basic.rb --- old/lib/thor/shell/basic.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/shell/basic.rb 2021-01-20 17:54:19.000000000 +0100 @@ -94,6 +94,8 @@ # say("I know you knew that.") # def say(message = "", color = nil, force_new_line = (message.to_s !~ /( |\t)\Z/)) + return if quiet? + buffer = prepare_message(message, *color) buffer << "\n" if force_new_line && !message.to_s.end_with?("\n") @@ -230,8 +232,9 @@ paras = message.split("\n\n") paras.map! do |unwrapped| - counter = 0 - unwrapped.split(" ").inject do |memo, word| + words = unwrapped.split(" ") + counter = words.first.length + words.inject do |memo, word| word = word.gsub(/\n\005/, "\n").gsub(/\005/, "\n") counter = 0 if word.include? "\n" if (counter + word.length + 1) < width diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/shell/color.rb new/lib/thor/shell/color.rb --- old/lib/thor/shell/color.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/shell/color.rb 2021-01-20 17:54:19.000000000 +0100 @@ -97,7 +97,11 @@ protected def can_display_colors? - stdout.tty? && !are_colors_disabled? + are_colors_supported? && !are_colors_disabled? + end + + def are_colors_supported? + stdout.tty? && ENV["TERM"] != "dumb" end def are_colors_disabled? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor/version.rb new/lib/thor/version.rb --- old/lib/thor/version.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor/version.rb 2021-01-20 17:54:19.000000000 +0100 @@ -1,3 +1,3 @@ class Thor - VERSION = "1.0.1" + VERSION = "1.1.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/thor.rb new/lib/thor.rb --- old/lib/thor.rb 2019-12-17 16:13:21.000000000 +0100 +++ new/lib/thor.rb 2021-01-20 17:54:19.000000000 +0100 @@ -1,7 +1,7 @@ -require "set" require_relative "thor/base" class Thor + $thor_runner ||= false class << self # Allows for custom "Command" package naming. # @@ -323,7 +323,7 @@ # ==== Parameters # Symbol ...:: A list of commands that should be affected. def stop_on_unknown_option!(*command_names) - stop_on_unknown_option.merge(command_names) + @stop_on_unknown_option = stop_on_unknown_option | command_names end def stop_on_unknown_option?(command) #:nodoc: @@ -337,7 +337,7 @@ # ==== Parameters # Symbol ...:: A list of commands that should be affected. def disable_required_check!(*command_names) - disable_required_check.merge(command_names) + @disable_required_check = disable_required_check | command_names end def disable_required_check?(command) #:nodoc: @@ -347,12 +347,12 @@ protected def stop_on_unknown_option #:nodoc: - @stop_on_unknown_option ||= Set.new + @stop_on_unknown_option ||= [] end # help command has the required check disabled by default. def disable_required_check #:nodoc: - @disable_required_check ||= Set.new([:help]) + @disable_required_check ||= [:help] end # The method responsible for dispatching given the args. @@ -398,7 +398,6 @@ # the namespace should be displayed as arguments. # def banner(command, namespace = nil, subcommand = false) - $thor_runner ||= false command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |formatted_usage| "#{basename} #{formatted_usage}" end.join("\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-12-17 16:13:21.000000000 +0100 +++ new/metadata 2021-01-20 17:54:19.000000000 +0100 @@ -1,15 +1,15 @@ --- !ruby/object:Gem::Specification name: thor version: !ruby/object:Gem::Version - version: 1.0.1 + version: 1.1.0 platform: ruby authors: - Yehuda Katz - Jos?? Valim -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2019-12-17 00:00:00.000000000 Z +date: 2021-01-20 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -83,9 +83,9 @@ bug_tracker_uri: https://github.com/erikhuda/thor/issues changelog_uri: https://github.com/erikhuda/thor/blob/master/CHANGELOG.md documentation_uri: http://whatisthor.com/ - source_code_uri: https://github.com/erikhuda/thor/tree/v1.0.1 + source_code_uri: https://github.com/erikhuda/thor/tree/v1.1.0 wiki_uri: https://github.com/erikhuda/thor/wiki -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -100,8 +100,8 @@ - !ruby/object:Gem::Version version: 1.3.5 requirements: [] -rubygems_version: 3.0.3 -signing_key: +rubygems_version: 3.2.3 +signing_key: specification_version: 4 summary: Thor is a toolkit for building powerful command-line interfaces. test_files: []
