Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-spring for openSUSE:Factory checked in at 2022-02-07 23:37:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-spring (Old) and /work/SRC/openSUSE:Factory/.rubygem-spring.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-spring" Mon Feb 7 23:37:47 2022 rev:21 rq:949577 version:4.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-spring/rubygem-spring.changes 2021-10-11 15:32:39.014944335 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-spring.new.1898/rubygem-spring.changes 2022-02-07 23:38:50.922133131 +0100 @@ -1,0 +2,11 @@ +Thu Jan 27 17:38:54 UTC 2022 - Marcus Rueckert <[email protected]> + +- limit to ruby 2.7.0 on 15.x + +------------------------------------------------------------------- +Tue Jan 25 07:37:31 UTC 2022 - Stephan Kulow <[email protected]> + +updated to version 4.0.0 + no changelog found + +------------------------------------------------------------------- Old: ---- spring-3.0.0.gem New: ---- spring-4.0.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-spring.spec ++++++ --- /var/tmp/diff_new_pack.Ahe9SX/_old 2022-02-07 23:38:51.398129874 +0100 +++ /var/tmp/diff_new_pack.Ahe9SX/_new 2022-02-07 23:38:51.402129847 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-spring # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,12 +24,18 @@ # Name: rubygem-spring -Version: 3.0.0 +Version: 4.0.0 Release: 0 %define mod_name spring %define mod_full_name %{mod_name}-%{version} +# MANUAL +%if 0%{?suse_version} == 1500 +%define rb_build_versions ruby27 +%define rb_build_ruby_abis ruby:2.7.0 +%endif +# /MANUAL BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{ruby >= 2.5.0} +BuildRequires: %{ruby >= 2.7.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 BuildRequires: update-alternatives ++++++ gem2rpm.yml ++++++ --- /var/tmp/diff_new_pack.Ahe9SX/_old 2022-02-07 23:38:51.434129628 +0100 +++ /var/tmp/diff_new_pack.Ahe9SX/_new 2022-02-07 23:38:51.438129600 +0100 @@ -67,5 +67,9 @@ # bar # :post: |- # /bin/echo foo -# +:preamble: |- + %if 0%{?suse_version} == 1500 + %define rb_build_versions ruby27 + %define rb_build_ruby_abis ruby:2.7.0 + %endif ++++++ spring-3.0.0.gem -> spring-4.0.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE.txt new/LICENSE.txt --- old/LICENSE.txt 2021-09-09 01:18:19.000000000 +0200 +++ new/LICENSE.txt 2021-12-10 19:05:34.000000000 +0100 @@ -1,3 +1,4 @@ +Copyright (c) 2017-2021 Rafael Mendon??a Fran??a Copyright (c) 2012-2017 Jon Leighton MIT License diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2021-09-09 01:18:19.000000000 +0200 +++ new/README.md 2021-12-10 19:05:34.000000000 +0100 @@ -1,10 +1,10 @@ # Spring -[](https://travis-ci.org/rails/spring) -[](http://badge.fury.io/rb/spring) +[](https://github.com/rails/spring/actions/workflows/ci.yml?branch=main) +[](https://badge.fury.io/rb/spring) Spring is a Rails application preloader. It speeds up development by -keeping your application running in the background so you don't need to +keeping your application running in the background, so you don't need to boot it every time you run a test, rake task or migration. ## Features @@ -16,9 +16,8 @@ ## Compatibility -* Ruby versions: MRI 2.5, MRI 2.6 -* Rails versions: 5.2, 6.0 (Spring is installed by default when you do - `rails new` to generate your application) +* Ruby versions: MRI 2.7, MRI 3.0, MRI 3.1 +* Rails versions: 6.0, 6.1, 7.0 Spring makes extensive use of `Process.fork`, so won't be able to provide a speed up on platforms which don't support forking (Windows, JRuby). @@ -50,13 +49,14 @@ ``` ruby begin load File.expand_path('../spring', __FILE__) -rescue LoadError +rescue LoadError => e + raise unless e.message.include?('spring') end ``` On platforms where Spring is installed and supported, this snippet hooks Spring into the execution of commands. In other cases, the snippet -will just be silently ignored and the lines after it will be executed as +will just be silently ignored, and the lines after it will be executed as normal. If you don't want to prefix every command you type with `bin/`, you @@ -178,7 +178,7 @@ ``` There's no need to "shut down" Spring. This will happen automatically -when you close your terminal. However if you do want to do a manual shut +when you close your terminal. However, if you do want to do a manual shut down, use the `stop` command: ``` @@ -198,12 +198,13 @@ ### Deployment You must not install Spring on your production environment. To prevent it from -being installed, provide the `--without development test` argument to the +being installed, run the `bundle config set without 'development test'` before `bundle install` command which is used to install gems on your production machines: ``` -$ bundle install --without development test +$ bundle config set without 'development test' +$ bundle install ``` ## Commands @@ -248,6 +249,7 @@ * [spring-commands-rubocop](https://github.com/p0deje/spring-commands-rubocop) * [spring-commands-rackup](https://github.com/wintersolutions/spring-commands-rackup) * [spring-commands-rack-console](https://github.com/wintersolutions/spring-commands-rack-console) +* [spring-commands-standard](https://github.com/lakim/spring-commands-standard) ## Use without adding to bundle @@ -370,7 +372,7 @@ Spring.watch "config/some_config_file.yml" ``` -By default Spring polls the filesystem for changes once every 0.2 seconds. This +By default, Spring polls the filesystem for changes once every 0.2 seconds. This method requires zero configuration, but if you find that it's using too much CPU, then you can use event-based file system listening by installing the @@ -390,24 +392,24 @@ The following environment variables are used by Spring: -* `DISABLE_SPRING` - If set, Spring will be bypassed and your +* `DISABLE_SPRING` - If set, Spring will be bypassed, and your application will boot in a foreground process * `SPRING_LOG` - The path to a file which Spring will write log messages to. * `SPRING_TMP_PATH` - The directory where Spring should write its temporary - files (a pidfile and a socket). By default we use the + files (a pidfile and a socket). By default, we use the `XDG_RUNTIME_DIR` environment variable, or else `Dir.tmpdir`, and then create a directory in that named `spring-$UID`. We don't use your Rails application's `tmp/` directory because that may be on a filesystem which doesn't support UNIX sockets. * `SPRING_APPLICATION_ID` - Used to identify distinct Rails - applications. By default it is an MD5 hash of the current + applications. By default, it is an MD5 hash of the current `RUBY_VERSION`, and the path to your Rails project root. * `SPRING_SOCKET` - The path which should be used for the UNIX socket which Spring uses to communicate with the long-running Spring server - process. By default this is `SPRING_TMP_PATH/SPRING_APPLICATION_ID`. + process. By default, this is `SPRING_TMP_PATH/SPRING_APPLICATION_ID`. * `SPRING_PIDFILE` - The path which should be used to store the pid of - the long-running Spring server process. By default this is related to + the long-running Spring server process. By default, this is related to the socket path; if the socket path is `/foo/bar/spring.sock` the pidfile will be `/foo/bar/spring.pid`. * `SPRING_SERVER_COMMAND` - The command to run to start up the Spring Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/application.rb new/lib/spring/application.rb --- old/lib/spring/application.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/application.rb 2021-12-10 19:05:34.000000000 +0100 @@ -11,7 +11,8 @@ @original_env = original_env @spring_env = spring_env @mutex = Mutex.new - @waiting = Set.new + @waiting = {} + @clients = {} @preloaded = false @state = :initialized @interrupt = IO.pipe @@ -91,8 +92,8 @@ require Spring.application_root_path.join("config", "application") - unless Rails.respond_to?(:gem_version) && Rails.gem_version >= Gem::Version.new('5.2.0') - raise "Spring only supports Rails >= 5.2.0" + unless Rails.respond_to?(:gem_version) && Rails.gem_version >= Gem::Version.new('6.0.0') + raise "Spring only supports Rails >= 6.0.0" end Rails::Application.initializer :ensure_reloading_is_enabled, group: :all do @@ -115,7 +116,7 @@ raise e unless initialized? ensure watcher.add loaded_application_features - watcher.add Spring.gemfile, "#{Spring.gemfile}.lock" + watcher.add Spring.gemfile, Spring.gemfile_lock if defined?(Rails) && Rails.application watcher.add Rails.application.paths["config/initializers"] @@ -149,10 +150,23 @@ log "got client" manager.puts + @clients[client] = true + _stdout, stderr, _stdin = streams = 3.times.map { client.recv_io } [STDOUT, STDERR, STDIN].zip(streams).each { |a, b| a.reopen(b) } - preload unless preloaded? + if preloaded? + client.puts(0) # preload success + else + begin + preload + client.puts(0) # preload success + rescue Exception + log "preload failed" + client.puts(1) # preload failure + raise + end + end args, env = JSON.load(client.read(client.gets.to_i)).values_at("args", "env") command = Spring.command(args.shift) @@ -165,6 +179,10 @@ end pid = fork { + # Make sure to close other clients otherwise their graceful termination + # will be impossible due to reference from this fork. + @clients.each_key { |c| c.close if c != client } + Process.setsid IGNORE_SIGNALS.each { |sig| trap(sig, "DEFAULT") } trap("TERM", "DEFAULT") @@ -227,7 +245,7 @@ if exiting? # Ensure that we do not ignore subsequent termination attempts log "forced exit" - @waiting.each { |pid| Process.kill("TERM", pid) } + @waiting.each_key { |pid| Process.kill("TERM", pid) } Kernel.exit else state! :terminating @@ -286,7 +304,7 @@ ensure if $! lib = File.expand_path("..", __FILE__) - $!.backtrace.reject! { |line| line.start_with?(lib) } + $!.backtrace.reject! { |line| line.start_with?(lib) } unless $!.backtrace.frozen? end end end @@ -319,7 +337,7 @@ end def wait(pid, streams, client) - @mutex.synchronize { @waiting << pid } + @mutex.synchronize { @waiting[pid] = true } # Wait in a separate thread so we can run multiple commands at once Spring.failsafe_thread { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/application_manager.rb new/lib/spring/application_manager.rb --- old/lib/spring/application_manager.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/application_manager.rb 2021-12-10 19:05:34.000000000 +0100 @@ -93,7 +93,7 @@ def start_child(preload = false) @child, child_socket = UNIXSocket.pair - Bundler.with_original_env do + Bundler.with_unbundled_env do bundler_dir = File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first) @pid = Process.spawn( { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/client/binstub.rb new/lib/spring/client/binstub.rb --- old/lib/spring/client/binstub.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/client/binstub.rb 2021-12-10 19:05:34.000000000 +0100 @@ -11,41 +11,36 @@ # client is not invoked for whatever reason, then the Kernel.exit won't # happen, and so we'll fall back to the lines after this block, which # should cause the "unsprung" version of the command to run. - LOADER = <<CODE -begin - load File.expand_path('../spring', __FILE__) -rescue LoadError => e - raise unless e.message.include?('spring') -end -CODE + LOADER = <<~CODE + load File.expand_path("spring", __dir__) + CODE # The defined? check ensures these lines don't execute when we load the # binstub from the application process. Which means that in the application # process we'll execute the lines which come after the LOADER block, which # is what we want. - SPRING = <<'CODE' -#!/usr/bin/env ruby + SPRING = <<~CODE + #!/usr/bin/env ruby -# This file loads Spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. + # This file loads Spring without using loading other gems in the Gemfile, in order to be fast. + # It gets overwritten when you run the `spring binstub` command. -unless defined?(Spring) - require 'rubygems' - require 'bundler' - - lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) - spring = lockfile.specs.detect { |spec| spec.name == 'spring' } - if spring - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem 'spring', spring.version - require 'spring/binstub' - end -end -CODE + if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"]) + require "bundler" + + Bundler.locked_gems.specs.find { |spec| spec.name == "spring" }&.tap do |spring| + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem "spring", spring.version + require "spring/binstub" + end + end + CODE OLD_BINSTUB = %{if !Process.respond_to?(:fork) || Gem::Specification.find_all_by_name("spring").empty?} BINSTUB_VARIATIONS = Regexp.union [ + %{load File.expand_path("spring", __dir__)\n}, + %{begin\n load File.expand_path('../spring', __FILE__)\nrescue LoadError => e\n raise unless e.message.include?('spring')\nend\n}, %{begin\n load File.expand_path('../spring', __FILE__)\nrescue LoadError\nend\n}, %{begin\n spring_bin_path = File.expand_path('../spring', __FILE__)\n load spring_bin_path\nrescue LoadError => e\n raise unless e.message.end_with? spring_bin_path, 'spring/binstub'\nend\n}, LOADER @@ -146,7 +141,7 @@ @mode = :add @items = args.drop(1) .map { |name| find_commands name } - .inject(Set.new, :|) + .flatten.uniq .map { |command| Item.new(command) } end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/client/rails.rb new/lib/spring/client/rails.rb --- old/lib/spring/client/rails.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/client/rails.rb 2021-12-10 19:05:34.000000000 +0100 @@ -3,7 +3,7 @@ module Spring module Client class Rails < Command - COMMANDS = Set.new %w(console runner generate destroy test) + COMMANDS = %w(console runner generate destroy test) ALIASES = { "c" => "console", @@ -22,6 +22,8 @@ if COMMANDS.include?(command_name) Run.call(["rails_#{command_name}", *args.drop(2)]) + elsif command_name.start_with?("db:") + Run.call(["rake", *args.drop(1)]) else require "spring/configuration" ARGV.shift diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/client/run.rb new/lib/spring/client/run.rb --- old/lib/spring/client/run.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/client/run.rb 2021-12-10 19:05:34.000000000 +0100 @@ -142,12 +142,17 @@ end def run_command(client, application) - log "sending command" - application.send_io STDOUT application.send_io STDERR application.send_io STDIN + log "waiting for the application to be preloaded" + preload_status = application.gets + preload_status = preload_status.chomp if preload_status + log "app preload status: #{preload_status}" + exit 1 if preload_status == "1" + + log "sending command" send_json application, "args" => args, "env" => ENV.to_hash pid = server.gets diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/configuration.rb new/lib/spring/configuration.rb --- old/lib/spring/configuration.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/configuration.rb 2021-12-10 19:05:34.000000000 +0100 @@ -5,13 +5,24 @@ attr_accessor :application_root, :quiet def gemfile + require "bundler" + if /\s1.9.[0-9]/ === Bundler.ruby_scope.gsub(/[\/\s]+/,'') - ENV["BUNDLE_GEMFILE"] || "Gemfile" + Pathname.new(ENV["BUNDLE_GEMFILE"] || "Gemfile").expand_path else Bundler.default_gemfile end end + def gemfile_lock + case gemfile.to_s + when /\bgems\.rb\z/ + gemfile.sub_ext('.locked') + else + gemfile.sub_ext('.lock') + end + end + def after_fork_callbacks @after_fork_callbacks ||= [] end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/env.rb new/lib/spring/env.rb --- old/lib/spring/env.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/env.rb 2021-12-10 19:05:34.000000000 +0100 @@ -2,7 +2,6 @@ require "digest/md5" require "spring/version" -require "spring/sid" require "spring/configuration" module Spring diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/json.rb new/lib/spring/json.rb --- old/lib/spring/json.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/json.rb 2021-12-10 19:05:34.000000000 +0100 @@ -46,11 +46,9 @@ # See https://github.com/kr/okjson for updates. -require 'stringio' - # Some parts adapted from -# http://golang.org/src/pkg/json/decode.go and -# http://golang.org/src/pkg/utf8/utf8.go +# https://golang.org/src/pkg/json/decode.go and +# https://golang.org/src/pkg/utf8/utf8.go module Spring module OkJson Upstream = '43' @@ -468,19 +466,18 @@ def strenc(s) - t = StringIO.new - t.putc(?") + t = '"'.b r = 0 while r < s.length case s[r] - when ?" then t.print('\\"') - when ?\\ then t.print('\\\\') - when ?\b then t.print('\\b') - when ?\f then t.print('\\f') - when ?\n then t.print('\\n') - when ?\r then t.print('\\r') - when ?\t then t.print('\\t') + when ?" then t << '\\"' + when ?\\ then t << '\\\\' + when ?\b then t << '\\b' + when ?\f then t << '\\f' + when ?\n then t << '\\n' + when ?\r then t << '\\r' + when ?\t then t << '\\t' else c = s[r] # In ruby >= 1.9, s[r] is a codepoint, not a byte. @@ -490,14 +487,14 @@ if c.ord < Spc.ord c = "\\u%04x" % [c.ord] end - t.write(c) + t << c rescue - t.write(Ustrerr) + t << Ustrerr end elsif c < Spc - t.write("\\u%04x" % c) + t << "\\u%04x" % c elsif Spc <= c && c <= ?~ - t.putc(c) + t << c else n = ucharcopy(t, s, r) # ensure valid UTF-8 output r += n - 1 # r is incremented below @@ -505,8 +502,8 @@ end r += 1 end - t.putc(?") - t.string + t << '"' + t end @@ -531,7 +528,7 @@ # 1-byte, 7-bit sequence? if c0 < Utagx - t.putc(c0) + t << c0 return 1 end @@ -544,8 +541,8 @@ # 2-byte, 11-bit sequence? if c0 < Utag3 raise Utf8Error if ((c0&Umask2)<<6 | (c1&Umaskx)) <= Uchar1max - t.putc(c0) - t.putc(c1) + t << c0 + t << c1 return 2 end @@ -559,9 +556,9 @@ if c0 < Utag4 u = (c0&Umask3)<<12 | (c1&Umaskx)<<6 | (c2&Umaskx) raise Utf8Error if u <= Uchar2max - t.putc(c0) - t.putc(c1) - t.putc(c2) + t << c0 + t << c1 + t << c2 return 3 end @@ -574,16 +571,16 @@ if c0 < Utag5 u = (c0&Umask4)<<18 | (c1&Umaskx)<<12 | (c2&Umaskx)<<6 | (c3&Umaskx) raise Utf8Error if u <= Uchar3max - t.putc(c0) - t.putc(c1) - t.putc(c2) - t.putc(c3) + t << c0 + t << c1 + t << c2 + t << c3 return 4 end raise Utf8Error rescue Utf8Error - t.write(Ustrerr) + t << Ustrerr return 1 end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/server.rb new/lib/spring/server.rb --- old/lib/spring/server.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/server.rb 2021-12-10 19:05:34.000000000 +0100 @@ -81,7 +81,8 @@ # This will cause it to be automatically killed once the session # ends (i.e. when the user closes their terminal). def set_pgid - Process.setpgid(0, SID.pgid) + pgid = Process.getpgid(Process.getsid) + Process.setpgid(0, pgid) end # Ignore SIGINT and SIGQUIT otherwise the user typing ^C or ^\ on the command line diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/sid.rb new/lib/spring/sid.rb --- old/lib/spring/sid.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/sid.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,42 +0,0 @@ -begin - # If rubygems is present, keep it out of the way when loading fiddle, - # otherwise if fiddle is not installed then rubygems will load all - # gemspecs in its (futile) search for fiddle, which is slow. - if respond_to?(:gem_original_require, true) - gem_original_require 'fiddle' - else - require 'fiddle' - end -rescue LoadError -end - -module Spring - module SID - def self.fiddle_func - @fiddle_func ||= Fiddle::Function.new( - DL::Handle::DEFAULT['getsid'], - [Fiddle::TYPE_INT], - Fiddle::TYPE_INT - ) - end - - def self.sid - @sid ||= begin - if Process.respond_to?(:getsid) - # Ruby 2 - Process.getsid - elsif defined?(Fiddle) and defined?(DL) - # Ruby 1.9.3 compiled with libffi support - fiddle_func.call(0) - else - # last resort: shell out - `ps -p #{Process.pid} -o sess=`.to_i - end - end - end - - def self.pgid - Process.getpgid(sid) - end - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/version.rb new/lib/spring/version.rb --- old/lib/spring/version.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/version.rb 2021-12-10 19:05:34.000000000 +0100 @@ -1,3 +1,3 @@ module Spring - VERSION = "3.0.0" + VERSION = "4.0.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/watcher/abstract.rb new/lib/spring/watcher/abstract.rb --- old/lib/spring/watcher/abstract.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/watcher/abstract.rb 2021-12-10 19:05:34.000000000 +0100 @@ -19,8 +19,8 @@ @root = File.realpath(root) @latency = latency - @files = Set.new - @directories = Set.new + @files = {} + @directories = {} @stale = false @listeners = [] @@ -63,10 +63,10 @@ synchronize { items.each do |item| if item.directory? - directories << item.realpath.to_s + directories[item.realpath.to_s] = true else begin - files << item.realpath.to_s + files[item.realpath.to_s] = true rescue Errno::ENOENT # Race condition. Ignore symlinks whose target was removed # since the check above, or are deeply chained. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/watcher/polling.rb new/lib/spring/watcher/polling.rb --- old/lib/spring/watcher/polling.rb 2021-09-09 01:18:19.000000000 +0200 +++ new/lib/spring/watcher/polling.rb 2021-12-10 19:05:34.000000000 +0100 @@ -91,7 +91,7 @@ end def expanded_files - files + Dir["{#{directories.map { |d| "#{d}/**/*" }.join(",")}}"] + (files.keys + Dir["{#{directories.keys.map { |d| "#{d}/**/*" }.join(",")}}"]).uniq end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2021-09-09 01:18:19.000000000 +0200 +++ new/metadata 2021-12-10 19:05:34.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: spring version: !ruby/object:Gem::Version - version: 3.0.0 + version: 4.0.0 platform: ruby authors: - Jon Leighton -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2021-09-08 00:00:00.000000000 Z +date: 2021-12-10 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -90,7 +90,6 @@ - lib/spring/json.rb - lib/spring/process_title_updater.rb - lib/spring/server.rb -- lib/spring/sid.rb - lib/spring/version.rb - lib/spring/watcher.rb - lib/spring/watcher/abstract.rb @@ -98,8 +97,9 @@ homepage: https://github.com/rails/spring licenses: - MIT -metadata: {} -post_install_message: +metadata: + rubygems_mfa_required: 'true' +post_install_message: rdoc_options: [] require_paths: - lib @@ -107,15 +107,15 @@ requirements: - - ">=" - !ruby/object:Gem::Version - version: 2.5.0 + version: 2.7.0 required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.2.22 -signing_key: +rubygems_version: 3.2.32 +signing_key: specification_version: 4 summary: Rails application preloader test_files: []
