Hello community,

here is the log from the commit of package rubygem-spring for openSUSE:Factory 
checked in at 2016-10-10 16:22:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-spring (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-spring.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-spring"

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-spring/rubygem-spring.changes    
2016-07-21 07:57:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-spring.new/rubygem-spring.changes       
2016-10-10 16:22:52.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Oct  2 05:08:38 UTC 2016 - [email protected]
+
+- updated to version 2.0.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  spring-1.7.2.gem

New:
----
  spring-2.0.0.gem

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

Other differences:
------------------
++++++ rubygem-spring.spec ++++++
--- /var/tmp/diff_new_pack.KwOlqq/_old  2016-10-10 16:22:54.000000000 +0200
+++ /var/tmp/diff_new_pack.KwOlqq/_new  2016-10-10 16:22:54.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-spring
-Version:        1.7.2
+Version:        2.0.0
 Release:        0
 %define mod_name spring
 %define mod_full_name %{mod_name}-%{version}

++++++ spring-1.7.2.gem -> spring-2.0.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2016-07-01 19:16:53.000000000 +0200
+++ new/README.md       2016-10-01 20:48:52.000000000 +0200
@@ -17,7 +17,8 @@
 ## Compatibility
 
 * Ruby versions: MRI 1.9.3, MRI 2.0, MRI 2.1, MRI 2.2
-* Rails versions: 4.0+ (in Rails 4.1 and up Spring is included by default)
+* Rails versions: 4.2, 5.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
 provide a speed up on platforms which don't support forking (Windows, JRuby).
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       2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/application.rb       2016-10-01 20:48:52.000000000 +0200
@@ -192,7 +192,6 @@
       }
 
       disconnect_database
-      reset_streams
 
       log "forked #{pid}"
       manager.puts pid
@@ -209,6 +208,11 @@
 
       client.puts(1) if pid
       client.close
+    ensure
+      # Redirect STDOUT and STDERR to prevent from keeping the original FDs
+      # (i.e. to prevent `spring rake -T | grep db` from hanging forever),
+      # even when exception is raised before forking (i.e. preloading).
+      reset_streams
     end
 
     def terminate
@@ -292,8 +296,11 @@
       PTY.open do |master, slave|
         [STDOUT, STDERR, STDIN].each { |s| s.reopen slave }
         Thread.new { master.read }
-        yield
-        reset_streams
+        begin
+          yield
+        ensure
+          reset_streams
+        end
       end
     end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/spring/binstub.rb new/lib/spring/binstub.rb
--- old/lib/spring/binstub.rb   2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/binstub.rb   2016-10-01 20:48:52.000000000 +0200
@@ -1,6 +1,26 @@
 command  = File.basename($0)
 bin_path = File.expand_path("../../../bin/spring", __FILE__)
 
+# When we run a command which does not go through Spring (e.g. DISABLE_SPRING
+# is used, or we just call 'rails' or something) then we get this warning from
+# Rubygems:
+#
+#   WARN: Unresolved specs during Gem::Specification.reset: activesupport (<= 
5.1, >= 4.2)
+#   WARN: Clearing out unresolved specs.
+#   Please report a bug if this causes problems.
+#
+# This happens due to our dependency on activesupport, when Bundler.setup gets
+# called.  We don't actually *use* the dependency; it is purely there to
+# restrict the Rails version that we're compatible with.
+#
+# When the warning is shown, Rubygems just does the below.
+# Therefore, by doing it ourselves here, we can avoid the warning.
+if Gem::Specification.respond_to?(:unresolved_deps)
+  Gem::Specification.unresolved_deps.clear
+else
+  Gem.unresolved_deps.clear
+end
+
 if command == "spring"
   load bin_path
 else
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    2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/client/binstub.rb    2016-10-01 20:48:52.000000000 +0200
@@ -23,10 +23,6 @@
       # 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.
-      #
-      # Parsing the lockfile in this way is pretty nasty but reliable enough
-      # The regex ensures that the match must be between a GEM line and an 
empty
-      # line, so it won't go on to the next section.
       SPRING = <<'CODE'
 #!/usr/bin/env ruby
 
@@ -37,9 +33,10 @@
   require 'rubygems'
   require 'bundler'
 
