diff --git a/Library/Homebrew/vendor/bundle/bundler/setup.rb b/Library/Homebrew/vendor/bundle/bundler/setup.rb index d29d980497..3b77a93d6f 100644 --- a/Library/Homebrew/vendor/bundle/bundler/setup.rb +++ b/Library/Homebrew/vendor/bundle/bundler/setup.rb @@ -3,9 +3,9 @@ require 'rbconfig' ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' ruby_version = RbConfig::CONFIG["ruby_version"] path = File.expand_path('..', __FILE__) -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.5/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/i18n-1.8.2/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.13.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/minitest-5.14.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thread_safe-0.3.6/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tzinfo-1.2.6/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/zeitwerk-2.2.2/lib" @@ -19,7 +19,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/docile-1.3.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-html-0.10.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/simplecov-0.16.1/lib" $:.unshift "#{path}/../../../../../../../../Library/Ruby/Gems/2.6.0/gems/sync-0.5.0/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tins-1.24.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/tins-1.24.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/term-ansicolor-1.7.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/thor-1.0.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/coveralls-0.8.23/lib" @@ -45,7 +45,7 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/webrobots-0.1.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mechanize-2.7.6/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/mustache-1.1.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel-1.19.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-2.30.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parallel_tests-2.31.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/parser-2.7.0.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/plist-3.5.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rainbow-3.0.0/lib" @@ -61,8 +61,8 @@ $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-its-1.3.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-retry-0.6.2/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rspec-wait-0.0.9/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-progressbar-1.10.1/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.0/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/unicode-display_width-1.6.1/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-0.79.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-performance-1.5.2/lib" -$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.37.1/lib" +$:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rubocop-rspec-1.38.0/lib" $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/ruby-macho-2.2.0/lib" diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/at_exit.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/at_exit.rb deleted file mode 100644 index 0e52ca379b..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/at_exit.rb +++ /dev/null @@ -1,97 +0,0 @@ -require 'logger' -require 'concurrent/synchronization' - -module Concurrent - - # Provides ability to add and remove handlers to be run at `Kernel#at_exit`, order is undefined. - # Each handler is executed at most once. - # - # @!visibility private - class AtExitImplementation < Synchronization::LockableObject - include Logger::Severity - - def initialize(*args) - super() - synchronize { ns_initialize(*args) } - end - - # Add a handler to be run at `Kernel#at_exit` - # @param [Object] handler_id optionally provide an id, if already present, handler is replaced - # @yield the handler - # @return id of the handler - def add(handler_id = nil, &handler) - id = handler_id || handler.object_id - synchronize { @handlers[id] = handler } - id - end - - # Delete a handler by handler_id - # @return [true, false] - def delete(handler_id) - !!synchronize { @handlers.delete handler_id } - end - - # Is handler with handler_id rpesent? - # @return [true, false] - def handler?(handler_id) - synchronize { @handlers.key? handler_id } - end - - # @return copy of the handlers - def handlers - synchronize { @handlers }.clone - end - - # install `Kernel#at_exit` callback to execute added handlers - def install - synchronize do - @installed ||= begin - at_exit { runner } - true - end - self - end - end - - # Will it run during `Kernel#at_exit` - def enabled? - synchronize { @enabled } - end - - # Configure if it runs during `Kernel#at_exit` - def enabled=(value) - synchronize { @enabled = value } - end - - # run the handlers manually - # @return ids of the handlers - def run - handlers, _ = synchronize { handlers, @handlers = @handlers, {} } - handlers.each do |_, handler| - begin - handler.call - rescue => error - Concurrent.global_logger.call(ERROR, error) - end - end - handlers.keys - end - - private - - def ns_initialize(enabled = true) - @handlers = {} - @enabled = enabled - end - - def runner - run if synchronize { @enabled } - end - end - - private_constant :AtExitImplementation - - # @see AtExitImplementation - # @!visibility private - AtExit = AtExitImplementation.new.install -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/version.rb deleted file mode 100644 index 0f611c51ae..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module Concurrent - VERSION = '1.1.5' -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent-ruby.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent-ruby.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent-ruby.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent-ruby.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/agent.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/agent.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/agent.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/agent.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/array.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/array.rb similarity index 84% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/array.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/array.rb index 18e58e5b2f..ffd1ca293e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/array.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/array.rb @@ -10,11 +10,11 @@ module Concurrent # or writing at a time. This includes iteration methods like `#each`. # # @note `a += b` is **not** a **thread-safe** operation on - # `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` - # which is concatenation of `a` and `b`, then it writes the concatenation to `a`. - # The read and write are independent operations they do not form a single atomic - # operation therefore when two `+=` operations are executed concurrently updates - # may be lost. Use `#concat` instead. + # `Concurrent::Array`. It reads array `a`, then it creates new `Concurrent::Array` + # which is concatenation of `a` and `b`, then it writes the concatenation to `a`. + # The read and write are independent operations they do not form a single atomic + # operation therefore when two `+=` operations are executed concurrently updates + # may be lost. Use `#concat` instead. # # @see http://ruby-doc.org/core-2.2.0/Array.html Ruby standard library `Array` diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/async.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/async.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/async.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/async.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atom.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atom.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atom.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atom.rb index abef1cb0d4..8a45730082 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atom.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atom.rb @@ -18,7 +18,7 @@ require 'concurrent/synchronization' # uncoordinated, *synchronous* change of individual values. Best used when # the value will undergo frequent reads but only occasional, though complex, # updates. Suitable when the result of an update must be known immediately. -# * *{Concurrent::AtomicReference}:* A simple object reference that can be +# * *{Concurrent::AtomicReference}:* A simple object reference that can be updated # atomically. Updates are synchronous but fast. Best used when updates a # simple set operations. Not suitable when updates are complex. # {Concurrent::AtomicBoolean} and {Concurrent::AtomicFixnum} are similar diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/abstract_thread_local_var.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/abstract_thread_local_var.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/abstract_thread_local_var.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/abstract_thread_local_var.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_boolean.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_boolean.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb index 4da4419b48..0b0373dc29 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_boolean.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_boolean.rb @@ -41,13 +41,13 @@ module Concurrent # # Explicitly sets the value to true. # - # @return [Boolean] true is value has changed, otherwise false + # @return [Boolean] true if value has changed, otherwise false # @!macro atomic_boolean_method_make_false # # Explicitly sets the value to false. # - # @return [Boolean] true is value has changed, otherwise false + # @return [Boolean] true if value has changed, otherwise false ################################################################### diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_fixnum.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_fixnum.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_fixnum.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_markable_reference.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_markable_reference.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_markable_reference.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_reference.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/atomic_reference.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/atomic_reference.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/count_down_latch.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/count_down_latch.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb index 4c0158d755..d883aed6f2 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/count_down_latch.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/count_down_latch.rb @@ -1,6 +1,6 @@ +require 'concurrent/utility/engine' require 'concurrent/atomic/mutex_count_down_latch' require 'concurrent/atomic/java_count_down_latch' -require 'concurrent/utility/engine' module Concurrent diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/cyclic_barrier.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/cyclic_barrier.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/event.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/event.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/event.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/event.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_count_down_latch.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/java_count_down_latch.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_count_down_latch.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/java_count_down_latch.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_thread_local_var.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/java_thread_local_var.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/java_thread_local_var.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/java_thread_local_var.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_boolean.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_boolean.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_boolean.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_atomic_fixnum.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_atomic_fixnum.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_count_down_latch.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_count_down_latch.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_count_down_latch.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_semaphore.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/mutex_semaphore.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/mutex_semaphore.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/read_write_lock.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/read_write_lock.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/read_write_lock.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/reentrant_read_write_lock.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/reentrant_read_write_lock.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/reentrant_read_write_lock.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb similarity index 79% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb index 06afae7316..55bcca7c57 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/ruby_thread_local_var.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb @@ -32,12 +32,38 @@ module Concurrent FREE = [] LOCK = Mutex.new ARRAYS = {} # used as a hash set + # noinspection RubyClassVariableUsageInspection @@next = 0 - private_constant :FREE, :LOCK, :ARRAYS + QUEUE = Queue.new + THREAD = Thread.new do + while true + method, i = QUEUE.pop + case method + when :thread_local_finalizer + LOCK.synchronize do + FREE.push(i) + # The cost of GC'ing a TLV is linear in the number of threads using TLVs + # But that is natural! More threads means more storage is used per TLV + # So naturally more CPU time is required to free more storage + ARRAYS.each_value do |array| + array[i] = nil + end + end + when :thread_finalizer + LOCK.synchronize do + # The thread which used this thread-local array is now gone + # So don't hold onto a reference to the array (thus blocking GC) + ARRAYS.delete(i) + end + end + end + end + + private_constant :FREE, :LOCK, :ARRAYS, :QUEUE, :THREAD # @!macro thread_local_var_method_get def value - if array = get_threadlocal_array + if (array = get_threadlocal_array) value = array[@index] if value.nil? default @@ -57,10 +83,10 @@ module Concurrent # We could keep the thread-local arrays in a hash, keyed by Thread # But why? That would require locking # Using Ruby's built-in thread-local storage is faster - unless array = get_threadlocal_array(me) + unless (array = get_threadlocal_array(me)) array = set_threadlocal_array([], me) LOCK.synchronize { ARRAYS[array.object_id] = array } - ObjectSpace.define_finalizer(me, self.class.thread_finalizer(array)) + ObjectSpace.define_finalizer(me, self.class.thread_finalizer(array.object_id)) end array[@index] = (value.nil? ? NULL : value) value @@ -69,6 +95,7 @@ module Concurrent protected # @!visibility private + # noinspection RubyClassVariableUsageInspection def allocate_storage @index = LOCK.synchronize do FREE.pop || begin @@ -77,37 +104,19 @@ module Concurrent result end end - ObjectSpace.define_finalizer(self, self.class.threadlocal_finalizer(@index)) + ObjectSpace.define_finalizer(self, self.class.thread_local_finalizer(@index)) end # @!visibility private - def self.threadlocal_finalizer(index) - proc do - Thread.new do # avoid error: can't be called from trap context - LOCK.synchronize do - FREE.push(index) - # The cost of GC'ing a TLV is linear in the number of threads using TLVs - # But that is natural! More threads means more storage is used per TLV - # So naturally more CPU time is required to free more storage - ARRAYS.each_value do |array| - array[index] = nil - end - end - end - end + def self.thread_local_finalizer(index) + # avoid error: can't be called from trap context + proc { QUEUE.push [:thread_local_finalizer, index] } end # @!visibility private - def self.thread_finalizer(array) - proc do - Thread.new do # avoid error: can't be called from trap context - LOCK.synchronize do - # The thread which used this thread-local array is now gone - # So don't hold onto a reference to the array (thus blocking GC) - ARRAYS.delete(array.object_id) - end - end - end + def self.thread_finalizer(id) + # avoid error: can't be called from trap context + proc { QUEUE.push [:thread_finalizer, id] } end private @@ -136,21 +145,22 @@ module Concurrent # This exists only for use in testing # @!visibility private def value_for(thread) - if array = get_threadlocal_array(thread) + if (array = get_threadlocal_array(thread)) value = array[@index] if value.nil? - default_for(thread) + get_default elsif value.equal?(NULL) nil else value end else - default_for(thread) + get_default end end - def default_for(thread) + # @!visibility private + def get_default if @default_block raise "Cannot use default_for with default block" else diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/semaphore.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/semaphore.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/semaphore.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/semaphore.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/thread_local_var.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/thread_local_var.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb index 9f09e4cd0b..100cc8de8f 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic/thread_local_var.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/thread_local_var.rb @@ -1,6 +1,6 @@ +require 'concurrent/utility/engine' require 'concurrent/atomic/ruby_thread_local_var' require 'concurrent/atomic/java_thread_local_var' -require 'concurrent/utility/engine' module Concurrent diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/mutex_atomic.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/mutex_atomic.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic_reference/mutex_atomic.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic_reference/numeric_cas_wrapper.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomics.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomics.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/atomics.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomics.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_notify_observer_set.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_notify_observer_set.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/copy_on_notify_observer_set.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_write_observer_set.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/copy_on_write_observer_set.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/copy_on_write_observer_set.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/java_non_concurrent_priority_queue.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/java_non_concurrent_priority_queue.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/java_non_concurrent_priority_queue.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/lock_free_stack.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/lock_free_stack.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/lock_free_stack.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/atomic_reference_map_backend.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/atomic_reference_map_backend.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/atomic_reference_map_backend.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/mri_map_backend.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/mri_map_backend.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/mri_map_backend.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/non_concurrent_map_backend.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/non_concurrent_map_backend.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/non_concurrent_priority_queue.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/non_concurrent_priority_queue.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb index 695ffdf2b2..694cd7ac7c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/non_concurrent_priority_queue.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/non_concurrent_priority_queue.rb @@ -1,6 +1,6 @@ +require 'concurrent/utility/engine' require 'concurrent/collection/java_non_concurrent_priority_queue' require 'concurrent/collection/ruby_non_concurrent_priority_queue' -require 'concurrent/utility/engine' module Concurrent module Collection diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/ruby_non_concurrent_priority_queue.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/collection/ruby_non_concurrent_priority_queue.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/deprecation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/deprecation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/deprecation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/deprecation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/dereferenceable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/dereferenceable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb index b0d1a2ef85..dc172ba74d 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/dereferenceable.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/dereferenceable.rb @@ -37,8 +37,8 @@ module Concurrent # returning data to the caller (dereferencing). # # @note Most classes that include this module will call `#set_deref_options` - # from within the constructor, thus allowing these options to be set at - # object creation. + # from within the constructor, thus allowing these options to be set at + # object creation. # # @param [Hash] opts the options defining dereference behavior. # @option opts [String] :dup_on_deref (false) call `#dup` before returning the data diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/logging.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/logging.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/logging.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/logging.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/obligation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/obligation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/obligation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/obligation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/observable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/observable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/concern/observable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concern/observable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concurrent_ruby.jar b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concurrent_ruby.jar new file mode 100644 index 0000000000..78e00a0e0b Binary files /dev/null and b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/concurrent_ruby.jar differ diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/configuration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/configuration.rb similarity index 89% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/configuration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/configuration.rb index c6774da618..a00dc84403 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/configuration.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/configuration.rb @@ -3,13 +3,14 @@ require 'concurrent/delay' require 'concurrent/errors' require 'concurrent/atomic/atomic_reference' require 'concurrent/concern/logging' +require 'concurrent/concern/deprecation' require 'concurrent/executor/immediate_executor' require 'concurrent/executor/cached_thread_pool' -require 'concurrent/utility/at_exit' require 'concurrent/utility/processor_counter' module Concurrent extend Concern::Logging + extend Concern::Deprecation autoload :Options, 'concurrent/options' autoload :TimerSet, 'concurrent/executor/timer_set' @@ -97,15 +98,15 @@ module Concurrent end # @!visibility private - GLOBAL_FAST_EXECUTOR = Delay.new { Concurrent.new_fast_executor(auto_terminate: true) } + GLOBAL_FAST_EXECUTOR = Delay.new { Concurrent.new_fast_executor } private_constant :GLOBAL_FAST_EXECUTOR # @!visibility private - GLOBAL_IO_EXECUTOR = Delay.new { Concurrent.new_io_executor(auto_terminate: true) } + GLOBAL_IO_EXECUTOR = Delay.new { Concurrent.new_io_executor } private_constant :GLOBAL_IO_EXECUTOR # @!visibility private - GLOBAL_TIMER_SET = Delay.new { TimerSet.new(auto_terminate: true) } + GLOBAL_TIMER_SET = Delay.new { TimerSet.new } private_constant :GLOBAL_TIMER_SET # @!visibility private @@ -115,7 +116,7 @@ module Concurrent # Disables AtExit handlers including pool auto-termination handlers. # When disabled it will be the application programmer's responsibility # to ensure that the handlers are shutdown properly prior to application - # exit by calling {AtExit.run} method. + # exit by calling `AtExit.run` method. # # @note this option should be needed only because of `at_exit` ordering # issues which may arise when running some of the testing frameworks. @@ -125,9 +126,10 @@ module Concurrent # @note This method should *never* be called # from within a gem. It should *only* be used from within the main # application and even then it should be used only when necessary. - # @see AtExit + # @deprecated Has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841. + # def self.disable_at_exit_handlers! - AtExit.enabled = false + deprecated "Method #disable_at_exit_handlers! has no effect since it is no longer needed, see https://github.com/ruby-concurrency/concurrent-ruby/pull/841." end # Global thread pool optimized for short, fast *operations*. @@ -171,14 +173,16 @@ module Concurrent auto_terminate: opts.fetch(:auto_terminate, true), idletime: 60, # 1 minute max_queue: 0, # unlimited - fallback_policy: :abort # shouldn't matter -- 0 max queue + fallback_policy: :abort, # shouldn't matter -- 0 max queue + name: "fast" ) end def self.new_io_executor(opts = {}) CachedThreadPool.new( auto_terminate: opts.fetch(:auto_terminate, true), - fallback_policy: :abort # shouldn't matter -- 0 max queue + fallback_policy: :abort, # shouldn't matter -- 0 max queue + name: "io" ) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/constants.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/constants.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/constants.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/constants.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/dataflow.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/dataflow.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/dataflow.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/dataflow.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/delay.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/delay.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/delay.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/delay.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/errors.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/errors.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/errors.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/errors.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/exchanger.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/exchanger.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/exchanger.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/exchanger.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/abstract_executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb similarity index 82% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/abstract_executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb index 80ff953adb..6d0b0474d1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/abstract_executor_service.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/abstract_executor_service.rb @@ -1,7 +1,7 @@ require 'concurrent/errors' +require 'concurrent/concern/deprecation' require 'concurrent/executor/executor_service' require 'concurrent/synchronization' -require 'concurrent/utility/at_exit' module Concurrent @@ -9,6 +9,7 @@ module Concurrent # @!visibility private class AbstractExecutorService < Synchronization::LockableObject include ExecutorService + include Concern::Deprecation # The set of possible fallback policies that may be set at thread pool creation. FALLBACK_POLICIES = [:abort, :discard, :caller_runs].freeze @@ -16,10 +17,20 @@ module Concurrent # @!macro executor_service_attr_reader_fallback_policy attr_reader :fallback_policy + attr_reader :name + # Create a new thread pool. - def initialize(*args, &block) + def initialize(opts = {}, &block) super(&nil) - synchronize { ns_initialize(*args, &block) } + synchronize do + @auto_terminate = opts.fetch(:auto_terminate, true) + @name = opts.fetch(:name) if opts.key?(:name) + ns_initialize(opts, &block) + end + end + + def to_s + name ? "#{super[0..-2]} name: #{name}>" : super end # @!macro executor_service_method_shutdown @@ -54,12 +65,12 @@ module Concurrent # @!macro executor_service_method_auto_terminate_question def auto_terminate? - synchronize { ns_auto_terminate? } + synchronize { @auto_terminate } end # @!macro executor_service_method_auto_terminate_setter def auto_terminate=(value) - synchronize { self.ns_auto_terminate = value } + deprecated "Method #auto_terminate= has no effect. Set :auto_terminate option when executor is initialized." end private @@ -110,25 +121,8 @@ module Concurrent end def ns_auto_terminate? - !!@auto_terminate + @auto_terminate end - def ns_auto_terminate=(value) - case value - when true - AtExit.add(self) { terminate_at_exit } - @auto_terminate = true - when false - AtExit.delete(self) - @auto_terminate = false - else - raise ArgumentError - end - end - - def terminate_at_exit - kill # TODO be gentle first - wait_for_termination(10) - end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/cached_thread_pool.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/cached_thread_pool.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb index 1c7c18da65..de50ed1791 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/cached_thread_pool.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/cached_thread_pool.rb @@ -37,7 +37,7 @@ module Concurrent # # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool-- def initialize(opts = {}) - defaults = { idletime: DEFAULT_THREAD_IDLETIMEOUT } + defaults = { idletime: DEFAULT_THREAD_IDLETIMEOUT } overrides = { min_threads: 0, max_threads: DEFAULT_MAX_POOL_SIZE, max_queue: DEFAULT_MAX_QUEUE_SIZE } @@ -51,11 +51,11 @@ module Concurrent def ns_initialize(opts) super(opts) if Concurrent.on_jruby? - @max_queue = 0 - @executor = java.util.concurrent.Executors.newCachedThreadPool + @max_queue = 0 + @executor = java.util.concurrent.Executors.newCachedThreadPool( + DaemonThreadFactory.new(ns_auto_terminate?)) @executor.setRejectedExecutionHandler(FALLBACK_POLICY_CLASSES[@fallback_policy].new) @executor.setKeepAliveTime(opts.fetch(:idletime, DEFAULT_THREAD_IDLETIMEOUT), java.util.concurrent.TimeUnit::SECONDS) - self.auto_terminate = opts.fetch(:auto_terminate, true) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/executor_service.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/executor_service.rb index 0fcbeeeb20..7e344919e0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/executor_service.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/executor_service.rb @@ -111,10 +111,10 @@ module Concurrent # @!macro executor_service_method_auto_terminate_setter # + # # Set the auto-terminate behavior for this executor. - # + # @deprecated Has no effect # @param [Boolean] value The new auto-terminate value to set for this executor. - # # @return [Boolean] `true` when auto-termination is enabled else `false`. ################################################################### diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/fixed_thread_pool.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/fixed_thread_pool.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb index c9e03dade7..681fe21fbd 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/fixed_thread_pool.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/fixed_thread_pool.rb @@ -115,12 +115,13 @@ module Concurrent # Thread pools support several configuration options: # # * `idletime`: The number of seconds that a thread may be idle before being reclaimed. + # * `name`: The name of the executor (optional). Printed in the executor's `#to_s` output and + # a `-worker-` name is given to its threads if supported by used Ruby + # implementation. `` is uniq for each thread. # * `max_queue`: The maximum number of tasks that may be waiting in the work queue at # any one time. When the queue size reaches `max_queue` and no new threads can be created, # subsequent tasks will be rejected in accordance with the configured `fallback_policy`. - # * `auto_terminate`: When true (default) an `at_exit` handler will be registered which - # will stop the thread pool when the application exits. See below for more information - # on shutting down thread pools. + # * `auto_terminate`: When true (default), the threads started will be marked as daemon. # * `fallback_policy`: The policy defining how rejected tasks are handled. # # Three fallback policies are supported: @@ -145,16 +146,12 @@ module Concurrent # # On some runtime platforms (most notably the JVM) the application will not # exit until all thread pools have been shutdown. To prevent applications from - # "hanging" on exit all thread pools include an `at_exit` handler that will - # stop the thread pool when the application exits. This handler uses a brute - # force method to stop the pool and makes no guarantees regarding resources being - # used by any tasks still running. Registration of this `at_exit` handler can be - # prevented by setting the thread pool's constructor `:auto_terminate` option to - # `false` when the thread pool is created. All thread pools support this option. + # "hanging" on exit, all threads can be marked as daemon according to the + # `:auto_terminate` option. # # ```ruby - # pool1 = Concurrent::FixedThreadPool.new(5) # an `at_exit` handler will be registered - # pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # prevent `at_exit` handler registration + # pool1 = Concurrent::FixedThreadPool.new(5) # threads will be marked as daemon + # pool2 = Concurrent::FixedThreadPool.new(5, auto_terminate: false) # mark threads as non-daemon # ``` # # @note Failure to properly shutdown a thread pool can lead to unpredictable results. @@ -163,7 +160,7 @@ module Concurrent # @see http://docs.oracle.com/javase/tutorial/essential/concurrency/pools.html Java Tutorials: Thread Pools # @see http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html Java Executors class # @see http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html Java ExecutorService interface - # @see http://ruby-doc.org//core-2.2.0/Kernel.html#method-i-at_exit Kernel#at_exit + # @see https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#setDaemon-boolean- diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/immediate_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/immediate_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/immediate_executor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/indirect_immediate_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/indirect_immediate_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/indirect_immediate_executor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb similarity index 83% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb index 113e0bce16..9c0f3100cf 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_executor_service.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_executor_service.rb @@ -18,10 +18,6 @@ if Concurrent.on_jruby? }.freeze private_constant :FALLBACK_POLICY_CLASSES - def initialize(*args, &block) - super - end - def post(*args, &task) raise ArgumentError.new('no block given') unless block_given? return handle_fallback(*args, &task) unless running? @@ -42,7 +38,6 @@ if Concurrent.on_jruby? def shutdown synchronize do - self.ns_auto_terminate = false @executor.shutdown nil end @@ -50,7 +45,6 @@ if Concurrent.on_jruby? def kill synchronize do - self.ns_auto_terminate = false @executor.shutdownNow nil end @@ -87,5 +81,23 @@ if Concurrent.on_jruby? end private_constant :Job end + + class DaemonThreadFactory + # hide include from YARD + send :include, java.util.concurrent.ThreadFactory + + def initialize(daemonize = true) + @daemonize = daemonize + end + + def newThread(runnable) + thread = java.util.concurrent.Executors.defaultThreadFactory().newThread(runnable) + thread.setDaemon(@daemonize) + return thread + end + end + + private_constant :DaemonThreadFactory + end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb similarity index 91% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb index 1cf59b0659..7aa24f2d72 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_single_thread_executor.rb @@ -17,12 +17,13 @@ if Concurrent.on_jruby? end private - + def ns_initialize(opts) - @executor = java.util.concurrent.Executors.newSingleThreadExecutor + @executor = java.util.concurrent.Executors.newSingleThreadExecutor( + DaemonThreadFactory.new(ns_auto_terminate?) + ) @fallback_policy = opts.fetch(:fallback_policy, :discard) raise ArgumentError.new("#{@fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICY_CLASSES.keys.include?(@fallback_policy) - self.auto_terminate = opts.fetch(:auto_terminate, true) end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_thread_pool_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_thread_pool_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb index 6308e4f4d7..b8cb5f1d5e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_thread_pool_executor.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/java_thread_pool_executor.rb @@ -114,10 +114,11 @@ if Concurrent.on_jruby? idletime, java.util.concurrent.TimeUnit::SECONDS, queue, + DaemonThreadFactory.new(ns_auto_terminate?), FALLBACK_POLICY_CLASSES[@fallback_policy].new) - self.auto_terminate = opts.fetch(:auto_terminate, true) end end + end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb index 7b2ee73775..06658d3769 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_executor_service.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_executor_service.rb @@ -27,7 +27,6 @@ module Concurrent def shutdown synchronize do break unless running? - self.ns_auto_terminate = false stop_event.set ns_shutdown_execution end @@ -37,7 +36,6 @@ module Concurrent def kill synchronize do break if shutdown? - self.ns_auto_terminate = false stop_event.set ns_kill_execution stopped_event.set diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_single_thread_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb similarity index 90% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_single_thread_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb index 305a49e621..916337d4ba 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_single_thread_executor.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_single_thread_executor.rb @@ -15,7 +15,6 @@ module Concurrent max_queue: 0, idletime: DEFAULT_THREAD_IDLETIMEOUT, fallback_policy: opts.fetch(:fallback_policy, :discard), - auto_terminate: opts.fetch(:auto_terminate, true) ) end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb index 92fbd315f8..0044fb40ad 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/ruby_thread_pool_executor.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb @@ -122,8 +122,6 @@ module Concurrent raise ArgumentError.new("`min_threads` cannot be less than #{DEFAULT_MIN_POOL_SIZE}") if @min_length < DEFAULT_MIN_POOL_SIZE raise ArgumentError.new("`min_threads` cannot be more than `max_threads`") if min_length > max_length - self.auto_terminate = opts.fetch(:auto_terminate, true) - @pool = [] # all workers @ready = [] # used as a stash (most idle worker is at the start) @queue = [] # used as queue @@ -131,6 +129,7 @@ module Concurrent @scheduled_task_count = 0 @completed_task_count = 0 @largest_length = 0 + @workers_counter = 0 @ruby_pid = $$ # detects if Ruby has forked @gc_interval = opts.fetch(:gc_interval, @idletime / 2.0).to_i # undocumented @@ -224,7 +223,8 @@ module Concurrent def ns_add_busy_worker return if @pool.size >= @max_length - @pool << (worker = Worker.new(self)) + @workers_counter += 1 + @pool << (worker = Worker.new(self, @workers_counter)) @largest_length = @pool.length if @pool.length > @largest_length worker end @@ -284,6 +284,7 @@ module Concurrent @scheduled_task_count = 0 @completed_task_count = 0 @largest_length = 0 + @workers_counter = 0 @ruby_pid = $$ end end @@ -292,11 +293,15 @@ module Concurrent class Worker include Concern::Logging - def initialize(pool) + def initialize(pool, id) # instance variables accessed only under pool's lock so no need to sync here again @queue = Queue.new @pool = pool @thread = create_worker @queue, pool, pool.idletime + + if @thread.respond_to?(:name=) + @thread.name = [pool.name, 'worker', id].compact.join('-') + end end def <<(message) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/safe_task_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/safe_task_executor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serial_executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serial_executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serial_executor_service.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution_delegator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/serialized_execution_delegator.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/serialized_execution_delegator.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/simple_executor_service.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/simple_executor_service.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb index b278dbf5e9..b87fed5e02 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/simple_executor_service.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/simple_executor_service.rb @@ -91,7 +91,7 @@ module Concurrent private - def ns_initialize + def ns_initialize(*args) @running = Concurrent::AtomicBoolean.new(true) @stopped = Concurrent::Event.new @count = Concurrent::AtomicFixnum.new(0) diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/single_thread_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/single_thread_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb index 797cb1899e..f1474ea9ff 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/single_thread_executor.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/single_thread_executor.rb @@ -1,3 +1,4 @@ +require 'concurrent/utility/engine' require 'concurrent/executor/ruby_single_thread_executor' module Concurrent diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/thread_pool_executor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/thread_pool_executor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/thread_pool_executor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/timer_set.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/timer_set.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/timer_set.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/timer_set.rb index 364910152e..0dfaf1288c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/timer_set.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executor/timer_set.rb @@ -77,7 +77,6 @@ module Concurrent @timer_executor = SingleThreadExecutor.new @condition = Event.new @ruby_pid = $$ # detects if Ruby has forked - self.auto_terminate = opts.fetch(:auto_terminate, true) end # Post the task to the internal queue. diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executors.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executors.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executors.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/executors.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/future.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/future.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/future.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/future.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/hash.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/hash.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/hash.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/hash.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/immutable_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/immutable_struct.rb similarity index 94% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/immutable_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/immutable_struct.rb index 05b8035c02..ab64824be5 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/immutable_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/immutable_struct.rb @@ -70,6 +70,14 @@ module Concurrent ns_select(&block) end + private + + # @!visibility private + def initialize_copy(original) + super(original) + ns_initialize_copy + end + # @!macro struct_new def self.new(*args, &block) clazz_name = nil diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/ivar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/ivar.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/ivar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/ivar.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/map.rb similarity index 99% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/map.rb index 5b7144747d..3967cbf195 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/map.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/map.rb @@ -197,7 +197,7 @@ module Concurrent # Insert value into map with key if key is absent in one atomic step. # @param [Object] key # @param [Object] value - # @return [Object, nil] the value or nil when key was present + # @return [Object, nil] the previous value when key was present or nil when there was no key def put_if_absent(key, value) computed = false result = compute_if_absent(key) do diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/maybe.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/maybe.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/maybe.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/maybe.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mutable_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/mutable_struct.rb similarity index 98% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mutable_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/mutable_struct.rb index 836b7f4585..c2ad43e500 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mutable_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/mutable_struct.rb @@ -196,6 +196,16 @@ module Concurrent raise NameError.new("no member '#{member}' in struct") end + private + + # @!visibility private + def initialize_copy(original) + synchronize do + super(original) + ns_initialize_copy + end + end + # @!macro struct_new def self.new(*args, &block) clazz_name = nil diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mvar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/mvar.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/mvar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/mvar.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/options.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/options.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/options.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/options.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promise.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/promise.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promise.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/promise.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promises.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/promises.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/promises.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/promises.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/re_include.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/re_include.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/re_include.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/re_include.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/scheduled_task.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/scheduled_task.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/scheduled_task.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/scheduled_task.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/set.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/set.rb similarity index 84% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/set.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/set.rb index 04dc936037..602d494081 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/set.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/set.rb @@ -11,11 +11,11 @@ module Concurrent # or writing at a time. This includes iteration methods like `#each`. # # @note `a += b` is **not** a **thread-safe** operation on - # `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` - # which is union of `a` and `b`, then it writes the union to `a`. - # The read and write are independent operations they do not form a single atomic - # operation therefore when two `+=` operations are executed concurrently updates - # may be lost. Use `#merge` instead. + # `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set` + # which is union of `a` and `b`, then it writes the union to `a`. + # The read and write are independent operations they do not form a single atomic + # operation therefore when two `+=` operations are executed concurrently updates + # may be lost. Use `#merge` instead. # # @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set` diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/settable_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/settable_struct.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/settable_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/settable_struct.rb index 9706cff2da..238f1e097b 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/settable_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/settable_struct.rb @@ -91,6 +91,16 @@ module Concurrent raise NameError.new("no member '#{member}' in struct") end + private + + # @!visibility private + def initialize_copy(original) + synchronize do + super(original) + ns_initialize_copy + end + end + # @!macro struct_new def self.new(*args, &block) clazz_name = nil diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_lockable_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_lockable_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_lockable_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_struct.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb similarity index 95% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_struct.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb index d94f657552..1fe90c1649 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/abstract_struct.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/abstract_struct.rb @@ -115,6 +115,17 @@ module Concurrent self.class.new(*self.to_h.merge(other, &block).values) end + # @!visibility private + def ns_initialize_copy + @values = @values.map do |val| + begin + val.clone + rescue TypeError + val + end + end + end + # @!visibility private def pr_underscore(clazz) word = clazz.to_s.dup # dup string to workaround JRuby 9.2.0.0 bug https://github.com/jruby/jruby/issues/5229 diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/condition.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/condition.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/condition.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/condition.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_lockable_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/jruby_lockable_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_lockable_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/jruby_lockable_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/jruby_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/jruby_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/jruby_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lock.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/lock.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lock.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/lock.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lockable_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/lockable_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/lockable_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mri_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mri_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mri_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mri_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/mutex_lockable_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/mutex_lockable_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_lockable_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_lockable_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/rbx_lockable_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/rbx_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/rbx_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/rbx_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/truffleruby_object.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/truffleruby_object.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/truffleruby_object.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/truffleruby_object.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/volatile.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/volatile.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/synchronization/volatile.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/synchronization/volatile.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/synchronized_delegator.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/synchronized_delegator.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/synchronized_delegator.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/adder.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/adder.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/adder.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/adder.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/cheap_lockable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/cheap_lockable.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/cheap_lockable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/cheap_lockable.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/data_structures.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/data_structures.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/data_structures.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/power_of_two_tuple.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/power_of_two_tuple.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/power_of_two_tuple.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/striped64.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/striped64.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/striped64.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/striped64.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/volatile.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/volatile.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/volatile.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/volatile.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/xor_shift_random.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/thread_safe/util/xor_shift_random.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/thread_safe/util/xor_shift_random.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/timer_task.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/timer_task.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/timer_task.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/timer_task.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tuple.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/tuple.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tuple.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/tuple.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tvar.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/tvar.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/tvar.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/tvar.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/engine.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/engine.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/engine.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/engine.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/monotonic_time.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/monotonic_time.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/monotonic_time.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/monotonic_time.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_extension_loader.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_extension_loader.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/native_extension_loader.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_integer.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/native_integer.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/native_integer.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/native_integer.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/processor_counter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/processor_counter.rb similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/processor_counter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/processor_counter.rb index 6d6ae8dea4..531ca0a3c9 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.5/lib/concurrent/utility/processor_counter.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/utility/processor_counter.rb @@ -1,3 +1,4 @@ +require 'etc' require 'rbconfig' require 'concurrent/delay' @@ -22,6 +23,8 @@ module Concurrent # occasionally poll this property." Subsequently the result will NOT be # memoized under JRuby. # + # Ruby's Etc.nprocessors will be used if available (MRI 2.2+). + # # On Windows the Win32 API will be queried for the # `NumberOfLogicalProcessors from Win32_Processor`. This will return the # total number "logical processors for the current instance of the @@ -76,6 +79,8 @@ module Concurrent def compute_processor_count if Concurrent.on_jruby? java.lang.Runtime.getRuntime.availableProcessors + elsif Etc.respond_to?(:nprocessors) && (nprocessor = Etc.nprocessors rescue nil) + nprocessor else os_name = RbConfig::CONFIG["target_os"] if os_name =~ /mingw|mswin/ diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/version.rb new file mode 100644 index 0000000000..2539b154dd --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/version.rb @@ -0,0 +1,3 @@ +module Concurrent + VERSION = '1.1.6' +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/scattered_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/scattered_setup.rb deleted file mode 100644 index 36e2974379..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/scattered_setup.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module Cop - module RSpec - # Checks for setup scattered across multiple hooks in an example group. - # - # Unify `before`, `after`, and `around` hooks when possible. - # - # @example - # # bad - # describe Foo do - # before { setup1 } - # before { setup2 } - # end - # - # # good - # describe Foo do - # before do - # setup1 - # setup2 - # end - # end - # - class ScatteredSetup < Cop - MSG = 'Do not define multiple hooks in the same example group.' - - def on_block(node) - return unless example_group?(node) - - analyzable_hooks(node).each do |repeated_hook| - add_offense(repeated_hook) - end - end - - def analyzable_hooks(node) - RuboCop::RSpec::ExampleGroup.new(node) - .hooks - .select { |hook| hook.knowable_scope? && hook.valid_scope? } - .group_by { |hook| [hook.name, hook.scope] } - .values - .reject(&:one?) - .flatten - .map(&:to_node) - end - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/hook.rb deleted file mode 100644 index a942b794da..0000000000 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/hook.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -module RuboCop - module RSpec - # Wrapper for RSpec hook - class Hook < Concept - STANDARDIZED_SCOPES = %i[each context suite].freeze - private_constant(:STANDARDIZED_SCOPES) - - def name - node.method_name - end - - def knowable_scope? - return true unless scope_argument - - scope_argument.sym_type? - end - - def valid_scope? - STANDARDIZED_SCOPES.include?(scope) - end - - def example? - scope.equal?(:each) - end - - def scope - case scope_name - when nil, :each, :example then :each - when :context, :all then :context - when :suite then :suite - else - scope_name - end - end - - private - - def scope_name - scope_argument.to_a.first - end - - def scope_argument - node.send_node.first_argument - end - end - end -end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/config/default.yml b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/config/default.yml similarity index 97% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/config/default.yml rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/config/default.yml index 25f7cef4f4..739e3afd40 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/config/default.yml +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/config/default.yml @@ -394,6 +394,16 @@ RSpec/RepeatedExample: Description: Check for repeated examples within example groups. StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExample +RSpec/RepeatedExampleGroupBody: + Enabled: true + Description: Check for repeated describe and context block body. + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupBody + +RSpec/RepeatedExampleGroupDescription: + Enabled: true + Description: Check for repeated example group descriptions. + StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/RepeatedExampleGroupDescription + RSpec/ReturnFromStub: Enabled: true Description: Checks for consistent style of stub's return setting. diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop-rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop-rspec.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop-rspec.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop-rspec.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/align_left_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/align_left_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/align_left_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/align_left_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/align_right_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/align_right_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/align_right_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/align_right_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/any_instance.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/any_instance.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/any_instance.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/any_instance.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/around_block.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/around_block.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/around_block.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/around_block.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/be.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/be.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/be.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/be.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/be_eql.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/be_eql.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/be_eql.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/be_eql.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/before_after_all.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/before_after_all.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/before_after_all.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/before_after_all.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/capybara/current_path_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/capybara/feature_methods.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/capybara/feature_methods.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/context_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/context_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/context_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/context_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/context_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/context_wording.rb similarity index 84% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/context_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/context_wording.rb index 9b452f2612..285cf263a0 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/context_wording.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/context_wording.rb @@ -5,7 +5,11 @@ module RuboCop module RSpec # Checks that `context` docstring starts with an allowed prefix. # - # @see https://github.com/reachlocal/rspec-style-guide#context-descriptions + # The default list of prefixes is minimal. Users are encouraged to tailor + # the configuration to meet project needs. Other acceptable prefixes may + # include `if`, `unless`, `for`, `before`, `after`, or `during`. + # + # @see https://rspec.rubystyle.guide/#context-descriptions # @see http://www.betterspecs.org/#contexts # # @example `Prefixes` configuration diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/cop.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/cop.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/cop.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/cop.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_class.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_class.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_method.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_method.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_method.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_method.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_symbol.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_symbol.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/describe_symbol.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/describe_symbol.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/described_class.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/described_class.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/described_class.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/described_class.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/described_class_module_wrapping.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/described_class_module_wrapping.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/described_class_module_wrapping.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/dialect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/dialect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/dialect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/dialect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_final_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_final_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_final_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/empty_line_after_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/empty_line_after_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_length.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_length.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_length.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_length.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_without_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_without_description.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_without_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_without_description.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/example_wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/example_wording.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_actual.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_actual.rb similarity index 63% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_actual.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_actual.rb index c945499fd3..3bffe2179e 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_actual.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_actual.rb @@ -41,11 +41,31 @@ module RuboCop regexp ].freeze - def_node_matcher :expect_literal, '(send _ :expect $#literal?)' + SUPPORTED_MATCHERS = %i[eq eql equal be].freeze + + def_node_matcher :expect_literal, <<~PATTERN + (send + (send nil? :expect $#literal?) + #{Runners::ALL.node_pattern_union} + { + (send (send nil? $:be) :== $_) + (send nil? $_ $_ ...) + } + ) + PATTERN def on_send(node) expect_literal(node) do |argument| - add_offense(argument) + add_offense(node, location: argument.source_range) + end + end + + def autocorrect(node) + actual, matcher, expected = expect_literal(node) + lambda do |corrector| + return unless SUPPORTED_MATCHERS.include?(matcher) + + swap(corrector, actual, expected) end end @@ -65,6 +85,11 @@ module RuboCop COMPLEX_LITERALS.include?(node.type) && node.each_child_node.all?(&method(:literal?)) end + + def swap(corrector, actual, expected) + corrector.replace(actual.source_range, expected.source) + corrector.replace(expected.source_range, actual.source) + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_change.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_change.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_change.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_change.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_in_hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_in_hook.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_in_hook.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_in_hook.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_output.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_output.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/expect_output.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/expect_output.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/create_list.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/create_list.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/create_list.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/file_path.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/file_path.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/file_path.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/file_path.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/focus.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/focus.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/focus.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/focus.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/hook_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/hook_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/hook_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/hook_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/hooks_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/hooks_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/hooks_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/hooks_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_block_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_block_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_block_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_expect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_expect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/implicit_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/implicit_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/instance_spy.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/instance_spy.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/instance_spy.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/instance_spy.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/instance_variable.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/instance_variable.rb similarity index 81% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/instance_variable.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/instance_variable.rb index a55d47896d..3dfec98597 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/instance_variable.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/instance_variable.rb @@ -58,6 +58,13 @@ module RuboCop (block (send (const nil? :Class) :new ...) ...) PATTERN + def_node_matcher :custom_matcher?, <<-PATTERN + (block { + (send nil? :matcher sym) + (send (const (const nil? :RSpec) :Matchers) :define sym) + } ...) + PATTERN + def_node_search :ivar_usage, '$(ivar $_)' def_node_search :ivar_assigned?, '(ivasgn % ...)' @@ -66,8 +73,8 @@ module RuboCop return unless spec_group?(node) ivar_usage(node) do |ivar, name| - return if inside_dynamic_class?(ivar) - return if assignment_only? && !ivar_assigned?(node, name) + next if valid_usage?(ivar) + next if assignment_only? && !ivar_assigned?(node, name) add_offense(ivar) end @@ -75,8 +82,10 @@ module RuboCop private - def inside_dynamic_class?(node) - node.each_ancestor(:block).any? { |block| dynamic_class?(block) } + def valid_usage?(node) + node.each_ancestor(:block).any? do |block| + dynamic_class?(block) || custom_matcher?(block) + end end def assignment_only? diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/invalid_predicate_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/it_behaves_like.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/it_behaves_like.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/it_behaves_like.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/it_behaves_like.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/iterated_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/iterated_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/iterated_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/iterated_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/leading_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/leading_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/leading_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/leading_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/leaky_constant_declaration.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/leaky_constant_declaration.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/leaky_constant_declaration.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/let_before_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/let_before_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/let_before_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/let_before_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/let_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/let_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/let_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/let_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_expectation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_expectation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_expectation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_expectation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_spies.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_spies.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/message_spies.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/message_spies.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/missing_example_group_argument.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/missing_example_group_argument.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/missing_example_group_argument.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_describes.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_describes.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_describes.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_describes.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_expectations.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_expectations.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_expectations.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_expectations.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_subjects.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_subjects.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/multiple_subjects.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/multiple_subjects.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/named_subject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/named_subject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/named_subject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/named_subject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/nested_groups.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/nested_groups.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/nested_groups.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/nested_groups.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/not_to_not.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/not_to_not.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/not_to_not.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/not_to_not.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/overwriting_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/overwriting_setup.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/overwriting_setup.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/overwriting_setup.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/pending.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/pending.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/pending.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/pending.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/predicate_matcher.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/predicate_matcher.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/predicate_matcher.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/predicate_matcher.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/rails/http_status.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/rails/http_status.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/rails/http_status.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/rails/http_status.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/receive_counts.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/receive_counts.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/receive_counts.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/receive_counts.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/receive_never.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/receive_never.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/receive_never.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/receive_never.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/repeated_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_description.rb similarity index 74% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/repeated_description.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_description.rb index 25051c5ba6..36b79973b1 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/repeated_description.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_description.rb @@ -29,6 +29,17 @@ module RuboCop # end # end # + # # good + # RSpec.describe User do + # it 'is valid' do + # # ... + # end + # + # it 'is valid', :flag do + # # ... + # end + # end + # class RepeatedDescription < Cop MSG = "Don't repeat descriptions within an example group." @@ -47,14 +58,18 @@ module RuboCop grouped_examples = RuboCop::RSpec::ExampleGroup.new(node) .examples - .group_by(&:doc_string) + .group_by { |example| example_signature(example) } grouped_examples - .select { |description, group| description && group.size > 1 } + .select { |signatures, group| signatures.any? && group.size > 1 } .values .flatten .map(&:definition) end + + def example_signature(example) + [example.metadata, example.doc_string] + end end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/repeated_example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/repeated_example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb new file mode 100644 index 0000000000..ab55a509fa --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_body.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Check for repeated describe and context block body. + # + # @example + # + # # bad + # describe 'cool feature x' do + # it { cool_predicate } + # end + # + # describe 'cool feature y' do + # it { cool_predicate } + # end + # + # # good + # describe 'cool feature' do + # it { cool_predicate } + # end + # + # describe 'another cool feature' do + # it { another_predicate } + # end + # + # # good + # context 'when case x', :tag do + # it { cool_predicate } + # end + # + # context 'when case y' do + # it { cool_predicate } + # end + # + class RepeatedExampleGroupBody < Cop + MSG = 'Repeated %s block body on line(s) %s' + + def_node_matcher :several_example_groups?, <<-PATTERN + (begin <#example_group_with_body? #example_group_with_body? ...>) + PATTERN + + def_node_matcher :metadata, '(block (send _ _ _ $...) ...)' + def_node_matcher :body, '(block _ args $...)' + + def_node_matcher :skip_or_pending?, <<-PATTERN + (block <(send nil? {:skip :pending}) ...>) + PATTERN + + def on_begin(node) + return unless several_example_groups?(node) + + repeated_group_bodies(node).each do |group, repeats| + add_offense(group, message: message(group, repeats)) + end + end + + private + + def repeated_group_bodies(node) + node + .children + .select { |child| example_group_with_body?(child) } + .reject { |child| skip_or_pending?(child) } + .group_by { |group| signature_keys(group) } + .values + .reject(&:one?) + .flat_map { |groups| add_repeated_lines(groups) } + end + + def add_repeated_lines(groups) + repeated_lines = groups.map(&:first_line) + groups.map { |group| [group, repeated_lines - [group.first_line]] } + end + + def signature_keys(group) + [metadata(group), body(group)] + end + + def message(group, repeats) + format(MSG, group: group.method_name, loc: repeats) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb new file mode 100644 index 0000000000..17da2b5cf6 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/repeated_example_group_description.rb @@ -0,0 +1,96 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Check for repeated example group descriptions. + # + # @example + # + # # bad + # describe 'cool feature' do + # # example group + # end + # + # describe 'cool feature' do + # # example group + # end + # + # # bad + # context 'when case x' do + # # example group + # end + # + # describe 'when case x' do + # # example group + # end + # + # # good + # describe 'cool feature' do + # # example group + # end + # + # describe 'another cool feature' do + # # example group + # end + # + # # good + # context 'when case x' do + # # example group + # end + # + # context 'when another case' do + # # example group + # end + # + class RepeatedExampleGroupDescription < Cop + MSG = 'Repeated %s block description on line(s) %s' + + def_node_matcher :several_example_groups?, <<-PATTERN + (begin <#example_group? #example_group? ...>) + PATTERN + + def_node_matcher :doc_string_and_metadata, <<-PATTERN + (block (send _ _ $_ $...) ...) + PATTERN + + def_node_matcher :skip_or_pending?, <<-PATTERN + (block <(send nil? {:skip :pending}) ...>) + PATTERN + + def_node_matcher :empty_description?, '(block (send _ _) ...)' + + def on_begin(node) + return unless several_example_groups?(node) + + repeated_group_descriptions(node).each do |group, repeats| + add_offense(group, message: message(group, repeats)) + end + end + + private + + def repeated_group_descriptions(node) + node + .children + .select { |child| example_group?(child) } + .reject { |child| skip_or_pending?(child) } + .reject { |child| empty_description?(child) } + .group_by { |group| doc_string_and_metadata(group) } + .values + .reject(&:one?) + .flat_map { |groups| add_repeated_lines(groups) } + end + + def add_repeated_lines(groups) + repeated_lines = groups.map(&:first_line) + groups.map { |group| [group, repeated_lines - [group.first_line]] } + end + + def message(group, repeats) + format(MSG, group: group.method_name, loc: repeats) + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/return_from_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/return_from_stub.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/return_from_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/return_from_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/scattered_let.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/scattered_let.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/scattered_let.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/scattered_let.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/scattered_setup.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/scattered_setup.rb new file mode 100644 index 0000000000..f54a0a482e --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/scattered_setup.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +module RuboCop + module Cop + module RSpec + # Checks for setup scattered across multiple hooks in an example group. + # + # Unify `before`, `after`, and `around` hooks when possible. + # + # @example + # # bad + # describe Foo do + # before { setup1 } + # before { setup2 } + # end + # + # # good + # describe Foo do + # before do + # setup1 + # setup2 + # end + # end + # + class ScatteredSetup < Cop + MSG = 'Do not define multiple `%s` hooks in the same '\ + 'example group (also defined on %s).' + + def on_block(node) + return unless example_group?(node) + + repeated_hooks(node).each do |occurrences| + lines = occurrences.map(&:first_line) + + occurrences.each do |occurrence| + lines_except_current = lines - [occurrence.first_line] + message = format(MSG, hook_name: occurrences.first.method_name, + lines: lines_msg(lines_except_current)) + add_offense(occurrence, message: message) + end + end + end + + def repeated_hooks(node) + hooks = RuboCop::RSpec::ExampleGroup.new(node) + .hooks + .select(&:knowable_scope?) + .group_by { |hook| [hook.name, hook.scope, hook.metadata] } + .values + .reject(&:one?) + + hooks.map do |hook| + hook.map(&:to_node) + end + end + + def lines_msg(numbers) + if numbers.size == 1 + "line #{numbers.first}" + else + "lines #{numbers.join(', ')}" + end + end + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/shared_context.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/shared_context.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/shared_context.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/shared_context.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/shared_examples.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/shared_examples.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/shared_examples.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/shared_examples.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/single_argument_message_chain.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/single_argument_message_chain.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/single_argument_message_chain.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/subject_stub.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/subject_stub.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/subject_stub.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/subject_stub.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/unspecified_exception.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/unspecified_exception.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/unspecified_exception.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/unspecified_exception.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/verified_doubles.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/verified_doubles.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/verified_doubles.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/verified_doubles.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/void_expect.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/void_expect.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/void_expect.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/void_expect.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/yield.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/yield.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec/yield.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec/yield.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec_cops.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec_cops.rb similarity index 96% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec_cops.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec_cops.rb index 309dfc6d89..5f2a1719b4 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/cop/rspec_cops.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/cop/rspec_cops.rb @@ -74,6 +74,8 @@ require_relative 'rspec/receive_counts' require_relative 'rspec/receive_never' require_relative 'rspec/repeated_description' require_relative 'rspec/repeated_example' +require_relative 'rspec/repeated_example_group_body' +require_relative 'rspec/repeated_example_group_description' require_relative 'rspec/return_from_stub' require_relative 'rspec/scattered_let' require_relative 'rspec/scattered_setup' diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/align_let_brace.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/align_let_brace.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/align_let_brace.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/align_let_brace.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/blank_line_separation.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/blank_line_separation.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/blank_line_separation.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/blank_line_separation.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/concept.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/concept.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/concept.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/concept.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/config_formatter.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/config_formatter.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/config_formatter.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/config_formatter.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/description_extractor.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/description_extractor.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/description_extractor.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/description_extractor.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/example.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/example.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/example.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/example.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/example_group.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/example_group.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/example_group.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/example_group.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/factory_bot.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/factory_bot.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/factory_bot.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/factory_bot.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/final_end_location.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/final_end_location.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/final_end_location.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/final_end_location.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/hook.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/hook.rb new file mode 100644 index 0000000000..5dc6d744e2 --- /dev/null +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/hook.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +module RuboCop + module RSpec + # Wrapper for RSpec hook + class Hook < Concept + def_node_matcher :extract_metadata, <<~PATTERN + (block + { + (send _ _ #valid_scope? $...) + (send _ _ $...) + } + ... + ) + PATTERN + + def name + node.method_name + end + + def knowable_scope? + scope_argument.nil? || + scope_argument.sym_type? || + scope_argument.hash_type? + end + + def example? + scope.equal?(:each) + end + + def scope + return :each if scope_argument&.hash_type? + + case scope_name + when nil, :each, :example then :each + when :context, :all then :context + when :suite then :suite + end + end + + def metadata + (extract_metadata(node) || []) + .map { |meta| transform_metadata(meta) } + .flatten + .inject(&:merge) + end + + private + + def valid_scope?(node) + node&.sym_type? && Hooks::Scopes::ALL.include?(node.value) + end + + def transform_metadata(meta) + if meta.sym_type? + { meta => true } + else + # This check is to be able to compare those two hooks: + # + # before(:example, :special) { ... } + # before(:example, special: true) { ... } + # + # In the second case it's a node with a pair that has a value + # of a `true_type?`. + meta.pairs.map { |pair| { pair.key => transform_true(pair.value) } } + end + end + + def transform_true(node) + node.true_type? ? true : node + end + + def scope_name + scope_argument.to_a.first + end + + def scope_argument + node.send_node.first_argument + end + end + end +end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/inject.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/inject.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/inject.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/inject.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/language.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/language.rb similarity index 93% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/language.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/language.rb index d67a3ea163..60e182a82c 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/language.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/language.rb @@ -94,6 +94,18 @@ module RuboCop append_after ] ) + + module Scopes + ALL = SelectorSet.new( + %i[ + each + example + context + all + suite + ] + ) + end end module Helpers diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/language/node_pattern.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/language/node_pattern.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/language/node_pattern.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/language/node_pattern.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/node.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/node.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/node.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/node.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/top_level_describe.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/top_level_describe.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/top_level_describe.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/top_level_describe.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/util.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/util.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/util.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/util.rb diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/version.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/version.rb similarity index 86% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/version.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/version.rb index c1e18eb900..b1e95a6068 100644 --- a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/version.rb +++ b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/version.rb @@ -4,7 +4,7 @@ module RuboCop module RSpec # Version information for the RSpec RuboCop plugin. module Version - STRING = '1.37.1' + STRING = '1.38.0' end end end diff --git a/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/wording.rb b/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/wording.rb similarity index 100% rename from Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.37.1/lib/rubocop/rspec/wording.rb rename to Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/rubocop-rspec-1.38.0/lib/rubocop/rspec/wording.rb