commit rubygem-spring for openSUSE:Factory
Hello community,
here is the log from the commit of package rubygem-spring for openSUSE:Factory checked in at 2015-09-27 08:39:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-05-10 10:47:27.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-spring.new/rubygem-spring.changes 2015-09-27 08:38:51.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Sep 13 04:33:01 UTC 2015 - coolo@suse.com
+
+- updated to version 1.4.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
spring-1.3.6.gem
New:
----
spring-1.4.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-spring.spec ++++++
--- /var/tmp/diff_new_pack.4t9GKD/_old 2015-09-27 08:38:52.000000000 +0200
+++ /var/tmp/diff_new_pack.4t9GKD/_new 2015-09-27 08:38:52.000000000 +0200
@@ -24,7 +24,7 @@
#
Name: rubygem-spring
-Version: 1.3.6
+Version: 1.4.0
Release: 0
%define mod_name spring
%define mod_full_name %{mod_name}-%{version}
@@ -33,7 +33,7 @@
BuildRequires: %{ruby}
BuildRequires: ruby-macros >= 5
BuildRequires: update-alternatives
-Url: http://github.com/rails/spring
+Url: https://github.com/rails/spring
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: Rails application preloader
@@ -42,7 +42,7 @@
PreReq: update-alternatives
%description
-Rails application preloader.
+Preloads your application so things like console, rake and tests run faster.
%prep
++++++ spring-1.3.6.gem -> spring-1.4.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2015-05-08 17:35:36.000000000 +0200
+++ new/README.md 2015-09-12 23:24:58.000000000 +0200
@@ -294,6 +294,9 @@
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
+server process is started, it can be used to add new top-level commands.
+
### Application root
Spring must know how to find your Rails application. If you have a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bin/spring new/bin/spring
--- old/bin/spring 2015-05-08 17:35:36.000000000 +0200
+++ new/bin/spring 2015-09-12 23:24:58.000000000 +0200
@@ -43,6 +43,7 @@
end
end
-$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
+lib = File.expand_path("../../lib", __FILE__)
+$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib) # enable local development
require 'spring/client'
Spring::Client.run(ARGV)
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-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/client/binstub.rb 2015-09-12 23:24:58.000000000 +0200
@@ -36,7 +36,7 @@
require "rubygems"
require "bundler"
- if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m)
+ 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"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/client.rb new/lib/spring/client.rb
--- old/lib/spring/client.rb 2015-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/client.rb 2015-09-12 23:24:58.000000000 +0200
@@ -14,12 +14,14 @@
module Client
COMMANDS = {
"help" => Client::Help,
+ "-h" => Client::Help,
+ "--help" => Client::Help,
"binstub" => Client::Binstub,
"stop" => Client::Stop,
"status" => Client::Status,
"rails" => Client::Rails,
"-v" => Client::Version,
- "--version" => Client::Version
+ "--version" => Client::Version,
}
def self.run(args)
@@ -36,3 +38,9 @@
end
end
end
+
+# allow users to add hooks that do not run in the server
+# or modify start/stop
+if File.exist?("config/spring_client.rb")
+ require "./config/spring_client.rb"
+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-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/test/acceptance_test.rb 2015-09-12 23:24:58.000000000 +0200
@@ -1,9 +1,8 @@
-# encoding: utf-8
-
require "io/wait"
require "timeout"
require "spring/sid"
require "spring/client"
+require "active_support/core_ext/string/strip"
module Spring
module Test
@@ -59,6 +58,14 @@
end
end
+ def without_gem(name)
+ gem_home = app.gem_home.join('gems')
+ FileUtils.mv(gem_home.join(name), app.root)
+ yield
+ ensure
+ FileUtils.mv(app.root.join(name), gem_home)
+ end
+
setup do
generator.generate_if_missing
generator.install_spring
@@ -77,6 +84,14 @@
test "help message when called without arguments" do
assert_success "bin/spring", stdout: 'Usage: spring COMMAND [ARGS]'
+ assert app.spring_env.server_running?
+ end
+
+ test "shows help" do
+ assert_success "bin/spring help", stdout: 'Usage: spring COMMAND [ARGS]'
+ assert_success "bin/spring -h", stdout: 'Usage: spring COMMAND [ARGS]'
+ assert_success "bin/spring --help", stdout: 'Usage: spring COMMAND [ARGS]'
+ refute app.spring_env.server_running?
end
test "test changes are picked up" do
@@ -111,13 +126,13 @@
test "app gets reloaded when preloaded files change" do
assert_success app.spring_test_command
- File.write(app.application_config, app.application_config.read + <<-CODE)
+ File.write(app.application_config, app.application_config.read + <<-RUBY.strip_heredoc)
class Foo
def self.omg
raise "omg"
end
end
- CODE
+ RUBY
File.write(app.test, app.test.read.sub("get :index", "Foo.omg"))
app.await_reload
@@ -160,7 +175,7 @@
# Start spring before setting up the command, to test that it gracefully upgrades itself
assert_success "bin/rails runner ''"
- File.write(app.spring_config, <<-CODE)
+ File.write(app.spring_config, <<-RUBY.strip_heredoc)
class CustomCommand
def call
puts "omg"
@@ -172,7 +187,7 @@
end
Spring.register_command "custom", CustomCommand.new
- CODE
+ RUBY
assert_success "bin/spring custom", stdout: "omg"
@@ -194,52 +209,55 @@
end
test "binstub when spring is uninstalled" do
- app.run! "gem uninstall --ignore-dependencies spring"
- File.write(app.gemfile, app.gemfile.read.gsub(/gem 'spring.*/, ""))
- assert_success "bin/rake -T", stdout: "rake db:migrate"
+ 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
- File.write(app.path("bin/rake"), < :environment do
puts Rails.env
end
task :print_env do
- ENV.each { |k, v| puts "#{k}=#{v}" }
+ ENV.each { |k, v| puts "\#{k}=\#{v}" }
end
task(:default).clear.enhance [:print_rails_env]
- CODE
+ RUBY
assert_success "bin/rake RAILS_ENV=test print_rails_env", stdout: "test"
assert_success "bin/rake FOO=bar print_env", stdout: "FOO=bar"
@@ -305,7 +330,7 @@
end
test "changing the Gemfile works when spring calls into itself" do
- File.write(app.path("script.rb"), <<-CODE)
+ File.write(app.path("script.rb"), <<-RUBY.strip_heredoc)
gemfile = Rails.root.join("Gemfile")
File.write(gemfile, "\#{gemfile.read}gem 'devise'\\n")
Bundler.with_clean_env do
@@ -313,7 +338,7 @@
end
output = `\#{Rails.root.join('bin/rails')} runner 'require "devise"; puts "done";'`
exit output == "done\n"
- CODE
+ RUBY
assert_success [%(bin/rails runner 'load Rails.root.join("script.rb")'), timeout: 60]
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 2015-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/test/application.rb 2015-09-12 23:24:58.000000000 +0200
@@ -48,7 +48,7 @@
end
def gem_home
- path "vendor/gems/#{RUBY_VERSION}"
+ path "../gems/#{RUBY_VERSION}"
end
def user_home
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 2015-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/test/application_generator.rb 2015-09-12 23:24:58.000000000 +0200
@@ -52,19 +52,32 @@
FileUtils.mkdir_p(application.user_home)
FileUtils.rm_rf(application.path("test/performance"))
- File.write(application.gemfile, "#{application.gemfile.read}gem 'spring', '#{Spring::VERSION}'\n")
+ append_to_file(application.gemfile, "gem 'spring', '#{Spring::VERSION}'")
if version.needs_testunit?
- File.write(application.gemfile, "#{application.gemfile.read}gem 'spring-commands-testunit'\n")
+ append_to_file(application.gemfile, "gem 'spring-commands-testunit'")
+ end
+
+ rewrite_file(application.gemfile) do |c|
+ c.sub!("https://rubygems.org", "http://rubygems.org")
+ c.gsub!(/(gem '(byebug|web-console|sdoc|jbuilder)')/, "# \\1")
+ c
end
- File.write(application.gemfile, application.gemfile.read.sub("https://rubygems.org", "http://rubygems.org"))
if application.path("bin").exist?
FileUtils.cp_r(application.path("bin"), application.path("bin_original"))
end
end
+ def rewrite_file(file)
+ File.write(file, yield(file.read))
+ end
+
+ def append_to_file(file, add)
+ rewrite_file(file) { |c| c << "#{add}\n" }
+ end
+
def generate_if_missing
generate unless application.exists?
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-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/version.rb 2015-09-12 23:24:58.000000000 +0200
@@ -1,3 +1,3 @@
module Spring
- VERSION = "1.3.6"
+ VERSION = "1.4.0"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/watcher.rb new/lib/spring/watcher.rb
--- old/lib/spring/watcher.rb 2015-05-08 17:35:36.000000000 +0200
+++ new/lib/spring/watcher.rb 2015-09-12 23:24:58.000000000 +0200
@@ -25,6 +25,6 @@
end
def self.watch(*items)
- watcher.add *items
+ watcher.add(*items)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-05-08 17:35:36.000000000 +0200
+++ new/metadata 2015-09-12 23:24:58.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: spring
version: !ruby/object:Gem::Version
- version: 1.3.6
+ version: 1.4.0
platform: ruby
authors:
- Jon Leighton
autorequire:
bindir: bin
cert_chain: []
-date: 2015-05-08 00:00:00.000000000 Z
+date: 2015-09-12 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: activesupport
@@ -38,7 +38,22 @@
- - ">="
- !ruby/object:Gem::Version
version: '0'
-description: Rails application preloader
+- !ruby/object:Gem::Dependency
+ name: bump
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :development
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+description: Preloads your application so things like console, rake and tests run
+ faster
email:
- j@jonathanleighton.com
executables:
@@ -84,7 +99,7 @@
- lib/spring/watcher.rb
- lib/spring/watcher/abstract.rb
- lib/spring/watcher/polling.rb
-homepage: http://github.com/rails/spring
+homepage: https://github.com/rails/spring
licenses:
- MIT
metadata: {}
@@ -104,9 +119,8 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.4.5
+rubygems_version: 2.2.2
signing_key:
specification_version: 4
summary: Rails application preloader
test_files: []
-has_rdoc:
participants (1)
-
root@hilbert.suse.de