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 2021-10-11 15:31:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-spring (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-spring.new.2443 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-spring"

Mon Oct 11 15:31:41 2021 rev:20 rq:924525 version:3.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-spring/rubygem-spring.changes    
2020-09-14 12:30:19.825175255 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-spring.new.2443/rubygem-spring.changes  
2021-10-11 15:32:39.014944335 +0200
@@ -1,0 +2,9 @@
+Sun Oct 10 07:42:29 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 3.0.0
+
+  * Require applications to have reloading enabled in the managed environments.
+  * Require Ruby 2.5.
+  * Require Rails 5.2.
+
+-------------------------------------------------------------------

Old:
----
  spring-2.1.1.gem

New:
----
  spring-3.0.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-spring.spec ++++++
--- /var/tmp/diff_new_pack.A4kjJM/_old  2021-10-11 15:32:39.522945149 +0200
+++ /var/tmp/diff_new_pack.A4kjJM/_new  2021-10-11 15:32:39.522945149 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-spring
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -24,12 +24,12 @@
 #
 
 Name:           rubygem-spring
-Version:        2.1.1
+Version:        3.0.0
 Release:        0
 %define mod_name spring
 %define mod_full_name %{mod_name}-%{version}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  %{ruby >= 2.4.0}
+BuildRequires:  %{ruby >= 2.5.0}
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  ruby-macros >= 5
 BuildRequires:  update-alternatives

++++++ spring-2.1.1.gem -> spring-3.0.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2020-08-25 02:27:48.000000000 +0200
+++ new/README.md       2021-09-09 01:18:19.000000000 +0200
@@ -16,8 +16,8 @@
 
 ## Compatibility
 
-* Ruby versions: MRI 2.4, MRI 2.5, MRI 2.6
-* Rails versions: 4.2, 5.0, 5.1, 5.2, 6.0 (Spring is installed by default when 
you do
+* 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)
 
 Spring makes extensive use of `Process.fork`, so won't be able to
@@ -65,6 +65,16 @@
 Simply create an `.envrc` file with the command `PATH_add bin` in your
 Rails directory.
 
+### Enable reloading
+
+Spring reloads application code, and therefore needs the application to have
+reloading enabled.
+
+Please, make sure `config.cache_classes` is `false` in the environments that
+Spring manages. That setting is typically configured in
+`config/environments/*.rb`. In particular, make sure it is `false` for the
+`test` environment.
+
 ### Usage
 
 For this walkthrough I've generated a new Rails application, and run
@@ -257,12 +267,10 @@
 
 ## Class reloading
 
-Spring uses Rails' class reloading mechanism
-(`ActiveSupport::Dependencies`) to keep your code up to date between
-test runs. This is the same mechanism which allows you to see changes
-during development when you refresh the page. However, you may never
-have used this mechanism with your `test` environment before, and this
-can cause problems.
+Spring uses Rails' class reloading mechanism to keep your code up to date
+between test runs. This is the same mechanism which allows you to see changes
+during development when you refresh the page. However, you may never have used
+this mechanism with your `test` environment before, and this can cause 
problems.
 
 It's important to realise that code reloading means that the constants
 in your application are *different objects* after files have changed:
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       2020-08-25 02:27:48.000000000 +0200
+++ new/lib/spring/application.rb       2021-09-09 01:18:19.000000000 +0200
@@ -91,23 +91,21 @@
 
       require Spring.application_root_path.join("config", "application")
 
-      unless Rails.respond_to?(:gem_version) && Rails.gem_version >= 
Gem::Version.new('4.2.0')
-        raise "Spring only supports Rails >= 4.2.0"
+      unless Rails.respond_to?(:gem_version) && Rails.gem_version >= 
Gem::Version.new('5.2.0')
+        raise "Spring only supports Rails >= 5.2.0"
       end
 
-      # config/environments/test.rb will have config.cache_classes = true. 
However
-      # we want it to be false so that we can reload files. This is a hack to
-      # override the effect of config.cache_classes = true. We can then 
actually
-      # set config.cache_classes = false after loading the environment.
-      Rails::Application.initializer :initialize_dependency_mechanism, group: 
:all do
-        ActiveSupport::Dependencies.mechanism = :load
+      Rails::Application.initializer :ensure_reloading_is_enabled, group: :all 
do
+        if Rails.application.config.cache_classes
+          raise <<-MSG.strip_heredoc
+            Spring reloads, and therefore needs the application to have 
reloading enabled.
+            Please, set config.cache_classes to false in 
config/environments/#{Rails.env}.rb.
+          MSG
+        end
       end
 
       require Spring.application_root_path.join("config", "environment")
 
-      @original_cache_classes = Rails.application.config.cache_classes
-      Rails.application.config.cache_classes = false
-
       disconnect_database
 
       @preloaded = :success
@@ -163,20 +161,9 @@
       setup command
 
       if Rails.application.reloaders.any?(&:updated?)
-        # Rails 5.1 forward-compat. AD::R is deprecated to AS::R in Rails 5.
-        if defined? ActiveSupport::Reloader
-          Rails.application.reloader.reload!
-        else
-          ActionDispatch::Reloader.cleanup!
-          ActionDispatch::Reloader.prepare!
-        end
+        Rails.application.reloader.reload!
       end
 
-      # Ensure we boot the process in the directory the command was called 
from,
-      # not from the directory Spring started in
-      original_dir = Dir.pwd
-      Dir.chdir(env['PWD'] || original_dir)
-
       pid = fork {
         Process.setsid
         IGNORE_SIGNALS.each { |sig| trap(sig, "DEFAULT") }
@@ -203,14 +190,6 @@
         # Load in the current env vars, except those which *were* changed when 
Spring started
         env.each { |k, v| ENV[k] ||= v }
 
-        # requiring is faster, so if config.cache_classes was true in
-        # the environment's config file, then we can respect that from
-        # here on as we no longer need constant reloading.
-        if @original_cache_classes
-          ActiveSupport::Dependencies.mechanism = :require
-          Rails.application.config.cache_classes = true
-        end
-
         connect_database
         srand
 
@@ -242,7 +221,6 @@
       # (i.e. to prevent `spring rake -T | grep db` from hanging forever),
       # even when exception is raised before forking (i.e. preloading).
       reset_streams
-      Dir.chdir(original_dir)
     end
 
     def terminate
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       2020-08-25 02:27:48.000000000 +0200
+++ new/lib/spring/env.rb       2021-09-09 01:18:19.000000000 +0200
@@ -1,7 +1,5 @@
 require "pathname"
-require "fileutils"
 require "digest/md5"
-require "tmpdir"
 
 require "spring/version"
 require "spring/sid"
@@ -33,10 +31,12 @@
     end
 
     def tmp_path
+      require "tmpdir"
       path = Pathname.new(
         ENV["SPRING_TMP_PATH"] ||
           File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, 
"spring-#{Process.uid}")
       )
+      require "fileutils"
       FileUtils.mkdir_p(path) unless path.exist?
       path
     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   2020-08-25 02:27:48.000000000 +0200
+++ new/lib/spring/version.rb   2021-09-09 01:18:19.000000000 +0200
@@ -1,3 +1,3 @@
 module Spring
-  VERSION = "2.1.1"
+  VERSION = "3.0.0"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2020-08-25 02:27:48.000000000 +0200
+++ new/metadata        2021-09-09 01:18:19.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: spring
 version: !ruby/object:Gem::Version
-  version: 2.1.1
+  version: 3.0.0
 platform: ruby
 authors:
 - Jon Leighton
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain: []
-date: 2020-08-25 00:00:00.000000000 Z
+date: 2021-09-08 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: rake
@@ -99,7 +99,7 @@
 licenses:
 - MIT
 metadata: {}
-post_install_message: 
+post_install_message:
 rdoc_options: []
 require_paths:
 - lib
@@ -107,15 +107,15 @@
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
-      version: 2.4.0
+      version: 2.5.0
 required_rubygems_version: !ruby/object:Gem::Requirement
   requirements:
   - - ">="
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.0.3
-signing_key: 
+rubygems_version: 3.2.22
+signing_key:
 specification_version: 4
 summary: Rails application preloader
 test_files: []

Reply via email to