Hello community,

here is the log from the commit of package rubygem-spring for openSUSE:Factory 
checked in at 2015-12-14 10:14:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2015-09-27 08:38:51.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-spring.new/rubygem-spring.changes       
2015-12-14 10:14:03.000000000 +0100
@@ -1,0 +2,18 @@
+Tue Dec  1 05:32:02 UTC 2015 - co...@suse.com
+
+- updated to version 1.5.0
+  no changelog found
+
+-------------------------------------------------------------------
+Mon Nov 23 05:32:22 UTC 2015 - co...@suse.com
+
+- updated to version 1.4.4
+  no changelog found
+
+-------------------------------------------------------------------
+Wed Nov 11 05:33:16 UTC 2015 - co...@suse.com
+
+- updated to version 1.4.1
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  spring-1.4.0.gem

New:
----
  spring-1.5.0.gem

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

Other differences:
------------------
++++++ rubygem-spring.spec ++++++
--- /var/tmp/diff_new_pack.5AUnrN/_old  2015-12-14 10:14:04.000000000 +0100
+++ /var/tmp/diff_new_pack.5AUnrN/_new  2015-12-14 10:14:04.000000000 +0100
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-spring
-Version:        1.4.0
+Version:        1.5.0
 Release:        0
 %define mod_name spring
 %define mod_full_name %{mod_name}-%{version}

++++++ spring-1.4.0.gem -> spring-1.5.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2015-09-12 23:24:58.000000000 +0200
+++ new/README.md       2015-11-30 17:32:44.000000000 +0100
@@ -48,7 +48,7 @@
 
 ``` ruby
 begin
-  load File.expand_path("../spring", __FILE__)
+  load File.expand_path('../spring', __FILE__)
 rescue LoadError
 end
 ```
@@ -227,6 +227,8 @@
   running `Test::Unit` tests on Rails 3, since only Rails 4 allows you
   to use `rake test path/to/test` to run a particular test/directory.
 * 
[spring-commands-teaspoon](https://github.com/alejandrobabio/spring-commands-teaspoon.git)
+* [spring-commands-m](https://github.com/gabrieljoelc/spring-commands-m.git)
+* [spring-commands-rubocop](https://github.com/p0deje/spring-commands-rubocop)
 
 ## Use without adding to bundle
 
@@ -294,7 +296,7 @@
 projects without having to be added to the project's Gemfile, require
 them in your `~/.spring.rb`.
 
-`config/spring_client.rb` is also loaded before bundler and before a 
+`config/spring_client.rb` is also loaded before bundler and before a
 server process is started, it can be used to add new top-level commands.
 
 ### Application root
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
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    2015-09-12 23:24:58.000000000 +0200
+++ new/lib/spring/client/binstub.rb    2015-11-30 17:32:44.000000000 +0100
@@ -13,8 +13,9 @@
       # should cause the "unsprung" version of the command to run.
       LOADER = <<CODE
 begin
-  load File.expand_path("../spring", __FILE__)
-rescue LoadError
+  load File.expand_path('../spring', __FILE__)
+rescue LoadError => e
+  raise unless e.message.include?('spring')
 end
 CODE
 
@@ -33,19 +34,26 @@
 # It gets overwritten when you run the `spring binstub` command.
 
 unless defined?(Spring)
-  require "rubygems"
-  require "bundler"
+  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 }
-    gem "spring", match[1]
-    require "spring/binstub"
+    Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq }
+    gem 'spring', match[1]
+    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 [
+        %{begin\n  load File.expand_path("../spring", __FILE__)\nrescue 
LoadError\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
+      ]
+
       class Item
         attr_reader :command, :existing
 
@@ -72,8 +80,12 @@
               fallback = nil if fallback.include?("exec")
               generate(fallback)
               status "upgraded"
-            elsif existing =~ /load .*spring/
+            elsif existing.include?(LOADER)
               status "spring already present"
+            elsif existing =~ BINSTUB_VARIATIONS
+              upgraded = existing.sub(BINSTUB_VARIATIONS, LOADER)
+              File.write(command.binstub, upgraded)
+              status "upgraded"
             else
               head, shebang, tail = existing.partition(SHEBANG)
 
@@ -108,7 +120,7 @@
 
         def remove
           if existing
-            File.write(command.binstub, existing.sub(LOADER, ""))
+            File.write(command.binstub, existing.sub(BINSTUB_VARIATIONS, ""))
             status "spring removed"
           end
         end
@@ -117,7 +129,7 @@
       attr_reader :bindir, :items
 
       def self.description
-        "Generate spring based binstubs. Use --all to generate a binstub for 
all known commands."
+        "Generate spring based binstubs. Use --all to generate a binstub for 
all known commands. Use --remove to revert."
       end
 
       def self.rails_command
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        2015-09-12 23:24:58.000000000 +0200
+++ new/lib/spring/client/run.rb        2015-11-30 17:32:44.000000000 +0100
@@ -5,7 +5,7 @@
 module Spring
   module Client
     class Run < Command
-      FORWARDED_SIGNALS = %w(INT QUIT USR1 USR2 INFO) & Signal.list.keys
+      FORWARDED_SIGNALS = %w(INT QUIT USR1 USR2 INFO WINCH) & Signal.list.keys
       TIMEOUT = 1
 
       def initialize(args)
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       2015-09-12 23:24:58.000000000 +0200
+++ new/lib/spring/env.rb       2015-11-30 17:32:44.000000000 +0100
@@ -33,7 +33,7 @@
     end
 
     def tmp_path
-      path = Pathname.new(File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, 
"spring"))
+      path = Pathname.new(File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, 
"spring-#{Process.uid}"))
       FileUtils.mkdir_p(path) unless path.exist?
       path
     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      2015-09-12 23:24:58.000000000 
