Hello community, here is the log from the commit of package rubygem-rspec-mocks for openSUSE:Factory checked in at 2015-07-20 11:19:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-rspec-mocks (Old) and /work/SRC/openSUSE:Factory/.rubygem-rspec-mocks.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-rspec-mocks" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-rspec-mocks/rubygem-rspec-mocks.changes 2015-07-05 17:57:17.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-rspec-mocks.new/rubygem-rspec-mocks.changes 2015-07-20 11:19:52.000000000 +0200 @@ -1,0 +2,14 @@ +Thu Jul 16 04:32:38 UTC 2015 - co...@suse.com + +- updated to version 3.3.2 + see installed Changelog.md + + ### 3.3.2 / 2015-07-15 + [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2) + + Bug Fixes: + + * Prevent thread deadlock errors during proxy creation (e.g. when using + `before_verifying_doubles` callbacks). (Jon Rowe, #980, #979) + +------------------------------------------------------------------- Old: ---- rspec-mocks-3.3.1.gem New: ---- rspec-mocks-3.3.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-rspec-mocks.spec ++++++ --- /var/tmp/diff_new_pack.iAu14w/_old 2015-07-20 11:19:53.000000000 +0200 +++ /var/tmp/diff_new_pack.iAu14w/_new 2015-07-20 11:19:53.000000000 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-rspec-mocks -Version: 3.3.1 +Version: 3.3.2 Release: 0 %define mod_name rspec-mocks %define mod_full_name %{mod_name}-%{version} ++++++ rspec-mocks-3.3.1.gem -> rspec-mocks-3.3.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog.md new/Changelog.md --- old/Changelog.md 2015-06-20 06:40:49.000000000 +0200 +++ new/Changelog.md 2015-07-15 19:12:26.000000000 +0200 @@ -1,3 +1,11 @@ +### 3.3.2 / 2015-07-15 +[Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.1...v3.3.2) + +Bug Fixes: + +* Prevent thread deadlock errors during proxy creation (e.g. when using + `before_verifying_doubles` callbacks). (Jon Rowe, #980, #979) + ### 3.3.1 / 2015-06-19 [Full Changelog](http://github.com/rspec/rspec-mocks/compare/v3.3.0...v3.3.1) Files old/checksums.yaml.gz and new/checksums.yaml.gz differ Files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ 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/mocks/mutex.rb new/lib/rspec/mocks/mutex.rb --- old/lib/rspec/mocks/mutex.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rspec/mocks/mutex.rb 2015-07-15 19:12:26.000000000 +0200 @@ -0,0 +1,73 @@ +module RSpec + module Mocks + # On 1.8.7, it's in the stdlib. + # We don't want to load the stdlib, b/c this is a test tool, and can affect + # the test environment, causing tests to pass where they should fail. + # + # So we're transcribing/modifying it from + # https://github.com/ruby/ruby/blob/v1_8_7_374/lib/thread.rb#L56 + # Some methods we don't need are deleted. Anything I don't + # understand (there's quite a bit, actually) is left in. + # + # Some formating changes are made to appease the robot overlord: + # https://travis-ci.org/rspec/rspec-core/jobs/54410874 + # @private + class Mutex + def initialize + @waiting = [] + @locked = false + @waiting.taint + taint + end + + # @private + def lock + while Thread.critical = true && @locked + @waiting.push Thread.current + Thread.stop + end + @locked = true + Thread.critical = false + self + end + + # @private + def unlock + return unless @locked + Thread.critical = true + @locked = false + wakeup_and_run_waiting_thread + self + end + + # @private + def synchronize + lock + begin + yield + ensure + unlock + end + end + + private + + def wakeup_and_run_waiting_thread + begin + t = @waiting.shift + t.wakeup if t + rescue ThreadError + retry + end + Thread.critical = false + begin + t.run if t + rescue ThreadError + :noop + end + end + + # Avoid warnings for library wide checks spec + end unless defined?(::RSpec::Mocks::Mutex) || defined?(::Mutex) + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/mocks/reentrant_mutex.rb new/lib/rspec/mocks/reentrant_mutex.rb --- old/lib/rspec/mocks/reentrant_mutex.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/rspec/mocks/reentrant_mutex.rb 2015-07-15 19:12:26.000000000 +0200 @@ -0,0 +1,53 @@ +module RSpec + module Mocks + # Allows a thread to lock out other threads from a critical section of code, + # while allowing the thread with the lock to reenter that section. + # + # Based on Monitor as of 2.2 - + # https://github.com/ruby/ruby/blob/eb7ddaa3a47bf48045d26c72eb0f263a53524ebc/lib/monitor.rb#L9 + # + # Depends on Mutex, but Mutex is only available as part of core since 1.9.1: + # exists - http://ruby-doc.org/core-1.9.1/Mutex.html + # dne - http://ruby-doc.org/core-1.9.0/Mutex.html + # + # @private + class ReentrantMutex + def initialize + @owner = nil + @count = 0 + @mutex = Mutex.new + end + + def synchronize + enter + yield + ensure + exit + end + + private + + def enter + @mutex.lock if @owner != Thread.current + @owner = Thread.current + @count += 1 + end + + def exit + @count -= 1 + return unless @count == 0 + @owner = nil + @mutex.unlock + end + end + + if defined? ::Mutex + # On 1.9 and up, this is in core, so we just use the real one + Mutex = ::Mutex + else # For 1.8.7 + # :nocov: + RSpec::Support.require_rspec_mocks "mutex" + # :nocov: + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/mocks/space.rb new/lib/rspec/mocks/space.rb --- old/lib/rspec/mocks/space.rb 2015-06-20 06:40:50.000000000 +0200 +++ new/lib/rspec/mocks/space.rb 2015-07-15 19:12:26.000000000 +0200 @@ -1,3 +1,5 @@ +RSpec::Support.require_rspec_mocks 'reentrant_mutex' + module RSpec module Mocks # @private @@ -142,18 +144,8 @@ private - # We don't want to depend on the stdlib ourselves, but if the user is - # using threads then a Mutex will be available to us. If not, we don't - # need to synchronize anyway. def new_mutex - defined?(::Mutex) ? ::Mutex.new : FakeMutex - end - - # @private - module FakeMutex - def self.synchronize - yield - end + Mocks::ReentrantMutex.new end def proxy_not_found_for(id, object) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rspec/mocks/version.rb new/lib/rspec/mocks/version.rb --- old/lib/rspec/mocks/version.rb 2015-06-20 06:40:50.000000000 +0200 +++ new/lib/rspec/mocks/version.rb 2015-07-15 19:12:27.000000000 +0200 @@ -3,7 +3,7 @@ # Version information for RSpec mocks. module Version # Version of RSpec mocks currently in use in SemVer format. - STRING = '3.3.1' + STRING = '3.3.2' end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-06-20 06:40:49.000000000 +0200 +++ new/metadata 2015-07-15 19:12:26.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: rspec-mocks version: !ruby/object:Gem::Version - version: 3.3.1 + version: 3.3.2 platform: ruby authors: - Steven Baker @@ -45,7 +45,7 @@ ZsVDj6a7lH3cNqtWXZxrb2wO38qV5AkYj8SQK7Hj3/Yui9myUX3crr+PdetazSqQ F3MdtaDehhjC -----END CERTIFICATE----- -date: 2015-06-20 00:00:00.000000000 Z +date: 2015-07-15 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rspec-support @@ -137,6 +137,20 @@ - - "~>" - !ruby/object:Gem::Version version: '5.2' +- !ruby/object:Gem::Dependency + name: thread_order + requirement: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 1.1.0 + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 1.1.0 description: RSpec's 'test double' framework, with support for stubbing and mocking email: rs...@googlegroups.com executables: [] @@ -176,9 +190,11 @@ - lib/rspec/mocks/method_double.rb - lib/rspec/mocks/method_reference.rb - lib/rspec/mocks/mutate_const.rb +- lib/rspec/mocks/mutex.rb - lib/rspec/mocks/object_reference.rb - lib/rspec/mocks/order_group.rb - lib/rspec/mocks/proxy.rb +- lib/rspec/mocks/reentrant_mutex.rb - lib/rspec/mocks/space.rb - lib/rspec/mocks/standalone.rb - lib/rspec/mocks/syntax.rb @@ -212,6 +228,6 @@ rubygems_version: 2.2.2 signing_key: specification_version: 4 -summary: rspec-mocks-3.3.1 +summary: rspec-mocks-3.3.2 test_files: [] has_rdoc: Files old/metadata.gz.sig and new/metadata.gz.sig differ