-  if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^    (?:  )*spring 
\((.*?)\)$.*?^$/m))
-    Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, 
*Gem.path].uniq.join(Gem.path_separator) }
-    gem 'spring', match[1]
+  lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
+  if spring = lockfile.specs.detect { |spec| spec.name == "spring" }
+    Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
+    gem 'spring', spring.version
     require 'spring/binstub'
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/spring/test/acceptance_test.rb 
new/lib/spring/test/acceptance_test.rb
--- old/lib/spring/test/acceptance_test.rb      2016-07-01 19:16:53.000000000 
+0200
+++ new/lib/spring/test/acceptance_test.rb      2016-10-01 20:48:52.000000000 
+0200
@@ -12,7 +12,7 @@
       DEFAULT_SPEEDUP = 0.8
 
       def rails_version
-        ENV['RAILS_VERSION'] || '~> 4.2.0'
+        ENV['RAILS_VERSION'] || '~> 5.0.0'
       end
 
       # Extension point for spring-watchers-listen
@@ -121,7 +121,7 @@
         assert_speedup do
           assert_success app.spring_test_command, stdout: "0 failures"
 
-          File.write(app.test, app.test.read.sub("get :index", "raise 'omg'"))
+          app.insert_into_test "raise 'omg'"
           assert_failure app.spring_test_command, stdout: "RuntimeError: omg"
         end
       end
@@ -156,7 +156,7 @@
             end
           end
         RUBY
-        File.write(app.test, app.test.read.sub("get :index", "Foo.omg"))
+        app.insert_into_test "Foo.omg"
 
         app.await_reload
         assert_failure app.spring_test_command, stdout: "RuntimeError: omg"
@@ -415,6 +415,12 @@
         assert_failure "bin/rake -T", stderr: "unable to find your 
config/application.rb"
       end
 
+      test "piping with boot-level error" do
+        config = app.application_config.read
+        File.write(app.application_config, "#{config}\nomg")
+        assert_success "bin/rake -T | cat"
+      end
+
       test "piping" do
         assert_success "bin/rake -T | grep db", stdout: "rake db:migrate"
       end
@@ -534,6 +540,11 @@
 
         assert_failure "bin/rails runner ''", stderr: "timed out"
       end
+
+      test "no warnings are shown for unsprung commands" do
+        app.env["DISABLE_SPRING"] = "1"
+        refute_output_includes "bin/rails runner ''", stderr: "WARN"
+      end
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/spring/test/application.rb 
new/lib/spring/test/application.rb
--- old/lib/spring/test/application.rb  2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/test/application.rb  2016-10-01 20:48:52.000000000 +0200
@@ -65,7 +65,7 @@
       end
 
       def spring_test_command
-        "#{rails_version.test_command} #{test}"
+        "bin/rake test #{test}"
       end
 
       def stop_spring
@@ -74,7 +74,7 @@
       end
 
       def test
-        path 
"test/#{rails_version.controller_tests_dir}/posts_controller_test.rb"
+        path "test/controllers/posts_controller_test.rb"
       end
 
       def controller
@@ -205,10 +205,17 @@
       end
 
       def bundle
-        run! "(gem list bundler | grep bundler) || gem install bundler", 
timeout: nil, retry: 2
+        # Version restriction is a workaround for 
https://github.com/bundler/bundler/pull/4981
+        # The problem breaks our tests on Ruby 2.2
+        # We can remove once it's fixed
+        run! "(gem list bundler | grep bundler) || gem install bundler 
--version '~> 1.12.0'", timeout: nil, retry: 2
         run! "bundle check || bundle update --retry=2", timeout: nil
       end
 
+      def insert_into_test(code)
+        File.write(test, test.read.sub(/^\s*get .+$/, code))
+      end
+
       private
 
       def process_alive?(pid)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/spring/test/application_generator.rb 
new/lib/spring/test/application_generator.rb
--- old/lib/spring/test/application_generator.rb        2016-07-01 
19:16:53.000000000 +0200
+++ new/lib/spring/test/application_generator.rb        2016-10-01 
20:48:52.000000000 +0200
@@ -38,13 +38,17 @@
 
       # Sporadic SSL errors keep causing test failures so there are anti-SSL 