+0200
+++ new/lib/spring/test/acceptance_test.rb      2015-11-30 17:32:44.000000000 
+0100
@@ -208,14 +208,28 @@
         assert_success "bin/rake -T", stdout: "rake db:migrate"
       end
 
-      test "binstub when spring is uninstalled" do
+      test "binstub remove all" do
+        assert_success "bin/spring binstub --remove --all"
+        refute File.exist?(app.path("bin/spring"))
+      end
+
+      test "binstub when spring gem is missing" do
         without_gem "spring-#{Spring::VERSION}" do
           File.write(app.gemfile, app.gemfile.read.gsub(/gem 'spring.*/, ""))
           assert_success "bin/rake -T", stdout: "rake db:migrate"
         end
       end
 
-      test "binstub upgrade" do
+      test "binstub when spring binary is missing" do
+        begin
+          File.rename(app.path("bin/spring"), app.path("bin/spring.bak"))
+          assert_success "bin/rake -T", stdout: "rake db:migrate"
+        ensure
+          File.rename(app.path("bin/spring.bak"), app.path("bin/spring"))
+        end
+      end
+
+      test "binstub upgrade with old binstub" do
         File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
           #!/usr/bin/env ruby
 
@@ -256,6 +270,102 @@
           APP_PATH = File.expand_path('../../config/application',  __FILE__)
           require_relative '../config/boot'
           require 'rails/commands'
+        RUBY
+        assert_equal expected, app.path("bin/rails").read
+      end
+
+      test "binstub upgrade with new binstub variations" do
+        expected = <<-RUBY.gsub(/^          /, "")
+          #!/usr/bin/env ruby
+          #{Spring::Client::Binstub::LOADER.strip}
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+
+        # older variation with double quotes
+        File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
+          #!/usr/bin/env ruby
+          begin
+            load File.expand_path("../spring", __FILE__)
+          rescue LoadError
+          end
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+
+        assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
+        assert_equal expected, app.path("bin/rake").read
+
+        # newer variation with single quotes
+        File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
+          #!/usr/bin/env ruby
+          begin
+            load File.expand_path('../spring', __FILE__)
+          rescue LoadError
+          end
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+
+        assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
+        assert_equal expected, app.path("bin/rake").read
+
+        # newer variation which checks end of exception message
+        File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
+          #!/usr/bin/env ruby
+          begin
+            spring_bin_path = File.expand_path('../spring', __FILE__)
+            load spring_bin_path
+          rescue LoadError => e
+            raise unless e.message.end_with? spring_bin_path, 'spring/binstub'
+          end
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+
+        assert_success "bin/spring binstub rake", stdout: "bin/rake: upgraded"
+        assert_equal expected, app.path("bin/rake").read
+      end
+
+      test "binstub remove with new binstub variations" do
+        # older variation with double quotes
+        File.write(app.path("bin/rake"), <<-RUBY.strip_heredoc)
+          #!/usr/bin/env ruby
+          begin
+            load File.expand_path("../spring", __FILE__)
+          rescue LoadError
+          end
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+
+        # newer variation with single quotes
+        File.write(app.path("bin/rails"), <<-RUBY.strip_heredoc)
+          #!/usr/bin/env ruby
+          begin
+            load File.expand_path('../spring', __FILE__)
+          rescue LoadError
+          end
+          APP_PATH = File.expand_path('../../config/application',  __FILE__)
+          require_relative '../config/boot'
+          require 'rails/commands'
+        RUBY
+
+        assert_success "bin/spring binstub --remove rake", stdout: "bin/rake: 
spring removed"
+        assert_success "bin/spring binstub --remove rails", stdout: 
"bin/rails: spring removed"
+
+        expected = <<-RUBY.strip_heredoc
+          #!/usr/bin/env ruby
+          require 'bundler/setup'
+          load Gem.bin_path('rake', 'rake')
+        RUBY
+        assert_equal expected, app.path("bin/rake").read
+
+        expected = <<-RUBY.strip_heredoc
+          #!/usr/bin/env ruby
+          APP_PATH = File.expand_path('../../config/application',  __FILE__)
+          require_relative '../config/boot'
+          require 'rails/commands'
         RUBY
         assert_equal expected, app.path("bin/rails").read
       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   2015-09-12 23:24:58.000000000 +0200
+++ new/lib/spring/version.rb   2015-11-30 17:32:44.000000000 +0100
@@ -1,3 +1,3 @@
 module Spring
-  VERSION = "1.4.0"
+  VERSION = "1.5.0"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2015-09-12 23:24:58.000000000 +0200
+++ new/metadata        2015-11-30 17:32:44.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: spring
 version: !ruby/object:Gem::Version
-  version: 1.4.0
+  version: 1.5.0
 platform: ruby
 authors:
 - Jon Leighton
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2015-09-12 00:00:00.000000000 Z
+date: 2015-11-30 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -119,7 +119,7 @@
       version: '0'
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.2.2
+rubygems_version: 2.4.5.1
 signing_key: 
 specification_version: 4
 summary: Rails application preloader


Reply via email to