Hello community, here is the log from the commit of package rubygem-rspec-support for openSUSE:Factory checked in at 2018-11-01 18:51:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-support (Old) and /work/SRC/openSUSE:Factory/.rubygem-rspec-support.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-rspec-support" Thu Nov 1 18:51:32 2018 rev:9 rq:627632 version:3.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rspec-support/rubygem-rspec-support.changes 2018-02-12 10:08:51.623245558 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-rspec-support.new/rubygem-rspec-support.changes 2018-11-01 18:51:34.277947199 +0100 @@ -1,0 +2,12 @@ +Sun Aug 5 19:07:19 UTC 2018 - mschnitzer@suse.com + +- updated to version 3.8.0 + + [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.7.1...v3.8.0) + + Bug Fixes: + + * Order hash keys before diffing to improve diff accuracy when using mocked calls. + (James Crisp, #334) + +------------------------------------------------------------------- Old: ---- rspec-support-3.7.1.gem New: ---- rspec-support-3.8.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rspec-support.spec ++++++ --- /var/tmp/diff_new_pack.3O5upC/_old 2018-11-01 18:51:34.909947262 +0100 +++ /var/tmp/diff_new_pack.3O5upC/_new 2018-11-01 18:51:34.909947262 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-rspec-support -Version: 3.7.1 +Version: 3.8.0 Release: 0 %define mod_name rspec-support %define mod_full_name %{mod_name}-%{version} ++++++ rspec-support-3.7.1.gem -> rspec-support-3.8.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md --- old/Changelog.md 2018-01-30 06:25:56.000000000 +0100 +++ new/Changelog.md 2018-08-04 21:48:57.000000000 +0200 @@ -1,3 +1,11 @@ +### 3.8.0 / 2018-08-04 +[Full Changelog](http://github.com/rspec/rspec-support/compare/v3.7.1...v3.8.0) + +Bug Fixes: + +* Order hash keys before diffing to improve diff accuracy when using mocked calls. + (James Crisp, #334) + ### 3.7.1 / 2018-01-29 [Full Changelog](http://github.com/rspec/rspec-support/compare/v3.7.0...v3.7.1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-01-30 06:25:56.000000000 +0100 +++ new/README.md 2018-08-04 21:48:57.000000000 +0200 @@ -13,7 +13,7 @@ ```ruby %w[rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib| - gem lib, :git => "git://github.com/rspec/#{lib}.git", :branch => 'master' + gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'master' end ``` 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-01-30 06:25:56.000000000 +0100 +++ new/checksums.yaml.gz.sig 2018-08-04 21:48:57.000000000 +0200 @@ -1 +1,2 @@ -X+ÐÓñ÷kÊHÖï|øǪձû(+ ê4'¿i.ÚòÝtI¢îíDM Ù¢ iiÄÞúbnúÝÑæŸ0èæÛõ(ÕYQdsÒ!sAÿÖ±ü $ ö€bÎOyŸïTVÑ{Ï=ÜßfDgîès1ÿ<"Þ.~wšüôŠT{5x\ ã wGÝ¿=þè4ÛÏü@J€ÒZáã{ŽkÄûtæ6øeµ`Pë·|^k®{C~I6í°Ûµ?È#þ dÕ_Ñ@$®ÙÕ|Gmµ-{jø}(ªUd|9<·ò'~7JújwóèDÁ8$Ô3Ëqoøõº&gkÑ1;®.äà èBÖ·KÝ뱌ތªsÇJÍRïþ/Áœ+9ñÀúŒnyîeæ£+Ît×ç8ÞX éÅÆ€×ÊC$Ôžóô)"#²;#ß~&ÞsšŸ®ºÁëMy€gíd*r%ptÛdäì€,cï{ôîs?jËL0ÔÆMá±<€¢r ZOpñê®GþìÙÁå W,l?ù]æØï6bªŠØ°ýIÜëkTÐä»ýoûÔ& ÓÚ», \ No newline at end of file +7Ÿ,ÏHœXj'Ä:àñÏÞõÝV±¯MuÛÐ<[%8Šb8±å)ÅŸN¹$øtAýN`Ê>zQ(¬Ä8àÊ£ÒôäûÅ,¥ò¡BMËßgèŸg»}ÔÀ&Œ_ +q¶Ñ¡Ï>e-®¬}8Yn+ß>ž ?rý®O9º;lœíåØÓSwËÌ?ÆAZªHÀåBšŒºo Ä!ÖZàpý«bñ/sŠQºHÞB]KäêÝï¡ Ý.`Æ¿÷ĹO¢RÅîPöÚZ6È®µ¿ #Ò<Q\ä âÉwì/Mï4JwWÿý)WôÑ6¥Sÿ¹ØQ\\LŸöÛ³€ùd*ÅÁ"uoŠâ6sÍá×GÿuÖôe€F;ڌ޹]Ï7áúOøNb§üdr7ÁÝ_ÚJ¿ÁDÇ@pµžGò «I¡ÿ@Œ>ÉܪÚ3áH#±âWªØ%'ÀwX»M£>ÁVži¡9f'0uoÅ0ñßÅõØ`N5"V÷ÁÊixY¡xÆivx: S8S1ÊÂ<ªž]œSÒ|í¯ã±êl"( Û1(#-±OŸ5]°ÏU4KHerS$úߊ§èÈ1OÎvÂ3Þ \ 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/rspec/support/method_signature_verifier.rb new/lib/rspec/support/method_signature_verifier.rb --- old/lib/rspec/support/method_signature_verifier.rb 2018-01-30 06:25:56.000000000 +0100 +++ new/lib/rspec/support/method_signature_verifier.rb 2018-08-04 21:48:57.000000000 +0200 @@ -33,6 +33,18 @@ optional_max_arg_count <= max_non_kw_args end + def classify_arity(arity=@method.arity) + if arity < 0 + # `~` inverts the one's complement and gives us the + # number of required args + @min_non_kw_args = ~arity + @max_non_kw_args = INFINITY + else + @min_non_kw_args = arity + @max_non_kw_args = arity + end + end + if RubyFeatures.optional_and_splat_args_supported? def description @description ||= begin @@ -137,36 +149,58 @@ false end - def classify_parameters - arity = @method.arity - if arity < 0 - # `~` inverts the one's complement and gives us the - # number of required args - @min_non_kw_args = ~arity - @max_non_kw_args = INFINITY - else - @min_non_kw_args = arity - @max_non_kw_args = arity - end - end + alias_method :classify_parameters, :classify_arity end INFINITY = 1 / 0.0 end - # Some versions of JRuby have a nasty bug we have to work around :(. - # https://github.com/jruby/jruby/issues/2816 - if RSpec::Support::Ruby.jruby? && - RubyFeatures.optional_and_splat_args_supported? && - Class.new { attr_writer :foo }.instance_method(:foo=).parameters == [] - - class MethodSignature < remove_const(:MethodSignature) - private + if RSpec::Support::Ruby.jruby? + # JRuby has only partial support for UnboundMethod#parameters, so we fall back on using #arity + # https://github.com/jruby/jruby/issues/2816 and https://github.com/jruby/jruby/issues/2817 + if RubyFeatures.optional_and_splat_args_supported? && + Java::JavaLang::String.instance_method(:char_at).parameters == [] + + class MethodSignature < remove_const(:MethodSignature) + private + + def classify_parameters + super + if (arity = @method.arity) != 0 && @method.parameters.empty? + classify_arity(arity) + end + end + end + end - def classify_parameters - super - return unless @method.parameters == [] && @method.arity == 1 - @max_non_kw_args = @min_non_kw_args = 1 + # JRuby used to always report -1 arity for Java proxy methods. + # The workaround essentially makes use of Java's introspection to figure + # out matching methods (which could be more than one partly because Java + # supports multiple overloads, and partly because JRuby introduces + # aliases to make method names look more Rubyesque). If there is only a + # single match, we can use that methods arity directly instead of the + # default -1 arity. + # + # This workaround only works for Java proxy methods, and in order to + # support regular methods and blocks, we need to be careful about calling + # owner and java_class as they might not be available + if Java::JavaLang::String.instance_method(:char_at).arity == -1 + class MethodSignature < remove_const(:MethodSignature) + private + + def classify_parameters + super + return unless @method.arity == -1 + return unless @method.respond_to?(:owner) + return unless @method.owner.respond_to?(:java_class) + java_instance_methods = @method.owner.java_class.java_instance_methods + compatible_overloads = java_instance_methods.select do |java_method| + @method == @method.owner.instance_method(java_method.name) + end + if compatible_overloads.size == 1 + classify_arity(compatible_overloads.first.arity) + end + end end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/support/object_formatter.rb new/lib/rspec/support/object_formatter.rb --- old/lib/rspec/support/object_formatter.rb 2018-01-30 06:25:56.000000000 +0100 +++ new/lib/rspec/support/object_formatter.rb 2018-08-04 21:48:57.000000000 +0200 @@ -5,7 +5,7 @@ # Provide additional output details beyond what `inspect` provides when # printing Time, DateTime, or BigDecimal # @api private - class ObjectFormatter # rubocop:disable Style/ClassLength + class ObjectFormatter # rubocop:disable Metrics/ClassLength ELLIPSIS = "..." attr_accessor :max_formatted_output_length @@ -31,15 +31,15 @@ def format(object) if max_formatted_output_length.nil? - return prepare_for_inspection(object).inspect + prepare_for_inspection(object).inspect else formatted_object = prepare_for_inspection(object).inspect if formatted_object.length < max_formatted_output_length - return formatted_object + formatted_object else beginning = truncate_string formatted_object, 0, max_formatted_output_length / 2 ending = truncate_string formatted_object, -max_formatted_output_length / 2, -1 - return beginning + ELLIPSIS + ending + beginning + ELLIPSIS + ending end end end @@ -73,7 +73,7 @@ def prepare_hash(input_hash) with_entering_structure(input_hash) do - input_hash.inject({}) do |output_hash, key_and_value| + sort_hash_keys(input_hash).inject({}) do |output_hash, key_and_value| key, value = key_and_value.map { |element| prepare_element(element) } output_hash[key] = value output_hash @@ -81,6 +81,14 @@ end end + def sort_hash_keys(input_hash) + if input_hash.keys.all? { |k| k.is_a?(String) || k.is_a?(Symbol) } + Hash[input_hash.sort_by { |k, _v| k.to_s }] + else + input_hash + end + end + def prepare_element(element) if recursive_structure?(element) case element diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/support/ruby_features.rb new/lib/rspec/support/ruby_features.rb --- old/lib/rspec/support/ruby_features.rb 2018-01-30 06:25:56.000000000 +0100 +++ new/lib/rspec/support/ruby_features.rb 2018-08-04 21:48:57.000000000 +0200 @@ -56,6 +56,22 @@ module RubyFeatures module_function + if Ruby.jruby? + # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true, + # but when you try to fork, it raises an error: + # NotImplementedError: fork is not available on this platform + # + # When we drop support for JRuby 1.7 and/or Ruby 1.8, we can drop + # this special case. + def fork_supported? + false + end + else + def fork_supported? + Process.respond_to?(:fork) + end + end + def optional_and_splat_args_supported? Method.method_defined?(:parameters) end @@ -109,7 +125,6 @@ end else # RBX / JRuby et al support is unknown for keyword arguments - # rubocop:disable Lint/Eval begin eval("o = Object.new; def o.m(a: 1); end;"\ " raise SyntaxError unless o.method(:m).parameters.include?([:key, :a])") @@ -147,7 +162,6 @@ false end end - # rubocop:enable Lint/Eval end def module_refinement_supported? diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/support/version.rb new/lib/rspec/support/version.rb --- old/lib/rspec/support/version.rb 2018-01-30 06:25:56.000000000 +0100 +++ new/lib/rspec/support/version.rb 2018-08-04 21:48:57.000000000 +0200 @@ -1,7 +1,7 @@ module RSpec module Support module Version - STRING = '3.7.1' + STRING = '3.8.0' end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-01-30 06:25:56.000000000 +0100 +++ new/metadata 2018-08-04 21:48:57.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rspec-support version: !ruby/object:Gem::Version - version: 3.7.1 + version: 3.8.0 platform: ruby authors: - David Chelimsky @@ -48,7 +48,7 @@ ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ F3MdtaDehhjC -----END CERTIFICATE----- -date: 2018-01-30 00:00:00.000000000 Z +date: 2018-08-04 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -156,5 +156,5 @@ rubygems_version: 2.6.13 signing_key: specification_version: 4 -summary: rspec-support-3.7.1 +summary: rspec-support-3.8.0 test_files: [] Binary files old/metadata.gz.sig and new/metadata.gz.sig differ