workarounds here
       def generate_files
+        if RUBY_VERSION == "1.9.3"
+          system("gem list '^mime-types$' --installed --version '~> 2' || " \
+                   "gem install mime-types --clear-sources --source 
http://rubygems.org --version '~> 2'")
+        end
+
         system("gem list '^rails$' --installed --version 
'#{version_constraint}' || " \
                  "gem install rails --clear-sources --source 
http://rubygems.org --version '#{version_constraint}'")
 
         @version = RailsVersion.new(`ruby -e 'puts 
Gem::Specification.find_by_name("rails", 
"#{version_constraint}").version'`.chomp)
 
-        skips = %w(--skip-bundle --skip-javascript --skip-sprockets)
-        skips << "--skip-spring" if version.bundles_spring?
+        skips = %w(--skip-bundle --skip-javascript --skip-sprockets 
--skip-spring)
 
         system("rails _#{version}_ new #{application.root} #{skips.join(' ')}")
         raise "application generation failed" unless application.exists?
@@ -55,14 +59,6 @@
 
         append_to_file(application.gemfile, "gem 'spring', 
'#{Spring::VERSION}'")
 
-        if version.needs_testunit?
-          append_to_file(application.gemfile, "gem 'spring-commands-testunit'")
-        end
-
-        if RUBY_VERSION == "1.9.3"
-          append_to_file(application.gemfile, "gem 'mime-types', '~> 2'")
-        end
-
         rewrite_file(application.gemfile) do |c|
           c.sub!("https://rubygems.org";, "http://rubygems.org";)
           c.gsub!(/(gem '(byebug|web-console|sdoc|jbuilder)')/, "# \\1")
@@ -90,6 +86,10 @@
       def install_spring
         return if @installed
 
+        if RUBY_VERSION < "2.2.2"
+          application.run! "gem install activesupport --version '#{version}'"
+        end
+
         build_and_install_gems
 
         application.bundle
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/spring/test/rails_version.rb 
new/lib/spring/test/rails_version.rb
--- old/lib/spring/test/rails_version.rb        2016-07-01 19:16:53.000000000 
+0200
+++ new/lib/spring/test/rails_version.rb        2016-10-01 20:48:52.000000000 
+0200
@@ -7,23 +7,6 @@
         @version = Gem::Version.new(string)
       end
 
-      def rails_3?
-        version < Gem::Version.new("4.0.0")
-      end
-      alias needs_testunit? rails_3?
-
-      def test_command
-        needs_testunit? ? 'bin/testunit' : 'bin/rake test'
-      end
-
-      def controller_tests_dir
-        rails_3? ? 'functional' : 'controllers'
-      end
-
-      def bundles_spring?
-        version.segments.take(2) == [4, 1] || version > Gem::Version.new("4.1")
-      end
-
       def major
         version.segments[0]
       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   2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/version.rb   2016-10-01 20:48:52.000000000 +0200
@@ -1,3 +1,3 @@
 module Spring
-  VERSION = "1.7.2"
+  VERSION = "2.0.0"
 end
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   2016-07-01 19:16:53.000000000 +0200
+++ new/lib/spring/watcher/polling.rb   2016-10-01 20:48:52.000000000 +0200
@@ -1,3 +1,5 @@
+require "spring/watcher/abstract"
+
 module Spring
   module Watcher
     class Polling < Abstract
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-07-01 19:16:53.000000000 +0200
+++ new/metadata        2016-10-01 20:48:52.000000000 +0200
@@ -1,29 +1,29 @@
 --- !ruby/object:Gem::Specification
 name: spring
 version: !ruby/object:Gem::Version
-  version: 1.7.2
+  version: 2.0.0
 platform: ruby
 authors:
 - Jon Leighton
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-07-01 00:00:00.000000000 Z
+date: 2016-10-01 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
   requirement: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ">="
       - !ruby/object:Gem::Version
-        version: 4.2.0
-  type: :development
+        version: '4.2'
+  type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
-    - - "~>"
+    - - ">="
       - !ruby/object:Gem::Version
-        version: 4.2.0
+        version: '4.2'
 - !ruby/object:Gem::Dependency
   name: rake
   requirement: !ruby/object:Gem::Requirement


Reply via email to