openSUSE Commits
Threads by month
- ----- 2024 -----
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2016
- 1 participants
- 1255 discussions
Hello community,
here is the log from the commit of package python-websocket-client for openSUSE:Factory checked in at 2016-04-28 16:53:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-websocket-client (Old)
and /work/SRC/openSUSE:Factory/.python-websocket-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-websocket-client"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-websocket-client/python-websocket-client.changes 2016-01-23 01:16:51.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-websocket-client.new/python-websocket-client.changes 2016-04-28 16:56:45.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Apr 12 07:57:30 UTC 2016 - andrea(a)opensuse.org
+
+- added update-alternatives to allow the python3 version to be installed
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-websocket-client.spec ++++++
--- /var/tmp/diff_new_pack.Dn0iUz/_old 2016-04-28 16:56:46.000000000 +0200
+++ /var/tmp/diff_new_pack.Dn0iUz/_new 2016-04-28 16:56:46.000000000 +0200
@@ -37,6 +37,8 @@
Requires: %backports
Requires: python
Requires: python-six
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-argparse
@@ -70,19 +72,36 @@
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Use the system certs
rm %{buildroot}/%{python_sitelib}/websocket/cacert.pem
+# update alternatives
+mv %{buildroot}%{_bindir}/wsdump.py %{buildroot}%{_bindir}/wsdump.py-%{py_ver}
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+touch %{buildroot}%{_sysconfdir}/alternatives/wsdump.py
+ln -sf %{_sysconfdir}/alternatives/wsdump.py %{buildroot}/%{_bindir}/wsdump.py
%check
python websocket/tests/test_websocket.py
+%post
+update-alternatives \
+ --install %{_bindir}/wsdump.py wsdump.py %{_bindir}/wsdump.py-%{py_ver} 20
+
+%postun
+if [ $1 -eq 0 ] ; then
+ update-alternatives --remove wsdump.py %{_bindir}/wsdump.py-%{py_ver}
+fi
+
+
%files
%defattr(-,root,root,-)
%doc LICENSE README.rst
%dir %{python_sitelib}/websocket
%dir %{python_sitelib}/websocket_client-%{version}-py*.egg-info
%{_bindir}/wsdump.py
+%{_bindir}/wsdump.py-%{py_ver}
%exclude %{python_sitelib}/websocket/tests/
%{python_sitelib}/websocket/*
%{python_sitelib}/*egg-info/*
+%ghost %{_sysconfdir}/alternatives/wsdump.py
%files test
%defattr(-,root,root,-)
1
0
Hello community,
here is the log from the commit of package rubygem-spring for openSUSE:Factory checked in at 2016-04-28 16:53:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-12-14 10:14:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-spring.new/rubygem-spring.changes 2016-04-28 16:56:44.000000000 +0200
@@ -1,0 +2,36 @@
+Tue Apr 12 04:32:48 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.7.1
+ no changelog found
+
+-------------------------------------------------------------------
+Mon Apr 11 04:36:47 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.7.0
+ no changelog found
+
+-------------------------------------------------------------------
+Sat Feb 27 05:54:01 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.6.4
+ no changelog found
+
+-------------------------------------------------------------------
+Fri Feb 5 05:44:28 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.6.3
+ no changelog found
+
+-------------------------------------------------------------------
+Thu Jan 21 05:49:49 UTC 2016 - coolo(a)suse.com
+
+- updated to version 1.6.2
+ no changelog found
+
+-------------------------------------------------------------------
+Tue Dec 15 05:33:53 UTC 2015 - coolo(a)suse.com
+
+- updated to version 1.6.0
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
spring-1.5.0.gem
New:
----
spring-1.7.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-spring.spec ++++++
--- /var/tmp/diff_new_pack.DwdTmk/_old 2016-04-28 16:56:45.000000000 +0200
+++ /var/tmp/diff_new_pack.DwdTmk/_new 2016-04-28 16:56:45.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-spring
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-spring
-Version: 1.5.0
+Version: 1.7.1
Release: 0
%define mod_name spring
%define mod_full_name %{mod_name}-%{version}
++++++ spring-1.5.0.gem -> spring-1.7.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE.txt new/LICENSE.txt
--- old/LICENSE.txt 2015-11-30 17:32:44.000000000 +0100
+++ new/LICENSE.txt 2016-04-11 15:53:04.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2012 Jon Leighton
+Copyright (c) 2012-2016 Jon Leighton
MIT License
@@ -19,4 +19,4 @@
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2015-11-30 17:32:44.000000000 +0100
+++ new/README.md 2016-04-11 15:53:04.000000000 +0200
@@ -16,7 +16,7 @@
## Compatibility
-* Ruby versions: MRI 1.9.3, MRI 2.0, MRI 2.1
+* 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)
Spring makes extensive use of `Process.fork`, so won't be able to
@@ -73,6 +73,7 @@
```
$ time bin/rake test test/controllers/posts_controller_test.rb
+Running via Spring preloader in process 2734
Run options:
# Running tests:
@@ -103,6 +104,7 @@
```
$ time bin/rake test test/controllers/posts_controller_test.rb
+Running via Spring preloader in process 8352
Run options:
# Running tests:
@@ -147,6 +149,7 @@
```
$ bin/rake routes
+Running via Spring preloader in process 2363
posts GET /posts(.:format) posts#index
POST /posts(.:format) posts#create
new_post GET /posts/new(.:format) posts#new
@@ -287,6 +290,13 @@
So to avoid this problem, don't save off references to application
constants in your initialization code.
+## Using Spring with a containerized development environment
+
+As of Spring 1.7, there is some support for doing this. See [this
+example
+repository](https://github.com/jonleighton/spring-docker-example) for
+information about how to do it with [Docker](https://www.docker.com/).
+
## Configuration
Spring will read `~/.spring.rb` and `config/spring.rb` for custom
@@ -353,13 +363,51 @@
[spring-watcher-listen](https://github.com/jonleighton/spring-watcher-listen)
gem.
+### Quiet output
+
+To disable the "Running via Spring preloader" message which is shown each time
+a command runs:
+
+``` ruby
+Spring.quiet = true
+```
+
+### Environment variables
+
+The following environment variables are used by Spring:
+
+* `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
+ `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
+ `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`.
+* `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 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
+ server when it is not already running. Defaults to `spring _[version]_
+ server --background`.
+
## Troubleshooting
If you want to get more information about what spring is doing, you can
-specify a log file with the `SPRING_LOG` environment variable:
+run spring explicitly in a separate terminal:
```
-spring stop # if spring is already running
-export SPRING_LOG=/tmp/spring.log
-spring rake -T
+$ spring server
```
+
+Logging output will be printed to stdout. You can also send log output
+to a file with the `SPRING_LOG` environment variable.
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/boot.rb new/lib/spring/application/boot.rb
--- old/lib/spring/application/boot.rb 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/application/boot.rb 2016-04-11 15:53:04.000000000 +0200
@@ -5,7 +5,8 @@
app = Spring::Application.new(
UNIXSocket.for_fd(3),
- Spring::JSON.load(ENV.delete("SPRING_ORIGINAL_ENV").dup)
+ Spring::JSON.load(ENV.delete("SPRING_ORIGINAL_ENV").dup),
+ Spring::Env.new(log_file: IO.for_fd(4))
)
Signal.trap("TERM") { app.terminate }
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/application.rb 2016-04-11 15:53:04.000000000 +0200
@@ -6,10 +6,10 @@
class Application
attr_reader :manager, :watcher, :spring_env, :original_env
- def initialize(manager, original_env)
+ def initialize(manager, original_env, spring_env = Env.new)
@manager = manager
@original_env = original_env
- @spring_env = Env.new
+ @spring_env = spring_env
@mutex = Mutex.new
@waiting = Set.new
@preloaded = false
@@ -99,7 +99,7 @@
@preloaded = :success
rescue Exception => e
@preloaded = :failure
- watcher.add e.backtrace.map { |line| line.match(/^(.*)\:\d+\:in /)[1] }
+ watcher.add e.backtrace.map { |line| line[/^(.*)\:\d+/, 1] }
raise e unless initialized?
ensure
watcher.add loaded_application_features
@@ -149,14 +149,22 @@
setup command
if Rails.application.reloaders.any?(&:updated?)
- ActionDispatch::Reloader.cleanup!
- ActionDispatch::Reloader.prepare!
+ # 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
end
pid = fork {
+ Process.setsid
IGNORE_SIGNALS.each { |sig| trap(sig, "DEFAULT") }
trap("TERM", "DEFAULT")
+ STDERR.puts "Running via Spring preloader in process #{Process.pid}" unless Spring.quiet
+
ARGV.replace(args)
$0 = command.exec_name
@@ -311,6 +319,17 @@
exit_if_finished
end
}
+
+ Thread.new {
+ while signal = client.gets.chomp
+ begin
+ Process.kill(signal, -Process.getpgid(pid))
+ client.puts(0)
+ rescue Errno::ESRCH
+ client.puts(1)
+ end
+ end
+ }
end
private
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/application_manager.rb 2016-04-11 15:53:04.000000000 +0200
@@ -2,9 +2,9 @@
class ApplicationManager
attr_reader :pid, :child, :app_env, :spring_env, :status
- def initialize(app_env)
+ def initialize(app_env, spring_env)
@app_env = app_env
- @spring_env = Env.new
+ @spring_env = spring_env
@mutex = Mutex.new
@state = :running
end
@@ -101,9 +101,11 @@
"SPRING_PRELOAD" => preload ? "1" : "0"
},
"ruby",
+ "-I", File.expand_path("../..", $LOADED_FEATURES.grep(/bundler\/setup\.rb$/).first),
"-I", File.expand_path("../..", __FILE__),
"-e", "require 'spring/application/boot'",
- 3 => child_socket
+ 3 => child_socket,
+ 4 => spring_env.log_file,
)
end
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-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/client/binstub.rb 2016-04-11 15:53:04.000000000 +0200
@@ -38,7 +38,7 @@
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.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
gem 'spring', match[1]
require 'spring/binstub'
end
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-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/client/run.rb 2016-04-11 15:53:04.000000000 +0200
@@ -6,31 +6,36 @@
module Client
class Run < Command
FORWARDED_SIGNALS = %w(INT QUIT USR1 USR2 INFO WINCH) & Signal.list.keys
- TIMEOUT = 1
+ CONNECT_TIMEOUT = 1
+ BOOT_TIMEOUT = 10
+
+ attr_reader :server
def initialize(args)
super
- @signal_queue = []
+
+ @signal_queue = []
+ @server_booted = false
end
def log(message)
env.log "[client] #{message}"
end
- def server
- @server ||= UNIXSocket.open(env.socket_name)
+ def connect
+ @server = UNIXSocket.open(env.socket_name)
end
def call
- if env.server_running?
- warm_run
- else
+ begin
+ connect
+ rescue Errno::ENOENT, Errno::ECONNRESET, Errno::ECONNREFUSED
cold_run
+ else
+ warm_run
end
- rescue Errno::ECONNRESET
- exit 1
ensure
- server.close if @server
+ server.close if server
end
def warm_run
@@ -49,6 +54,7 @@
def cold_run
boot_server
+ connect
run
end
@@ -60,24 +66,37 @@
queue_signals
connect_to_application(client)
run_command(client, application)
+ rescue Errno::ECONNRESET
+ exit 1
end
def boot_server
env.socket_path.unlink if env.socket_path.exist?
- pid = Process.spawn(
- gem_env,
- "ruby",
- "-e", "gem 'spring', '#{Spring::VERSION}'; require 'spring/server'; Spring::Server.boot"
- )
+ pid = Process.spawn(gem_env, env.server_command, out: File::NULL)
+ timeout = Time.now + BOOT_TIMEOUT
+
+ @server_booted = true
until env.socket_path.exist?
_, status = Process.waitpid2(pid, Process::WNOHANG)
- exit status.exitstatus if status
+
+ if status
+ exit status.exitstatus
+ elsif Time.now > timeout
+ $stderr.puts "Starting Spring server with `#{env.server_command}` " \
+ "timed out after #{BOOT_TIMEOUT} seconds"
+ exit 1
+ end
+
sleep 0.1
end
end
+ def server_booted?
+ @server_booted
+ end
+
def gem_env
bundle = Bundler.bundle_path.to_s
paths = Gem.path + ENV["GEM_PATH"].to_s.split(File::PATH_SEPARATOR)
@@ -97,13 +116,17 @@
def verify_server_version
server_version = server.gets.chomp
if server_version != env.version
- $stderr.puts <<-ERROR
-There is a version mismatch between the spring client and the server.
-You should restart the server and make sure to use the same version.
+ $stderr.puts "There is a version mismatch between the spring client " \
+ "(#{env.version}) and the server (#{server_version})."
-CLIENT: #{env.version}, SERVER: #{server_version}
-ERROR
- exit 1
+ if server_booted?
+ $stderr.puts "We already tried to reboot the server, but the mismatch is still present."
+ exit 1
+ else
+ $stderr.puts "Restarting to resolve."
+ stop_server
+ cold_run
+ end
end
end
@@ -111,7 +134,7 @@
server.send_io client
send_json server, "args" => args, "default_rails_env" => default_rails_env
- if IO.select([server], [], [], TIMEOUT)
+ if IO.select([server], [], [], CONNECT_TIMEOUT)
server.gets or raise CommandNotFound
else
raise "Error connecting to Spring server"
@@ -138,7 +161,7 @@
if pid && !pid.empty?
log "got pid: #{pid}"
- forward_signals(pid.to_i)
+ forward_signals(application)
status = application.read.to_i
log "got exit status #{status}"
@@ -158,26 +181,26 @@
end
end
- def forward_signals(pid)
- @signal_queue.each { |sig| kill sig, pid }
+ def forward_signals(application)
+ @signal_queue.each { |sig| kill sig, application }
FORWARDED_SIGNALS.each do |sig|
- trap(sig) { forward_signal sig, pid }
+ trap(sig) { forward_signal sig, application }
end
- rescue Errno::ESRCH
end
- def forward_signal(sig, pid)
- kill(sig, pid)
- rescue Errno::ESRCH
- # If the application process is gone, then don't block the
- # signal on this process.
- trap(sig, 'DEFAULT')
- Process.kill(sig, Process.pid)
+ def forward_signal(sig, application)
+ if kill(sig, application) != 0
+ # If the application process is gone, then don't block the
+ # signal on this process.
+ trap(sig, 'DEFAULT')
+ Process.kill(sig, Process.pid)
+ end
end
- def kill(sig, pid)
- Process.kill(sig, -Process.getpgid(pid))
+ def kill(sig, application)
+ application.puts(sig)
+ application.gets.to_i
end
def send_json(socket, data)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/spring/client/server.rb new/lib/spring/client/server.rb
--- old/lib/spring/client/server.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/spring/client/server.rb 2016-04-11 15:53:04.000000000 +0200
@@ -0,0 +1,18 @@
+module Spring
+ module Client
+ class Server < Command
+ def self.description
+ "Explicitly start a Spring server in the foreground"
+ end
+
+ def call
+ require "spring/server"
+ Spring::Server.boot(foreground: foreground?)
+ end
+
+ def foreground?
+ !args.include?("--background")
+ end
+ end
+ end
+end
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-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/client.rb 2016-04-11 15:53:04.000000000 +0200
@@ -9,6 +9,7 @@
require "spring/client/status"
require "spring/client/rails"
require "spring/client/version"
+require "spring/client/server"
module Spring
module Client
@@ -22,6 +23,7 @@
"rails" => Client::Rails,
"-v" => Client::Version,
"--version" => Client::Version,
+ "server" => Client::Server,
}
def self.run(args)
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/configuration.rb 2016-04-11 15:53:04.000000000 +0200
@@ -2,7 +2,7 @@
module Spring
class << self
- attr_accessor :application_root
+ attr_accessor :application_root, :quiet
def gemfile
ENV['BUNDLE_GEMFILE'] || "Gemfile"
@@ -49,4 +49,6 @@
end
end
end
+
+ self.quiet = false
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/env.rb 2016-04-11 15:53:04.000000000 +0200
@@ -14,10 +14,10 @@
class Env
attr_reader :log_file
- def initialize(root = nil)
- @root = root
- @project_root = root
- @log_file = File.open(ENV["SPRING_LOG"] || File::NULL, "a")
+ def initialize(options = {})
+ @root = options[:root]
+ @project_root = options[:root]
+ @log_file = options[:log_file] || File.open(ENV["SPRING_LOG"] || File::NULL, "a")
end
def root
@@ -33,17 +33,20 @@
end
def tmp_path
- path = Pathname.new(File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, "spring-#{Process.uid}"))
+ path = Pathname.new(
+ ENV["SPRING_TMP_PATH"] ||
+ File.join(ENV['XDG_RUNTIME_DIR'] || Dir.tmpdir, "spring-#{Process.uid}")
+ )
FileUtils.mkdir_p(path) unless path.exist?
path
end
def application_id
- Digest::MD5.hexdigest(RUBY_VERSION + project_root.to_s)
+ ENV["SPRING_APPLICATION_ID"] || Digest::MD5.hexdigest(RUBY_VERSION + project_root.to_s)
end
def socket_path
- tmp_path.join(application_id)
+ Pathname.new(ENV["SPRING_SOCKET"] || tmp_path.join(application_id))
end
def socket_name
@@ -51,7 +54,7 @@
end
def pidfile_path
- tmp_path.join("#{application_id}.pid")
+ Pathname.new(ENV["SPRING_PIDFILE"] || socket_path.dirname.join("#{socket_path.basename(".*")}.pid"))
end
def pid
@@ -105,5 +108,9 @@
rescue Errno::ESRCH
# already dead
end
+
+ def server_command
+ ENV["SPRING_SERVER_COMMAND"] || "#{File.expand_path("../../../bin/spring", __FILE__)} server --background"
+ end
end
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/server.rb 2016-04-11 15:53:04.000000000 +0200
@@ -10,19 +10,24 @@
module Spring
class Server
- def self.boot
- new.boot
+ def self.boot(options = {})
+ new(options).boot
end
attr_reader :env
- def initialize(env = Env.new)
- @env = env
- @applications = Hash.new { |h, k| h[k] = ApplicationManager.new(k) }
+ def initialize(options = {})
+ @foreground = options.fetch(:foreground, false)
+ @env = options[:env] || default_env
+ @applications = Hash.new { |h, k| h[k] = ApplicationManager.new(k, env) }
@pidfile = env.pidfile_path.open('a')
@mutex = Mutex.new
end
+ def foreground?
+ @foreground
+ end
+
def log(message)
env.log "[server] #{message}"
end
@@ -31,8 +36,8 @@
Spring.verify_environment
write_pidfile
- set_pgid
- ignore_signals
+ set_pgid unless foreground?
+ ignore_signals unless foreground?
set_exit_hook
set_process_title
start_server
@@ -42,6 +47,7 @@
server = UNIXServer.open(env.socket_name)
log "started on #{env.socket_name}"
loop { serve server.accept }
+ rescue Interrupt
end
def serve(client)
@@ -126,5 +132,19 @@
"spring server | #{env.app_name} | started #{distance} ago"
}
end
+
+ private
+
+ def default_env
+ Env.new(log_file: default_log_file)
+ end
+
+ def default_log_file
+ if foreground? && !ENV["SPRING_LOG"]
+ $stdout
+ else
+ nil
+ end
+ end
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/test/acceptance_test.rb 2016-04-11 15:53:04.000000000 +0200
@@ -28,6 +28,10 @@
@app ||= Spring::Test::Application.new("#{Spring::Test.root}/apps/tmp")
end
+ def spring_env
+ app.spring_env
+ end
+
def assert_output(artifacts, expected)
expected.each do |stream, output|
assert artifacts[stream].include?(output),
@@ -47,6 +51,14 @@
assert_output artifacts, expected_output if expected_output
end
+ def refute_output_includes(command, not_expected)
+ artifacts = app.run(*Array(command))
+ not_expected.each do |stream, output|
+ assert !artifacts[stream].include?(output),
+ "expected #{stream} to not include '#{output}'.\n\n#{app.debug(artifacts)}"
+ end
+ end
+
def assert_speedup(ratio = DEFAULT_SPEEDUP)
if ENV['CI']
yield
@@ -84,14 +96,25 @@
test "help message when called without arguments" do
assert_success "bin/spring", stdout: 'Usage: spring COMMAND [ARGS]'
- assert app.spring_env.server_running?
+ assert 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?
+ refute spring_env.server_running?
+ end
+
+ test "tells the user that spring is being used when used automatically via binstubs" do
+ assert_success "bin/rails runner ''", stderr: "Running via Spring preloader in process"
+ assert_success app.spring_test_command, stderr: "Running via Spring preloader in process"
+ end
+
+ test "does not tell the user that spring is being used when used automatically via binstubs but quiet is enabled" do
+ File.write("#{app.user_home}/.spring.rb", "Spring.quiet = true")
+ assert_success "bin/rails runner ''"
+ refute_output_includes "bin/rails runner ''", stderr: 'Running via Spring preloader in process'
end
test "test changes are picked up" do
@@ -165,10 +188,10 @@
test "stop command kills server" do
app.run app.spring_test_command
- assert app.spring_env.server_running?, "The server should be running but it isn't"
+ assert spring_env.server_running?, "The server should be running but it isn't"
assert_success "bin/spring stop"
- assert !app.spring_env.server_running?, "The server should not be running but it is"
+ assert !spring_env.server_running?, "The server should not be running but it is"
end
test "custom commands" do
@@ -381,7 +404,7 @@
end
test "can define client tasks" do
- File.write("#{app.spring_config.sub('.rb', '_client.rb')}", <<-RUBY)
+ File.write("#{app.spring_client_config}", <<-RUBY)
Spring::Client::COMMANDS["foo"] = lambda { |args| puts "bar -- \#{args.inspect}" }
RUBY
assert_success "bin/spring foo --baz", stdout: "bar -- [\"foo\", \"--baz\"]\n"
@@ -447,7 +470,7 @@
system(#{app.env.inspect}, "bundle install")
end
output = `\#{Rails.root.join('bin/rails')} runner 'require "devise"; puts "done";'`
- exit output == "done\n"
+ exit output.include? "done\n"
RUBY
assert_success [%(bin/rails runner 'load Rails.root.join("script.rb")'), timeout: 60]
@@ -476,6 +499,41 @@
expr = "p Kernel.private_instance_methods.include?(:raise)"
assert_success %(bin/rails runner '#{expr}'), stdout: "true"
end
+
+ test "custom bundle path" do
+ bundle_path = app.path(".bundle/#{Bundler.ruby_scope}")
+ bundle_path.dirname.mkpath
+
+ FileUtils.cp_r "#{app.gem_home}/", bundle_path.to_s
+
+ app.run! "bundle install --path .bundle --clean --local"
+
+ assert_speedup do
+ 2.times { assert_success "bundle exec rails runner ''" }
+ end
+ end
+
+ test "booting a foreground server" do
+ FileUtils.cd(app.root) do
+ assert !spring_env.server_running?
+ app.run "spring server &"
+
+ Timeout.timeout(1) do
+ sleep 0.1 until spring_env.server_running?
+ end
+
+ assert_success app.spring_test_command
+ end
+ end
+
+ test "server boot timeout" do
+ app.env["SPRING_SERVER_COMMAND"] = "sleep 1"
+ File.write("#{app.spring_client_config}", %(
+ Spring::Client::Run.const_set(:BOOT_TIMEOUT, 0.1)
+ ))
+
+ assert_failure "bin/rails runner ''", stderr: "timed out"
+ 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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/test/application.rb 2016-04-11 15:53:04.000000000 +0200
@@ -9,7 +9,7 @@
def initialize(root)
@root = Pathname.new(root)
- @spring_env = Spring::Env.new(root)
+ @spring_env = Spring::Env.new(root: root)
end
def exists?
@@ -88,6 +88,10 @@
path "config/spring.rb"
end
+ def spring_client_config
+ path "config/spring_client.rb"
+ end
+
def run(command, opts = {})
start_time = Time.now
@@ -117,7 +121,7 @@
output.merge(status: status, command: command)
rescue Timeout::Error => e
- raise e, "Output:\n\n#{dump_streams(command, read_streams)}"
+ raise Timeout::Error, "While running command:\n\n#{dump_streams(command, read_streams)}"
end
def with_timing
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-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/test/application_generator.rb 2016-04-11 15:53:04.000000000 +0200
@@ -58,6 +58,10 @@
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")
@@ -112,7 +116,7 @@
system("gem build #{name}.gemspec 2>&1")
end
- application.run! "gem install #{spec.gem_dir}/#{name}-*.gem", timeout: nil
+ application.run! "gem install #{spec.gem_dir}/#{name}-*.gem --no-ri --no-rdoc", timeout: nil
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 2015-11-30 17:32:44.000000000 +0100
+++ new/lib/spring/version.rb 2016-04-11 15:53:04.000000000 +0200
@@ -1,3 +1,3 @@
module Spring
- VERSION = "1.5.0"
+ VERSION = "1.7.1"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-11-30 17:32:44.000000000 +0100
+++ new/metadata 2016-04-11 15:53:04.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: spring
version: !ruby/object:Gem::Version
- version: 1.5.0
+ version: 1.7.1
platform: ruby
authors:
- Jon Leighton
autorequire:
bindir: bin
cert_chain: []
-date: 2015-11-30 00:00:00.000000000 Z
+date: 2016-04-11 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: activesupport
@@ -75,6 +75,7 @@
- lib/spring/client/help.rb
- lib/spring/client/rails.rb
- lib/spring/client/run.rb
+- lib/spring/client/server.rb
- lib/spring/client/status.rb
- lib/spring/client/stop.rb
- lib/spring/client/version.rb
@@ -119,7 +120,7 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.4.5.1
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: Rails application preloader
1
0
Hello community,
here is the log from the commit of package rubygem-sass for openSUSE:Factory checked in at 2016-04-28 16:53:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-sass (Old)
and /work/SRC/openSUSE:Factory/.rubygem-sass.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-sass"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-sass/rubygem-sass.changes 2015-10-14 16:45:00.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-sass.new/rubygem-sass.changes 2016-04-28 16:56:42.000000000 +0200
@@ -1,0 +2,18 @@
+Wed Apr 6 06:32:11 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.4.22
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
+Thu Jan 21 05:48:13 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.4.21
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
+Thu Dec 10 05:35:37 UTC 2015 - coolo(a)suse.com
+
+- updated to version 3.4.20
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
Old:
----
sass-3.4.19.gem
New:
----
sass-3.4.22.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-sass.spec ++++++
--- /var/tmp/diff_new_pack.rbHkBJ/_old 2016-04-28 16:56:43.000000000 +0200
+++ /var/tmp/diff_new_pack.rbHkBJ/_new 2016-04-28 16:56:43.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-sass
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-sass
-Version: 3.4.19
+Version: 3.4.22
Release: 0
%define mod_name sass
%define mod_full_name %{mod_name}-%{version}
++++++ sass-3.4.19.gem -> sass-3.4.22.gem ++++++
++++ 5218 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package rubygem-bunny for openSUSE:Factory checked in at 2016-04-28 16:53:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-bunny (Old)
and /work/SRC/openSUSE:Factory/.rubygem-bunny.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bunny"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-bunny/rubygem-bunny.changes 2015-12-03 13:30:05.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-bunny.new/rubygem-bunny.changes 2016-04-28 16:56:40.000000000 +0200
@@ -1,0 +2,42 @@
+Wed Apr 6 06:13:09 UTC 2016 - coolo(a)suse.com
+
+- updated to version 2.3.1
+ see installed ChangeLog.md
+
+ ## Changes between Bunny 2.3.0 and 2.3.1 (Apr 4th, 2016)
+
+ ### Support (Quoted) IPv6 Addresses in Address Lists
+
+ GitHub issue: [#383](https://github.com/ruby-amqp/bunny/issues/383).
+
+ Contributed by Jeremy Heiler.
+
+ ### Transport#read_fully Doesn't Try to Recover
+
+ Since transport is replaced by a recovering connection
+ anyway, and this produces confusing errors up the stack.
+
+ GitHub issue: [#359](https://github.com/ruby-amqp/bunny/issues/359)
+
+ Contributed by Donal McBreen.
+
+-------------------------------------------------------------------
+Sat Feb 27 05:31:02 UTC 2016 - coolo(a)suse.com
+
+- updated to version 2.3.0
+ see installed ChangeLog.md
+
+-------------------------------------------------------------------
+Fri Dec 18 05:29:55 UTC 2015 - coolo(a)suse.com
+
+- updated to version 2.2.2
+ see installed ChangeLog.md
+
+ ## Changes between Bunny 2.2.1 and 2.2.2
+
+ ### amq-protocol Update
+
+ Minimum `amq-protocol` version is now `2.0.1` which includes
+ bug fixes.
+
+-------------------------------------------------------------------
Old:
----
bunny-2.2.1.gem
New:
----
bunny-2.3.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-bunny.spec ++++++
--- /var/tmp/diff_new_pack.hrjiiv/_old 2016-04-28 16:56:41.000000000 +0200
+++ /var/tmp/diff_new_pack.hrjiiv/_new 2016-04-28 16:56:41.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-bunny
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-bunny
-Version: 2.2.1
+Version: 2.3.1
Release: 0
%define mod_name bunny
%define mod_full_name %{mod_name}-%{version}
++++++ bunny-2.2.1.gem -> bunny-2.3.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2015-11-01 20:46:43.000000000 +0100
+++ new/.travis.yml 2016-04-04 12:45:42.000000000 +0200
@@ -1,13 +1,11 @@
language: ruby
bundler_args: --without development
+cache: bundler
before_script: "./bin/ci/before_build"
script: "bundle exec rspec -cf documentation spec"
rvm:
- - "2.2"
- - "2.1"
- - "2.0"
- - "jruby"
- - "rbx"
+ - "2.3.0"
+ - "2.2.2"
notifications:
email: michael(a)rabbitmq.com
services:
@@ -15,8 +13,3 @@
branches:
only:
- master
- - 1.4.x-stable
-matrix:
- allow_failures:
- - rvm: rbx
- - rvm: jruby
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ChangeLog.md new/ChangeLog.md
--- old/ChangeLog.md 2015-11-01 20:46:43.000000000 +0100
+++ new/ChangeLog.md 2016-04-04 12:45:42.000000000 +0200
@@ -1,4 +1,40 @@
-## Changes between Bunny 2.2.0 and 2.2.1
+## Changes between Bunny 2.3.0 and 2.3.1 (Apr 4th, 2016)
+
+### Support (Quoted) IPv6 Addresses in Address Lists
+
+GitHub issue: [#383](https://github.com/ruby-amqp/bunny/issues/383).
+
+Contributed by Jeremy Heiler.
+
+### Transport#read_fully Doesn't Try to Recover
+
+Since transport is replaced by a recovering connection
+anyway, and this produces confusing errors up the stack.
+
+GitHub issue: [#359](https://github.com/ruby-amqp/bunny/issues/359)
+
+Contributed by Donal McBreen.
+
+
+
+## Changes between Bunny 2.2.0 and 2.3.0 (Feb 26th, 2016)
+
+### Thread#abort_on_exception Setting for Consumer Work Pool Threads
+
+`Bunny::Session#create_channel` now supports a 3rd argument that,
+when set to `true`, makes consumer work pool threads to have
+`Thread#abort_on_exception` set on them.
+
+Contributed by Seamus Abshere.
+
+### Explicit Transport Closure on Recovery
+
+Bunny now will explicitly close previosly used transport before starting
+connection recovery.
+
+GitHub issue: [#377](https://github.com/ruby-amqp/bunny/pull/377).
+
+Contributed by bkanhoopla.
### No TLS Socket Double-init
@@ -8,9 +44,15 @@
Contributed by Carl Hörberg.
+### Lazily Evaluated Debug Log Strings
+
+GH issue: [#375](https://github.com/ruby-amqp/bunny/pull/375)
+Contributed by Omer Katz.
-## Changes between Bunny 2.1.0 and 2.2.0
+
+
+## Changes between Bunny 2.1.0 and 2.2.0 (Sep 6th, 2015)
### Add :addresses to connect options
@@ -18,6 +60,8 @@
address is a combination of a host and a port. This makes it possible to
specify different hosts with different ports.
+Contributed by Bart van Zon (Tele2).
+
### Recover from connection.close by default
Bunny will now try to reconnect also when server sent connection.close is
@@ -25,6 +69,9 @@
force closed by the server). This is in-line with how many other clients behave.
The old default was `recover_from_connection_close: false`.
+Contributed by Carl Hörberg (CloudAMQP).
+
+
## Changes between Bunny 2.0.0 and 2.1.0
Bunny 2.1.0 has an **important breaking change**. It is highly
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2015-11-01 20:46:43.000000000 +0100
+++ new/Gemfile 2016-04-04 12:45:42.000000000 +0200
@@ -32,8 +32,8 @@
end
group :test do
- gem "rspec", "~> 3.2.0"
- gem "rabbitmq_http_api_client", "~> 1.2.0"
+ gem "rspec", "~> 3.4.0"
+ gem "rabbitmq_http_api_client", "~> 1.6.0"
end
gemspec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/LICENSE new/LICENSE
--- old/LICENSE 2015-11-01 20:46:43.000000000 +0100
+++ new/LICENSE 2016-04-04 12:45:42.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2009 – 2015 Chris Duncan, Jakub Stastny aka botanicus,
+Copyright (c) 2009 – 2016 Chris Duncan, Jakub Stastny aka botanicus,
Michael S. Klishin, Eric Lindvall, Stefan Kaes and contributors.
Permission is hereby granted, free of charge, to any person obtaining
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2015-11-01 20:46:43.000000000 +0100
+++ new/README.md 2016-04-04 12:45:42.000000000 +0200
@@ -51,7 +51,7 @@
* CRuby 2.2, 2.1, 2.0
Bunny works sufficiently well on JRuby but there are known
-JRuby bugs that cause high CPU burn. JRuby users should
+JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should
use [March Hare](http://rubymarchhare.info).
Bunny `1.7.x` was the last version to support CRuby 1.9.3 and 1.8.7
@@ -88,7 +88,7 @@
To use Bunny in a project managed with Bundler:
``` ruby
-gem "bunny", ">= 2.1.0"
+gem "bunny", ">= 2.2.2"
```
@@ -158,9 +158,9 @@
to also join the [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users) mailing list. Feel free to ask any questions that you may have.
-### IRC
+## Continuous Integration
-For more immediate help, please join `#rabbitmq` on `irc.freenode.net`.
+[![Build Status](https://travis-ci.org/ruby-amqp/bunny.png)](https://travis-ci.org/r…
### News & Announcements on Twitter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bin/ci/before_build new/bin/ci/before_build
--- old/bin/ci/before_build 2015-11-01 20:46:43.000000000 +0100
+++ new/bin/ci/before_build 2016-04-04 12:45:42.000000000 +0200
@@ -1,11 +1,10 @@
#!/usr/bin/env ruby
-$nodename = ENV.fetch("RABBITMQ_NODENAME", "rabbit")
$ctl = ENV.fetch("RABBITMQCTL", "sudo rabbitmqctl")
$plugins = ENV.fetch("RABBITMQ_PLUGINS", "sudo rabbitmq-plugins")
def rabbit_control(args)
- command = "#{$ctl} -n #{$nodename} #{args}"
+ command = "#{$ctl} #{args}"
system command
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bunny.gemspec new/bunny.gemspec
--- old/bunny.gemspec 2015-11-01 20:46:43.000000000 +0100
+++ new/bunny.gemspec 2016-04-04 12:45:42.000000000 +0200
@@ -24,7 +24,7 @@
s.email = ["michael.s.klishin(a)gmail.com"]
# Dependencies
- s.add_dependency "amq-protocol", ">= 2.0.0"
+ s.add_dependency "amq-protocol", ">= 2.0.1"
# Files.
s.has_rdoc = true
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/connection/channel_level_exception.rb new/examples/connection/channel_level_exception.rb
--- old/examples/connection/channel_level_exception.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/connection/channel_level_exception.rb 2016-04-04 12:45:42.000000000 +0200
@@ -12,14 +12,6 @@
conn.start
begin
- ch1 = conn.create_channel
- ch1.queue_delete("queue_that_should_not_exist#{rand}")
-rescue Bunny::NotFound => e
- puts "Channel-level exception! Code: #{e.channel_close.reply_code}, message: #{e.channel_close.reply_text}"
-end
-
-
-begin
ch2 = conn.create_channel
q = "bunny.examples.recovery.q#{rand}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/guides/extensions/alternate_exchange.rb new/examples/guides/extensions/alternate_exchange.rb
--- old/examples/guides/extensions/alternate_exchange.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/guides/extensions/alternate_exchange.rb 2016-04-04 12:45:42.000000000 +0200
@@ -4,6 +4,8 @@
require "rubygems"
require "bunny"
+STDOUT.sync = true
+
puts "=> Demonstrating alternate exchanges"
puts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/guides/getting_started/hello_world.rb new/examples/guides/getting_started/hello_world.rb
--- old/examples/guides/getting_started/hello_world.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/guides/getting_started/hello_world.rb 2016-04-04 12:45:42.000000000 +0200
@@ -4,6 +4,8 @@
require "rubygems"
require "bunny"
+STDOUT.sync = true
+
conn = Bunny.new
conn.start
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/guides/getting_started/weathr.rb new/examples/guides/getting_started/weathr.rb
--- old/examples/guides/getting_started/weathr.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/guides/getting_started/weathr.rb 2016-04-04 12:45:42.000000000 +0200
@@ -4,6 +4,8 @@
require "rubygems"
require "bunny"
+STDOUT.sync = true
+
connection = Bunny.new
connection.start
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/guides/queues/one_off_consumer.rb new/examples/guides/queues/one_off_consumer.rb
--- old/examples/guides/queues/one_off_consumer.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/guides/queues/one_off_consumer.rb 2016-04-04 12:45:42.000000000 +0200
@@ -4,6 +4,8 @@
require "rubygems"
require "bunny"
+STDOUT.sync = true
+
conn = Bunny.new
conn.start
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/examples/guides/queues/redeliveries.rb new/examples/guides/queues/redeliveries.rb
--- old/examples/guides/queues/redeliveries.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/examples/guides/queues/redeliveries.rb 2016-04-04 12:45:42.000000000 +0200
@@ -4,6 +4,8 @@
require "rubygems"
require "bunny"
+STDOUT.sync = true
+
puts "=> Subscribing for messages using explicit acknowledgements model"
puts
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/channel.rb new/lib/bunny/channel.rb
--- old/lib/bunny/channel.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/channel.rb 2016-04-04 12:45:42.000000000 +0200
@@ -618,14 +618,14 @@
# implementation (and even more correct and convenient ones, such as wait/notify, should
# we implement them). So we return a triple of nils immediately which apps should be
# able to handle anyway as "got no message, no need to act". MK.
- @last_basic_get_response = if @connection.open?
- wait_on_basic_get_continuations
- else
- [nil, nil, nil]
- end
+ last_basic_get_response = if @connection.open?
+ wait_on_basic_get_continuations
+ else
+ [nil, nil, nil]
+ end
raise_if_continuation_resulted_in_a_channel_error!
- @last_basic_get_response
+ last_basic_get_response
end
# prefetch_count is of type short in the protocol. MK.
@@ -705,7 +705,7 @@
#
# ch = conn.create_channel
# q.subscribe do |delivery_info, properties, payload|
- # # requeue the message
+ # # reject the message
# ch.basic_reject(delivery_info.delivery_tag, false)
# end
#
@@ -1415,7 +1415,6 @@
Bunny::Timeout.timeout(wait_on_continuations_timeout, ClientTimeout) do
@last_confirm_select_ok = wait_on_continuations
end
- @confirm_mode = true
raise_if_continuation_resulted_in_a_channel_error!
@last_confirm_select_ok
end
@@ -1488,7 +1487,7 @@
#
# @api plugin
def recover_from_network_failure
- @logger.debug "Recovering channel #{@id} after network failure"
+ @logger.debug { "Recovering channel #{@id} after network failure" }
release_all_continuations
recover_prefetch_setting
@@ -1544,7 +1543,7 @@
# @api plugin
def recover_queues
@queues.values.dup.each do |q|
- @logger.debug "Recovering queue #{q.name}"
+ @logger.debug { "Recovering queue #{q.name}" }
q.recover_from_network_failure
end
end
@@ -1555,7 +1554,7 @@
# @api plugin
def recover_consumers
unless @consumers.empty?
- @work_pool = ConsumerWorkPool.new((a)work_pool.size)
+ @work_pool = ConsumerWorkPool.new((a)work_pool.size, @work_pool.abort_on_exception)
@work_pool.start
end
@consumers.values.dup.each do |c|
@@ -1616,7 +1615,7 @@
# @private
def handle_method(method)
- @logger.debug "Channel#handle_frame on channel #{@id}: #{method.inspect}"
+ @logger.debug { "Channel#handle_frame on channel #{@id}: #{method.inspect}" }
case method
when AMQ::Protocol::Queue::DeclareOk then
@continuations.push(method)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/consumer_work_pool.rb new/lib/bunny/consumer_work_pool.rb
--- old/lib/bunny/consumer_work_pool.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/consumer_work_pool.rb 2016-04-04 12:45:42.000000000 +0200
@@ -15,9 +15,11 @@
attr_reader :threads
attr_reader :size
+ attr_reader :abort_on_exception
- def initialize(size = 1)
+ def initialize(size = 1, abort_on_exception = false)
@size = size
+ @abort_on_exception = abort_on_exception
@queue = ::Queue.new
@paused = false
end
@@ -32,6 +34,7 @@
@size.times do
t = Thread.new(&method(:run_loop))
+ t.abort_on_exception = true if abort_on_exception
@threads << t
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/exceptions.rb new/lib/bunny/exceptions.rb
--- old/lib/bunny/exceptions.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/exceptions.rb 2016-04-04 12:45:42.000000000 +0200
@@ -69,7 +69,7 @@
m = case e
when String then
e
- when Exception then
+ when ::Exception then
e.message
end
if hostname && port
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/get_response.rb new/lib/bunny/get_response.rb
--- old/lib/bunny/get_response.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/get_response.rb 2016-04-04 12:45:42.000000000 +0200
@@ -20,7 +20,7 @@
attr_reader :channel
# @private
- def initialize(get_ok, consumer, channel)
+ def initialize(get_ok, channel)
@get_ok = get_ok
@hash = {
:delivery_tag => @get_ok.delivery_tag,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/heartbeat_sender.rb new/lib/bunny/heartbeat_sender.rb
--- old/lib/bunny/heartbeat_sender.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/heartbeat_sender.rb 2016-04-04 12:45:42.000000000 +0200
@@ -62,7 +62,7 @@
now = Time.now
if now > (@last_activity_time + @interval)
- @logger.debug "Sending a heartbeat, last activity time: #{@last_activity_time}, interval (s): #{@interval}"
+ @logger.debug { "Sending a heartbeat, last activity time: #{@last_activity_time}, interval (s): #{@interval}" }
@transport.write_without_timeout(AMQ::Protocol::HeartbeatFrame.encode)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/queue.rb new/lib/bunny/queue.rb
--- old/lib/bunny/queue.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/queue.rb 2016-04-04 12:45:42.000000000 +0200
@@ -250,7 +250,7 @@
if block
if properties
- di = GetResponse.new(get_response, properties, @channel)
+ di = GetResponse.new(get_response, @channel)
mp = MessageProperties.new(properties)
block.call(di, mp, content)
@@ -259,7 +259,7 @@
end
else
if properties
- di = GetResponse.new(get_response, properties, @channel)
+ di = GetResponse.new(get_response, @channel)
mp = MessageProperties.new(properties)
[di, mp, content]
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/reader_loop.rb new/lib/bunny/reader_loop.rb
--- old/lib/bunny/reader_loop.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/reader_loop.rb 2016-04-04 12:45:42.000000000 +0200
@@ -33,7 +33,7 @@
begin
break if @mutex.synchronize { @stopping || @stopped || @network_is_down }
run_once
- rescue AMQ::Protocol::EmptyResponseError, IOError, SystemCallError => e
+ rescue AMQ::Protocol::EmptyResponseError, IOError, SystemCallError, Timeout::Error => e
break if terminate? || @session.closing? || @session.closed?
log_exception(e)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/session.rb new/lib/bunny/session.rb
--- old/lib/bunny/session.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/session.rb 2016-04-04 12:45:42.000000000 +0200
@@ -86,8 +86,9 @@
attr_reader :mechanism
# @return [Logger]
attr_reader :logger
- # @return [Integer] Timeout for blocking protocol operations (queue.declare, queue.bind, etc), in milliseconds. Default is 4000.
+ # @return [Integer] Timeout for blocking protocol operations (queue.declare, queue.bind, etc), in milliseconds. Default is 15000.
attr_reader :continuation_timeout
+ attr_reader :network_recovery_interval
# @param [String, Hash] connection_string_or_opts Connection string or a hash of connection options
@@ -107,7 +108,7 @@
# @option connection_string_or_opts [String] :tls_key (nil) Path to client TLS/SSL private key file (.pem)
# @option connection_string_or_opts [Array<String>] :tls_ca_certificates Array of paths to TLS/SSL CA files (.pem), by default detected from OpenSSL configuration
# @option connection_string_or_opts [String] :verify_peer (true) Whether TLS peer verification should be performed
- # @option connection_string_or_opts [Integer] :continuation_timeout (4000) Timeout for client operations that expect a response (e.g. {Bunny::Queue#get}), in milliseconds.
+ # @option connection_string_or_opts [Integer] :continuation_timeout (15000) Timeout for client operations that expect a response (e.g. {Bunny::Queue#get}), in milliseconds.
# @option connection_string_or_opts [Integer] :connection_timeout (5) Timeout in seconds for connecting to the server.
# @option connection_string_or_opts [Proc] :hosts_shuffle_strategy A Proc that reorders a list of host strings, defaults to Array#shuffle
# @option connection_string_or_opts [Logger] :logger The logger. If missing, one is created using :log_file and :log_level.
@@ -137,18 +138,23 @@
@default_hosts_shuffle_strategy = Proc.new { |hosts| hosts.shuffle }
@opts = opts
+ log_file = opts[:log_file] || opts[:logfile] || STDOUT
+ log_level = opts[:log_level] || ENV["BUNNY_LOG_LEVEL"] || Logger::WARN
+ # we might need to log a warning about ill-formatted IPv6 address but
+ # progname includes hostname, so init like this first
+ @logger = opts.fetch(:logger, init_default_logger_without_progname(log_file, log_level))
+
@addresses = self.addresses_from(opts)
@address_index = 0
+ # re-init, see above
+ @logger = opts.fetch(:logger, init_default_logger(log_file, log_level))
+
@user = self.username_from(opts)
@pass = self.password_from(opts)
@vhost = self.vhost_from(opts)
@threaded = opts.fetch(:threaded, true)
- log_file = opts[:log_file] || opts[:logfile] || STDOUT
- log_level = opts[:log_level] || ENV["BUNNY_LOG_LEVEL"] || Logger::WARN
- @logger = opts.fetch(:logger, init_default_logger(log_file, log_level))
-
validate_connection_options(opts)
# should automatic recovery from network failures be used?
@@ -330,14 +336,14 @@
# opened (this operation is very fast and inexpensive).
#
# @return [Bunny::Channel] Newly opened channel
- def create_channel(n = nil, consumer_pool_size = 1)
+ def create_channel(n = nil, consumer_pool_size = 1, consumer_pool_abort_on_exception = false)
raise ArgumentError, "channel number 0 is reserved in the protocol and cannot be used" if 0 == n
@channel_mutex.synchronize do
if n && (ch = @channels[n])
ch
else
- ch = Bunny::Channel.new(self, n, ConsumerWorkPool.new(consumer_pool_size || 1))
+ ch = Bunny::Channel.new(self, n, ConsumerWorkPool.new(consumer_pool_size || 1, consumer_pool_abort_on_exception))
ch.open
ch
end
@@ -547,7 +553,7 @@
#
# @private
def handle_frame(ch_number, method)
- @logger.debug "Session#handle_frame on #{ch_number}: #{method.inspect}"
+ @logger.debug { "Session#handle_frame on #{ch_number}: #{method.inspect}" }
case method
when AMQ::Protocol::Channel::OpenOk then
@continuations.push(method)
@@ -636,6 +642,7 @@
@channels.each do |n, ch|
ch.maybe_kill_consumer_work_pool!
end
+ @reader_loop.stop if @reader_loop
maybe_shutdown_heartbeat_sender
recover_from_network_failure
@@ -695,9 +702,6 @@
# @private
def recover_channels
- # default channel is reopened right after connection
- # negotiation is completed, so make sure we do not try to open
- # it twice. MK.
@channels.each do |n, ch|
ch.open
@@ -776,11 +780,6 @@
end
# @private
- def host_with_port?(address)
- address.include? ':'
- end
-
- # @private
def port_from(options)
fallback = if options[:tls] || options[:ssl]
AMQ::Protocol::TLS_PORT
@@ -792,13 +791,60 @@
end
# @private
+ def host_with_port?(address)
+ # we need to handle cases such as [2001:db8:85a3:8d3:1319:8a2e:370:7348]:5671
+ last_colon = address.rindex(":")
+ last_closing_square_bracket = address.rindex("]")
+
+ if last_closing_square_bracket.nil?
+ address.include?(":")
+ else
+ last_closing_square_bracket < last_colon
+ end
+ end
+
+ # @private
def host_from_address(address)
- address.split(":")[0]
+ # we need to handle cases such as [2001:db8:85a3:8d3:1319:8a2e:370:7348]:5671
+ last_colon = address.rindex(":")
+ last_closing_square_bracket = address.rindex("]")
+
+ if last_closing_square_bracket.nil?
+ parts = address.split(":")
+ # this looks like an unquoted IPv6 address, so emit a warning
+ if parts.size > 2
+ @logger.warn "Address #{address} looks like an unquoted IPv6 address. Make sure you quote IPv6 addresses like so: [2001:db8:85a3:8d3:1319:8a2e:370:7348]"
+ end
+ return parts[0]
+ end
+
+ if last_closing_square_bracket < last_colon
+ # there is a port
+ address[0, last_colon]
+ elsif last_closing_square_bracket > last_colon
+ address
+ end
end
# @private
def port_from_address(address)
- address.split(":")[1].to_i
+ # we need to handle cases such as [2001:db8:85a3:8d3:1319:8a2e:370:7348]:5671
+ last_colon = address.rindex(":")
+ last_closing_square_bracket = address.rindex("]")
+
+ if last_closing_square_bracket.nil?
+ parts = address.split(":")
+ # this looks like an unquoted IPv6 address, so emit a warning
+ if parts.size > 2
+ @logger.warn "Address #{address} looks like an unquoted IPv6 address. Make sure you quote IPv6 addresses like so: [2001:db8:85a3:8d3:1319:8a2e:370:7348]"
+ end
+ return parts[1].to_i
+ end
+
+ if last_closing_square_bracket < last_colon
+ # there is a port
+ address[(last_colon + 1)..-1].to_i
+ end
end
# @private
@@ -934,7 +980,7 @@
end
end
- # Sends multiple frames, one by one. For thread safety this method takes a channel
+ # Sends multiple frames, in one go. For thread safety this method takes a channel
# object and synchronizes on it.
#
# @private
@@ -1049,7 +1095,7 @@
else
negotiate_value(@client_heartbeat, connection_tune.heartbeat)
end
- @logger.debug "Heartbeat interval negotiation: client = #{@client_heartbeat}, server = #{connection_tune.heartbeat}, result = #{@heartbeat}"
+ @logger.debug { "Heartbeat interval negotiation: client = #{@client_heartbeat}, server = #{connection_tune.heartbeat}, result = #{@heartbeat}" }
@logger.info "Heartbeat interval used (in seconds): #{@heartbeat}"
# We set the read_write_timeout to twice the heartbeat value
@@ -1069,9 +1115,9 @@
end
@transport.send_frame(AMQ::Protocol::Connection::TuneOk.encode(@channel_max, @frame_max, @heartbeat))
- @logger.debug "Sent connection.tune-ok with heartbeat interval = #{@heartbeat}, frame_max = #{@frame_max}, channel_max = #{@channel_max}"
+ @logger.debug { "Sent connection.tune-ok with heartbeat interval = #{@heartbeat}, frame_max = #{@frame_max}, channel_max = #{@channel_max}" }
@transport.send_frame(AMQ::Protocol::Connection::Open.encode(self.vhost))
- @logger.debug "Sent connection.open with vhost = #{self.vhost}"
+ @logger.debug { "Sent connection.open with vhost = #{self.vhost}" }
frame2 = begin
fr = @transport.read_next_frame
@@ -1220,6 +1266,15 @@
lgr
end
end
+
+ # @private
+ def init_default_logger_without_progname(logfile, level)
+ @default_logger = begin
+ lgr = ::Logger.new(logfile)
+ lgr.level = normalize_log_level(level)
+ lgr
+ end
+ end
# @private
def normalize_log_level(level)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/transport.rb new/lib/bunny/transport.rb
--- old/lib/bunny/transport.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/transport.rb 2016-04-04 12:45:42.000000000 +0200
@@ -218,7 +218,7 @@
@status = :not_connected
if @session.automatically_recover?
- @session.handle_network_failure(e)
+ raise
else
@session_thread.raise(Bunny::NetworkFailure.new("detected a network failure: #{e.message}", e))
end
@@ -458,8 +458,8 @@
cert_inlines.push(cert)
end
end
- @logger.debug "Using CA certificates at #{cert_files.join(', ')}"
- @logger.debug "Using #{cert_inlines.count} inline CA certificates"
+ @logger.debug { "Using CA certificates at #{cert_files.join(', ')}" }
+ @logger.debug { "Using #{cert_inlines.count} inline CA certificates" }
if certs.empty?
@logger.error "No CA certificates found, add one with :tls_ca_certificates"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/version.rb new/lib/bunny/version.rb
--- old/lib/bunny/version.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/lib/bunny/version.rb 2016-04-04 12:45:42.000000000 +0200
@@ -2,5 +2,5 @@
module Bunny
# @return [String] Version of the library
- VERSION = "2.2.1"
+ VERSION = "2.3.1"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-11-01 20:46:43.000000000 +0100
+++ new/metadata 2016-04-04 12:45:42.000000000 +0200
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: bunny
version: !ruby/object:Gem::Version
- version: 2.2.1
+ version: 2.3.1
platform: ruby
authors:
- Chris Duncan
@@ -12,7 +12,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2015-11-01 00:00:00.000000000 Z
+date: 2016-04-04 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: amq-protocol
@@ -20,14 +20,14 @@
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: 2.0.0
+ version: 2.0.1
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
- version: 2.0.0
+ version: 2.0.1
description: Easy to use, feature complete Ruby client for RabbitMQ 3.3 and later
versions.
email:
@@ -228,7 +228,7 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.4.8
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: Popular easy to use Ruby client for RabbitMQ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/basic_consume_spec.rb new/spec/higher_level_api/integration/basic_consume_spec.rb
--- old/spec/higher_level_api/integration/basic_consume_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/basic_consume_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -260,7 +260,10 @@
let(:queue_name) { "bunny.basic_consume#{rand}" }
it "uses exception handler" do
+ caughts = []
t = Thread.new do
+ allow(connection.logger).to receive(:error) { |x| caughts << x }
+
ch = connection.create_channel
q = ch.queue(queue_name, :auto_delete => true, :durable => false)
@@ -276,6 +279,8 @@
5.times { x.publish("hello", :routing_key => queue_name) }
sleep 1.5
+ expect(caughts.size).to eq(5)
+
ch.close
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/connection_recovery_spec.rb new/spec/higher_level_api/integration/connection_recovery_spec.rb
--- old/spec/higher_level_api/integration/connection_recovery_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/connection_recovery_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -63,27 +63,34 @@
end
def ensure_queue_recovery(ch, q)
+ ch.confirm_select
q.purge
x = ch.default_exchange
x.publish("msg", :routing_key => q.name)
+ ch.wait_for_confirms
sleep 0.5
expect(q.message_count).to eq 1
q.purge
end
- def ensure_queue_binding_recovery(x, q, routing_key = "")
+ def ensure_queue_binding_recovery(ch, x, q, routing_key = "")
+ ch.confirm_select
q.purge
x.publish("msg", :routing_key => routing_key)
+ ch.wait_for_confirms
sleep 0.5
expect(q.message_count).to eq 1
q.purge
end
def ensure_exchange_binding_recovery(ch, source, destination, routing_key = "")
+ ch.confirm_select
q = ch.queue("", :exclusive => true)
q.bind(destination, :routing_key => routing_key)
source.publish("msg", :routing_key => routing_key)
+ ch.wait_for_confirms
+ sleep 0.5
expect(q.message_count).to eq 1
q.delete
end
@@ -273,7 +280,7 @@
wait_for_recovery
expect(ch).to be_open
- ensure_queue_binding_recovery(x, q)
+ ensure_queue_binding_recovery(ch, x, q)
end
end
@@ -352,6 +359,7 @@
expect(c).not_to be_open
wait_for_recovery
+ sleep 1
expect(ch).to be_open
expect(q.consumer_count).to eq n
@@ -374,6 +382,7 @@
expect(c).not_to be_open
wait_for_recovery
+ sleep 1
expect(ch).to be_open
qs.each do |q|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/connection_spec.rb new/spec/higher_level_api/integration/connection_spec.rb
--- old/spec/higher_level_api/integration/connection_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/connection_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -192,6 +192,83 @@
end
end
+ context "initialized with :addresses => [...] with quoted IPv6 hostnames" do
+ after :each do
+ subject.close if subject.open?
+ end
+
+ let(:host) { "[2001:db8:85a3:8d3:1319:8a2e:370:7348]" }
+ let(:port) { 5673 }
+ let(:address) { "#{host}:#{port}" }
+ let(:addresses) { [address] }
+ let(:subject) { described_class.new(:addresses => addresses) }
+
+ it "uses correct hostname" do
+ expect(subject.host).to eq host
+ expect(subject.hostname).to eq host
+ end
+
+ it "uses port 5673" do
+ expect(subject.port).to eq port
+ end
+
+ it "uses username = guest" do
+ expect(subject.username).to eq username
+ expect(subject.user).to eq username
+ end
+ end
+
+ context "initialized with :addresses => [...] with quoted IPv6 hostnames without ports" do
+ after :each do
+ subject.close if subject.open?
+ end
+
+ let(:host) { "[2001:db8:85a3:8d3:1319:8a2e:370:7348]" }
+ let(:address) { host }
+ let(:addresses) { [address] }
+ let(:subject) { described_class.new(:addresses => addresses) }
+
+ it "uses correct hostname" do
+ expect(subject.host).to eq host
+ expect(subject.hostname).to eq host
+ end
+
+ it "uses port 5672" do
+ expect(subject.port).to eq 5672
+ end
+
+ it "uses username = guest" do
+ expect(subject.username).to eq username
+ expect(subject.user).to eq username
+ end
+ end
+
+ context "initialized with :addresses => [...] with an quoted IPv6 hostnames" do
+ after :each do
+ subject.close if subject.open?
+ end
+
+ let(:host) { "2001:db8:85a3:8d3:1319:8a2e:370:7348" }
+ let(:port) { 5673 }
+ let(:address) { "#{host}:#{port}" }
+ let(:addresses) { [address] }
+ let(:subject) { described_class.new(:addresses => addresses) }
+
+ it "fails to correctly parse the host (and emits a warning)" do
+ expect(subject.host).to eq "2001"
+ expect(subject.hostname).to eq "2001"
+ end
+
+ it "fails to correctly parse the port (and emits a warning)" do
+ expect(subject.port).to eq 0
+ end
+
+ it "uses username = guest" do
+ expect(subject.username).to eq username
+ expect(subject.user).to eq username
+ end
+ end
+
context "initialized with conflicting hosts and addresses" do
let(:host) { "192.168.1.10" }
let(:port) { 5673 }
@@ -259,9 +336,9 @@
:password => "bunny_password",
:vhost => "bunny_testbed",
:tls => true,
- :tls_cert => "spec/tls/client_cert.pem",
+ :tls_cert => "spec/tls/client_certificate.pem",
:tls_key => "spec/tls/client_key.pem",
- :tls_ca_certificates => ["./spec/tls/cacert.pem"])
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"])
end
it "uses TLS port" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/connection_stop_spec.rb new/spec/higher_level_api/integration/connection_stop_spec.rb
--- old/spec/higher_level_api/integration/connection_stop_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/connection_stop_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -52,7 +52,7 @@
describe "that recovers from connection.close" do
it "can be closed" do
- c = Bunny.new(:automatically_recover => false, :recover_from_connection_close => true, :network_recovery_interval => 0.2)
+ c = Bunny.new(:automatically_recover => true, :recover_from_connection_close => true, :network_recovery_interval => 0.2)
c.start
ch = c.create_channel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/queue_declare_spec.rb new/spec/higher_level_api/integration/queue_declare_spec.rb
--- old/spec/higher_level_api/integration/queue_declare_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/queue_declare_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -136,6 +136,34 @@
end
+ context "when queue is declared with priorities" do
+ let(:args) do
+ {"x-max-priority" => 5}
+ end
+
+ it "enables priority implementation" do
+ ch = connection.create_channel
+ ch.confirm_select
+
+ q = ch.queue("bunny.tests.queues.with-arguments.priority", :arguments => args, :exclusive => true)
+ expect(q.arguments).to eq args
+
+ q.publish("xyzzy")
+ ch.wait_for_confirms
+ sleep 0.1
+
+ # this test only does sanity checking,
+ # without trying to actually test prioritisation.
+ #
+ # added to guard against issues such as
+ # https://github.com/rabbitmq/rabbitmq-server/issues/488
+ expect(q.message_count).to eq 1
+
+ ch.close
+ end
+ end
+
+
describe "#queue_exists?" do
context "when a queue exists" do
it "returns true" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/tls_connection_spec.rb new/spec/higher_level_api/integration/tls_connection_spec.rb
--- old/spec/higher_level_api/integration/tls_connection_spec.rb 2015-11-01 20:46:43.000000000 +0100
+++ new/spec/higher_level_api/integration/tls_connection_spec.rb 2016-04-04 12:45:42.000000000 +0200
@@ -37,9 +37,9 @@
:password => "bunny_password",
:vhost => "bunny_testbed",
:tls => true,
- :tls_cert => "spec/tls/client_cert.pem",
+ :tls_cert => "spec/tls/client_certificate.pem",
:tls_key => "spec/tls/client_key.pem",
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
@@ -59,7 +59,7 @@
:password => "bunny_password",
:vhost => "bunny_testbed",
:tls => true,
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
@@ -76,9 +76,9 @@
describe "TLS connection to RabbitMQ with a connection string" do
let(:connection) do
c = Bunny.new("amqps://bunny_gem:bunny_password@127.0.0.1/bunny_testbed",
- :tls_cert => "spec/tls/client_cert.pem",
+ :tls_cert => "spec/tls/client_certificate.pem",
:tls_key => "spec/tls/client_key.pem",
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
@@ -95,7 +95,7 @@
describe "TLS connection to RabbitMQ with a connection string and w/o client certificate and key" do
let(:connection) do
c = Bunny.new("amqps://bunny_gem:bunny_password@127.0.0.1/bunny_testbed",
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
@@ -115,9 +115,9 @@
:password => "bunny_password",
:vhost => "bunny_testbed",
:tls => true,
- :tls_cert => File.read("./spec/tls/client_cert.pem"),
+ :tls_cert => File.read("./spec/tls/client_certificate.pem"),
:tls_key => File.read("./spec/tls/client_key.pem"),
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
@@ -137,7 +137,7 @@
:vhost => "bunny_testbed",
:tls => true,
:tls_protocol => :TLSv1,
- :tls_ca_certificates => ["./spec/tls/cacert.pem"],
+ :tls_ca_certificates => ["./spec/tls/ca_certificate.pem"],
:verify_peer => false)
c.start
c
1
0
Hello community,
here is the log from the commit of package rubygem-responders for openSUSE:Factory checked in at 2016-04-28 16:53:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-responders (Old)
and /work/SRC/openSUSE:Factory/.rubygem-responders.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-responders"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-responders/rubygem-responders.changes 2015-02-16 21:13:40.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-responders.new/rubygem-responders.changes 2016-04-28 16:56:39.000000000 +0200
@@ -1,0 +2,21 @@
+Tue Mar 22 05:33:48 UTC 2016 - coolo(a)suse.com
+
+- updated to version 2.1.2
+ see installed CHANGELOG.md
+
+ ## 2.1.2
+
+ * Fix rendering when using `ActionController::API`. (by @eLod)
+ * Added API controller template for the controller generator. (by @vestimir)
+
+-------------------------------------------------------------------
+Sun Dec 20 05:36:45 UTC 2015 - coolo(a)suse.com
+
+- updated to version 2.1.1
+ see installed CHANGELOG.md
+
+ ## 2.1.1
+
+ * Added support for Rails 5.
+
+-------------------------------------------------------------------
Old:
----
responders-2.1.0.gem
New:
----
responders-2.1.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-responders.spec ++++++
--- /var/tmp/diff_new_pack.JhB79k/_old 2016-04-28 16:56:40.000000000 +0200
+++ /var/tmp/diff_new_pack.JhB79k/_new 2016-04-28 16:56:40.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-responders
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-responders
-Version: 2.1.0
+Version: 2.1.2
Release: 0
%define mod_name responders
%define mod_full_name %{mod_name}-%{version}
++++++ responders-2.1.0.gem -> responders-2.1.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2015-01-27 10:28:18.000000000 +0100
+++ new/CHANGELOG.md 2016-03-21 15:20:44.000000000 +0100
@@ -1,3 +1,12 @@
+## 2.1.2
+
+* Fix rendering when using `ActionController::API`. (by @eLod)
+* Added API controller template for the controller generator. (by @vestimir)
+
+## 2.1.1
+
+* Added support for Rails 5.
+
## 2.1.0
* No longer automatically set the responders generator as many projects may use this gem as a dependency. When upgrading, users will need to add `config.app_generators.scaffold_controller :responders_controller` to their application. The `responders:install` generator has been updated to automatically insert it in new applications
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE
--- old/MIT-LICENSE 2015-01-27 10:28:18.000000000 +0100
+++ new/MIT-LICENSE 2016-03-21 15:20:44.000000000 +0100
@@ -1,4 +1,4 @@
-Copyright 2009-2014 Plataforma Tecnologia. http://blog.plataformatec.com.br
+Copyright 2009-2016 Plataformatec. http://plataformatec.com.br
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2015-01-27 10:28:18.000000000 +0100
+++ new/README.md 2016-03-21 15:20:44.000000000 +0100
@@ -1,8 +1,8 @@
# Responders
-[![Gem Version](https://fury-badge.herokuapp.com/rb/responders.png)](http://badge.…
-[![Build Status](https://api.travis-ci.org/plataformatec/responders.png?branch=maste…
-[![Code Climate](https://codeclimate.com/github/plataformatec/responders.png)](http…
+[![Gem Version](https://fury-badge.herokuapp.com/rb/responders.svg)](http://badge.…
+[![Build Status](https://api.travis-ci.org/plataformatec/responders.svg?branch=maste…
+[![Code Climate](https://codeclimate.com/github/plataformatec/responders.svg)](http…
A set of responders modules to dry up your Rails 4.2+ app.
@@ -17,6 +17,10 @@
$ bundle install
$ rails g responders:install
+If you are including this gem to support backwards compatibilty for responders in previous releases of Rails, you only need to include the gem and bundle.
+
+ $ bundle install
+
## Responders Types
### FlashResponder
@@ -101,6 +105,22 @@
end
```
+**Dealing with namespaced routes**
+
+In order for the LocationResponder to find the correct route helper for namespaced routes you need to pass the namespaces to `respond_with`:
+
+```ruby
+class Api::V1::ThingsController < ApplicationController
+ respond_to :json
+
+ # POST /api/v1/things
+ def create
+ @thing = Thing.create(thing_params)
+ respond_with :api, :v1, @thing
+ end
+end
+```
+
## Configuring your own responder
Responders only provides a set of modules and to use them you have to create your own
@@ -109,7 +129,7 @@
```ruby
# lib/application_responder.rb
-class AppResponder < ActionController::Responder
+class ApplicationResponder < ActionController::Responder
include Responders::FlashResponder
include Responders::HttpCacheResponder
end
@@ -122,7 +142,7 @@
require "application_responder"
class ApplicationController < ActionController::Base
- self.responder = AppResponder
+ self.responder = ApplicationResponder
respond_to :html
end
```
@@ -168,13 +188,41 @@
config.app_generators.scaffold_controller :responders_controller
+#Failure handling
+
+Responders don't use `valid?` to check for errors in models to figure out if
+the request was successfull or not, and relies on your controllers to call
+`save` or `create` to trigger the validations.
+
+```ruby
+def create
+ @widget = Widget.new(widget_params)
+ # @widget will be a valid record for responders, as we haven't called `save`
+ # on it, and will always redirect to the `widgets_path`.
+ respond_with @widget, location: -> { widgets_path }
+end
+```
+
+Responders will check if the `errors` object in your model is empty or not. Take
+this in consideration when implementing different actions or writing test
+assertions on this behavior for your controllers.
+
+```ruby
+def create
+ @widget = Widget.new(widget_params)
+ @widget.errors.add(:base, :invalid)
+ # `respond_with` will render the `new` template again.
+ respond_with @widget
+end
+```
+
## Examples
Want more examples ? Check out this blog posts:
* [Embracing REST with mind, body and soul](http://blog.plataformatec.com.br/2009/08/embracing-rest-with-mind-body-and-soul/)
* [Three reasons to love ActionController::Responder](http://weblog.rubyonrails.org/2009/8/31/three-…
-* [My five favorite things about Rails 3](http://www.engineyard.com/blog/2009/my-five-favorite-things-about-rails-…
+* [My five favorite things about Rails 3](http://www.engineyard.com/blog/2009/my-five-favorite-things-about-rails-…
## Bugs and Feedback
@@ -182,4 +230,4 @@
http://github.com/plataformatec/responders/issues
-MIT License. Copyright 2009-2014 Plataforma Tecnologia. http://blog.plataformatec.com.br
+MIT License. Copyright 2009-2016 Plataformatec. http://plataformatec.com.br
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_controller/respond_with.rb new/lib/action_controller/respond_with.rb
--- old/lib/action_controller/respond_with.rb 2015-01-27 10:28:18.000000000 +0100
+++ new/lib/action_controller/respond_with.rb 2016-03-21 15:20:44.000000000 +0100
@@ -175,7 +175,9 @@
# Also, a hash passed to +respond_with+ immediately after the specified
# resource(s) is interpreted as a set of options relevant to all
# formats. Any option accepted by +render+ can be used, e.g.
+ #
# respond_with @people, status: 200
+ #
# However, note that these options are ignored after an unsuccessful attempt
# to save a resource, e.g. when automatically rendering <tt>:new</tt>
# after a post request.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/action_controller/responder.rb new/lib/action_controller/responder.rb
--- old/lib/action_controller/responder.rb 2015-01-27 10:28:18.000000000 +0100
+++ new/lib/action_controller/responder.rb 2016-03-21 15:20:44.000000000 +0100
@@ -182,10 +182,12 @@
# responds to :to_format and display it.
#
def to_format
- if get? || !has_errors? || response_overridden?
+ if !get? && has_errors? && !response_overridden?
+ display_errors
+ elsif has_view_rendering? || response_overridden?
default_render
else
- display_errors
+ api_behavior
end
rescue ActionView::MissingTemplate
api_behavior
@@ -233,7 +235,7 @@
if @default_response
@default_response.call(options)
else
- controller.default_render(options)
+ controller.render(options)
end
end
@@ -273,6 +275,10 @@
Renderers::RENDERERS.include?(format)
end
+ def has_view_rendering?
+ controller.class.include? ActionView::Rendering
+ end
+
# By default, render the <code>:edit</code> action for HTML requests with errors, unless
# the verb was POST.
#
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/generators/rails/templates/api_controller.rb new/lib/generators/rails/templates/api_controller.rb
--- old/lib/generators/rails/templates/api_controller.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/generators/rails/templates/api_controller.rb 2016-03-21 15:20:44.000000000 +0100
@@ -0,0 +1,51 @@
+<% if namespaced? -%>
+require_dependency "<%= namespaced_file_path %>/application_controller"
+
+<% end -%>
+<% module_namespacing do -%>
+class <%= controller_class_name %>Controller < ApplicationController
+ before_action :set_<%= singular_table_name %>, only: [:show, :update, :destroy]
+
+ respond_to :json
+
+<% unless options[:singleton] -%>
+ def index
+ @<%= plural_table_name %> = <%= orm_class.all(class_name) %>
+ respond_with(@<%= plural_table_name %>)
+ end
+<% end -%>
+
+ def show
+ respond_with(@<%= singular_table_name %>)
+ end
+
+ def create
+ @<%= singular_table_name %> = <%= orm_class.build(class_name, attributes_params) %>
+ <%= "flash[:notice] = '#{class_name} was successfully created.' if " if flash? %>@<%= orm_instance.save %>
+ respond_with(@<%= singular_table_name %>)
+ end
+
+ def update
+ <%= "flash[:notice] = '#{class_name} was successfully updated.' if " if flash? %>@<%= orm_instance.update(attributes_params) %>
+ respond_with(@<%= singular_table_name %>)
+ end
+
+ def destroy
+ @<%= orm_instance.destroy %>
+ respond_with(@<%= singular_table_name %>)
+ end
+
+ private
+ def set_<%= singular_table_name %>
+ @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
+ end
+
+ def <%= "#{singular_table_name}_params" %>
+ <%- if attributes_names.empty? -%>
+ params[:<%= singular_table_name %>]
+ <%- else -%>
+ params.require(:<%= singular_table_name %>).permit(<%= attributes_names.map { |name| ":#{name}" }.join(', ') %>)
+ <%- end -%>
+ end
+end
+<% end -%>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/responders/controller_method.rb new/lib/responders/controller_method.rb
--- old/lib/responders/controller_method.rb 2015-01-27 10:28:18.000000000 +0100
+++ new/lib/responders/controller_method.rb 2016-03-21 15:20:44.000000000 +0100
@@ -34,4 +34,6 @@
end
end
-ActionController::Base.extend Responders::ControllerMethod
+ActiveSupport.on_load(:action_controller) do
+ ActionController::Base.extend Responders::ControllerMethod
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/responders/version.rb new/lib/responders/version.rb
--- old/lib/responders/version.rb 2015-01-27 10:28:18.000000000 +0100
+++ new/lib/responders/version.rb 2016-03-21 15:20:44.000000000 +0100
@@ -1,3 +1,3 @@
module Responders
- VERSION = "2.1.0".freeze
+ VERSION = "2.1.2".freeze
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-01-27 10:28:18.000000000 +0100
+++ new/metadata 2016-03-21 15:20:44.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: responders
version: !ruby/object:Gem::Version
- version: 2.1.0
+ version: 2.1.2
platform: ruby
authors:
- José Valim
autorequire:
bindir: bin
cert_chain: []
-date: 2015-01-27 00:00:00.000000000 Z
+date: 2016-03-21 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: railties
@@ -19,7 +19,7 @@
version: 4.2.0
- - "<"
- !ruby/object:Gem::Version
- version: '5'
+ version: '5.1'
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@
version: 4.2.0
- - "<"
- !ruby/object:Gem::Version
- version: '5'
+ version: '5.1'
description: A set of Rails responders to dry up your application
email: contact(a)plataformatec.com.br
executables: []
@@ -43,6 +43,7 @@
- lib/action_controller/responder.rb
- lib/generators/rails/USAGE
- lib/generators/rails/responders_controller_generator.rb
+- lib/generators/rails/templates/api_controller.rb
- lib/generators/rails/templates/controller.rb
- lib/generators/responders/install_generator.rb
- lib/responders.rb
@@ -73,7 +74,7 @@
version: '0'
requirements: []
rubyforge_project: responders
-rubygems_version: 2.2.2
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: A set of Rails responders to dry up your application
1
0
Hello community,
here is the log from the commit of package python-veusz for openSUSE:Factory checked in at 2016-04-28 16:53:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-veusz (Old)
and /work/SRC/openSUSE:Factory/.python-veusz.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-veusz"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-veusz/python-veusz.changes 2015-06-23 12:01:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-veusz.new/python-veusz.changes 2016-04-28 16:56:35.000000000 +0200
@@ -1,0 +2,7 @@
+Sun Apr 3 20:24:02 UTC 2016 - badshah400(a)gmail.com
+
+- Add BuildRequires and Requires on python-h5py: enables the
+ hdf5 data import module in the application.
+- Run specfile through "spec-cleaner -m" for cleanup.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-veusz.spec ++++++
--- /var/tmp/diff_new_pack.BsNrTK/_old 2016-04-28 16:56:36.000000000 +0200
+++ /var/tmp/diff_new_pack.BsNrTK/_new 2016-04-28 16:56:36.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-veusz
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,8 @@
%define appname veusz
-
+%define X_display ":98"
+%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
Name: python-veusz
Version: 1.23.1
Release: 0
@@ -33,21 +34,21 @@
BuildRequires: hicolor-icon-theme
BuildRequires: libqt4-devel
BuildRequires: python-devel
+BuildRequires: python-h5py
BuildRequires: python-numpy-devel
BuildRequires: python-qt4-devel
BuildRequires: python-setuptools
BuildRequires: python-sip
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-server
-%define X_display ":98"
-%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
+Requires: python-h5py
Requires: python-numpy
Requires: python-qt4
-Recommends: %{appname}
-Requires(post): shared-mime-info
Requires(post): desktop-file-utils
-Requires(postun): shared-mime-info
+Requires(post): shared-mime-info
Requires(postun): desktop-file-utils
+Requires(postun): shared-mime-info
+Recommends: %{appname}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -104,7 +105,7 @@
%{buildroot}%{python_sitearch}/veusz/icons/$i ;
done
# symlink main veusz icon also into hicolor-icon-theme dir (for desktop file)
-install -m 0644 %{S:3} %{buildroot}%{_datadir}/pixmaps/%{appname}/veusz_256.png
+install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/%{appname}/veusz_256.png
for size in 16 32 48 64 128 256; do
odir=%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps
mkdir -p $odir
1
0
Hello community,
here is the log from the commit of package whois for openSUSE:Factory checked in at 2016-04-28 16:53:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/whois (Old)
and /work/SRC/openSUSE:Factory/.whois.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "whois"
Changes:
--------
--- /work/SRC/openSUSE:Factory/whois/whois.changes 2015-12-09 22:36:12.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.whois.new/whois.changes 2016-04-28 16:56:32.000000000 +0200
@@ -1,0 +2,13 @@
+Mon Apr 4 10:53:35 UTC 2016 - astieger(a)suse.com
+
+- whois 5.2.12:
+ * Added the .xn--e1a4c (ею, European Union) and .xn--mix891f (澳門,
+ Macao) TLD servers.
+ * Updated the .jobs, .kn and .pro TLD servers.
+ * Updated the .gi, .lc, .sc and .vc TLD servers, because the precedent
+ data caused the program to return an error status.
+ * Updated the list of new gTLDs.
+ * Fixed the code which queries whois.iana.org for TLDs to
+ recognize IDN TLDs too.
+
+-------------------------------------------------------------------
Old:
----
whois_5.2.11.tar.xz
New:
----
whois_5.2.12.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ whois.spec ++++++
--- /var/tmp/diff_new_pack.WSJWQF/_old 2016-04-28 16:56:34.000000000 +0200
+++ /var/tmp/diff_new_pack.WSJWQF/_new 2016-04-28 16:56:34.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package whois
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: whois
-Version: 5.2.11
+Version: 5.2.12
Release: 0
Summary: Intelligent WHOIS client
License: GPL-2.0+
++++++ whois-nobsdsource.patch ++++++
--- /var/tmp/diff_new_pack.WSJWQF/_old 2016-04-28 16:56:34.000000000 +0200
+++ /var/tmp/diff_new_pack.WSJWQF/_new 2016-04-28 16:56:34.000000000 +0200
@@ -1,17 +1,22 @@
---- whois-5.2.2.orig/mkpasswd.c
-+++ whois-5.2.2/mkpasswd.c
-@@ -17,9 +17,6 @@
+Index: whois-5.2.12/mkpasswd.c
+===================================================================
+--- whois-5.2.12.orig/mkpasswd.c
++++ whois-5.2.12/mkpasswd.c
+@@ -17,10 +17,7 @@
*/
/* for crypt, snprintf and strcasecmp */
-#define _XOPEN_SOURCE 500
-#define _BSD_SOURCE 1
+ #define _DEFAULT_SOURCE 1
-#define __EXTENSIONS__ 1
/* System library */
#include <stdio.h>
---- whois-5.2.2.orig/whois.c
-+++ whois-5.2.2/whois.c
+Index: whois-5.2.12/whois.c
+===================================================================
+--- whois-5.2.12.orig/whois.c
++++ whois-5.2.12/whois.c
@@ -7,9 +7,6 @@
* (at your option) any later version.
*/
@@ -22,8 +27,10 @@
/* System library */
#include <stdio.h>
#include <stdlib.h>
---- whois-5.2.2.orig/Makefile
-+++ whois-5.2.2/Makefile
+Index: whois-5.2.12/Makefile
+===================================================================
+--- whois-5.2.12.orig/Makefile
++++ whois-5.2.12/Makefile
@@ -53,7 +53,7 @@ endif
mkpasswd_LDADD += -lcrypt
endif
++++++ whois.asc ++++++
--- /var/tmp/diff_new_pack.WSJWQF/_old 2016-04-28 16:56:34.000000000 +0200
+++ /var/tmp/diff_new_pack.WSJWQF/_new 2016-04-28 16:56:34.000000000 +0200
@@ -5,32 +5,32 @@
Source: whois
Binary: whois
Architecture: any
-Version: 5.2.11
+Version: 5.2.12
Maintainer: Marco d'Itri <md(a)linux.it>
-Standards-Version: 3.9.6
+Standards-Version: 3.9.7
Vcs-Browser: https://github.com/rfc1036/whois
Vcs-Git: git://github.com/rfc1036/whois.git
Build-Depends: debhelper (>= 5), gettext, libidn11-dev
Package-List:
whois deb net standard arch=any
Checksums-Sha1:
- ce651f1ed2d500ddaa09f1bf8e98cb229d64c721 79112 whois_5.2.11.tar.xz
+ b74d5647f14e56bbe8ab945aee2be74781e2d683 80428 whois_5.2.12.tar.xz
Checksums-Sha256:
- 32f7d6be853aa6a6a8ac6dd672bd60ae4f10bc0bedcaa944363ffbef6e57cef7 79112 whois_5.2.11.tar.xz
+ b26d4027b8987d9911466aa06ce2c167a50017cd59a622a429bd506222f6cdf1 80428 whois_5.2.12.tar.xz
Files:
- df870615563b23e2270ffc4f039290a1 79112 whois_5.2.11.tar.xz
+ b8f1482827137788016a418cc1ae364b 80428 whois_5.2.12.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-iQGcBAEBAgAGBQJWZoGlAAoJECv1pcEixPekl+4L/0BujTvbjtHy5quJsdvT6Biv
-zAU7L13nizLuRGhC8uULsOKaI8h2cX/CYsFErGwXsTcX48fEGCnhhVzBQMaXYCBv
-4UhQ2WCJWl/bf+qLsGO0nvHdn/ZZdnkj+xIEe7YstoXsqAaAYRXrYj4Fxnn9Ne/M
-ROfe/RxgLFFcVBubCgDEjd1RMfRKZSBf0sNj4IxGPNFxJWf8XuIMLTEX92OlAerG
-j7Cc7BtfHimNfY5kRwTVS5JMhP6Uad22a+EqYjLUnCSwLAG9sIfuMo4MxvlhDVfB
-W9k9WHNDb//sJmHOAIAbZx6f0rteEwKDdsHNP8WmyEhuMosdg6HwquMVwiYgcANP
-XMPxyiRcZ35iJ8MYA/Fgk+NG1OnkfM4xvknDOpJaRhbNx5ubV3pCaV7RaHb6QyL+
-WybgpBi/a/bWp9jtypv8YXsUChiqFFT2bQjVFyF2xpMv0ppUpz6tBl/8bbXeKaJF
-2saH3WOfzLhPsaXwI+rbM2ebdxBsO6G5QmR/+SK42A==
-=9FbV
+iQGcBAEBAgAGBQJW+ffoAAoJECv1pcEixPek9CkMAIH5kV9vS3PJoSIpatgaZnud
+GiVqRLUS1uQ4GeGA1aAs1/vMTUAwdYR5Ftg/mxlEKNGDe1M64xBS3UOByFM1G+vc
+xY71npmQwB3lGMp+m++su2RbiZiex26q7DzqtaPJ766gydqaIQTwaYVSJNmFSmRL
++UVsR7ywUPpHFYkhKB70QgWmB87lkkfPKo4GFkAxvAASsiR+Ppnydz+h5SS0mpBI
+WI4z1JtkjHpKwjeI76wNUZIS01/7a+9xYp16HBOzdDi1VCncsGnz7i8cbWcwbpAc
+06PjkhqI5cZb1btiHantFcotE9gzlWMZcvwGSmH06+I/zCzfuT4WT1F79DxBXl5c
+eK+cXdL/WfF9TZA8kQu14OfZ9F0IjAppB7BkypFgrQC3WiuX16JselDGfIPa3tW8
+hgajr6XcVAn2NgclAgYciv+ygl7I2HWz25D8wOuKWVEW7+meAjKYBeXszRijMviM
+Q3nMsJxruKb5ncqdNoL0eA57E0fn04sl+5rbnXe8Eg==
+=c2i+
-----END PGP SIGNATURE-----
++++++ whois_5.2.11.tar.xz -> whois_5.2.12.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/Makefile new/whois-5.2.12/Makefile
--- old/whois-5.2.11/Makefile 2015-12-08 06:50:18.000000000 +0100
+++ new/whois-5.2.12/Makefile 2016-03-28 18:27:22.000000000 +0200
@@ -97,6 +97,19 @@
$(PERL) make_servers_charset.pl < $< > $@
##############################################################################
+afl:
+ $(MAKE) whois \
+ CC=afl-gcc AFL_HARDEN=1 \
+ HAVE_LIBIDN=1 HAVE_ICONV=1 DEFS=-DAFL_MODE=1
+
+afl2:
+ $(MAKE) whois \
+ HAVE_LIBIDN=1 HAVE_ICONV=1 DEFS=-DAFL_MODE=1
+
+afl-run:
+ nice afl-fuzz -i ../afl_in -o ../afl_out -- ./whois
+
+##############################################################################
install: install-whois install-mkpasswd install-pos
install-whois: whois
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/debian/changelog new/whois-5.2.12/debian/changelog
--- old/whois-5.2.11/debian/changelog 2015-12-08 07:48:51.000000000 +0100
+++ new/whois-5.2.12/debian/changelog 2016-03-29 05:34:14.000000000 +0200
@@ -1,3 +1,17 @@
+whois (5.2.12) unstable; urgency=medium
+
+ * Implemented support for fuzzing with the awesome american fuzzy lop.
+ * Added the .xn--e1a4c (ею, European Union) and .xn--mix891f (澳門,
+ Macao) TLD servers.
+ * Updated the .jobs, .kn and .pro TLD servers.
+ * Updated the .gi, .lc, .sc and .vc TLD servers, because the precedent
+ data caused the program to return an error status.
+ * Updated the list of new gTLDs.
+ * Fixed the code which queries whois.iana.org for TLDs to recognize IDN
+ TLDs too.
+
+ -- Marco d'Itri <md(a)linux.it> Tue, 29 Mar 2016 05:33:10 +0200
+
whois (5.2.11) unstable; urgency=medium
* Fixed the --select-types and --sources long options.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/debian/control new/whois-5.2.12/debian/control
--- old/whois-5.2.11/debian/control 2015-01-09 03:49:00.000000000 +0100
+++ new/whois-5.2.12/debian/control 2016-03-29 05:34:28.000000000 +0200
@@ -2,7 +2,7 @@
Section: net
Priority: standard
Maintainer: Marco d'Itri <md(a)linux.it>
-Standards-Version: 3.9.6
+Standards-Version: 3.9.7
Build-Depends: debhelper (>= 5), gettext, libidn11-dev
Vcs-Git: git://github.com/rfc1036/whois.git
Vcs-Browser: https://github.com/rfc1036/whois
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/ip_del_recovered.h new/whois-5.2.12/ip_del_recovered.h
--- old/whois-5.2.11/ip_del_recovered.h 2015-04-24 15:58:32.000000000 +0200
+++ new/whois-5.2.12/ip_del_recovered.h 2016-03-28 18:21:50.000000000 +0200
@@ -2,11 +2,16 @@
{ 736886784UL, 737411071UL, "whois.apnic.net" },
{ 737476608UL, 738000895UL, "whois.apnic.net" },
{ 738066432UL, 738197503UL, "whois.apnic.net" },
+{ 755105792UL, 755236863UL, "whois.arin.net" },
{ 755236864UL, 755499007UL, "whois.lacnic.net" },
{ 755499008UL, 756023295UL, "whois.ripe.net" },
{ 756023296UL, 757071871UL, "whois.arin.net" },
{ 757071872UL, 759169023UL, "whois.arin.net" },
{ 759169024UL, 759238655UL, "whois.apnic.net" },
+{ 759238656UL, 759250943UL, "whois.apnic.net" },
+{ 759250944UL, 759267327UL, "whois.ripe.net" },
+{ 759267328UL, 759300095UL, "whois.lacnic.net" },
+{ 759300096UL, 759431167UL, "whois.ripe.net" },
{ 759431168UL, 759693311UL, "whois.lacnic.net" },
{ 759693312UL, 760217599UL, "whois.arin.net" },
{ 760217600UL, 761266175UL, "whois.ripe.net" },
@@ -15,15 +20,56 @@
{ 763363328UL, 765460479UL, "whois.ripe.net" },
{ 765460480UL, 767557631UL, "whois.lacnic.net" },
{ 767557632UL, 769589247UL, "whois.afrinic.net" },
+{ 769589248UL, 769654783UL, "whois.arin.net" },
{ 769654784UL, 770703359UL, "whois.lacnic.net" },
{ 770703360UL, 771227647UL, "whois.afrinic.net" },
{ 771227648UL, 771751935UL, "whois.apnic.net" },
+{ 1123778560UL, 1123794943UL, "whois.afrinic.net" },
+{ 1210847232UL, 1210851327UL, "whois.lacnic.net" },
+{ 2160656384UL, 2160721919UL, "whois.lacnic.net" },
+{ 2210660352UL, 2210725887UL, "whois.lacnic.net" },
+{ 2302345216UL, 2302410751UL, "whois.apnic.net" },
+{ 2332360704UL, 2332426239UL, "whois.apnic.net" },
+{ 2333736960UL, 2333802495UL, "whois.afrinic.net" },
+{ 2333868032UL, 2333933567UL, "whois.ripe.net" },
+{ 2419064832UL, 2419130367UL, "whois.apnic.net" },
+{ 2426929152UL, 2426994687UL, "whois.arin.net" },
+{ 2462326784UL, 2462351359UL, "whois.apnic.net" },
+{ 2462351360UL, 2462384127UL, "whois.afrinic.net" },
+{ 2471362560UL, 2471428095UL, "whois.ripe.net" },
+{ 2516058112UL, 2516123647UL, "whois.arin.net" },
{ 2523594752UL, 2523660287UL, "whois.apnic.net" },
{ 2525036544UL, 2525102079UL, "whois.apnic.net" },
{ 2532442112UL, 2532507647UL, "whois.apnic.net" },
+{ 2555969536UL, 2556035071UL, "whois.ripe.net" },
{ 2584739840UL, 2584805375UL, "whois.afrinic.net" },
+{ 2641821696UL, 2641887231UL, "whois.apnic.net" },
+{ 2685652992UL, 2685657087UL, "whois.apnic.net" },
+{ 2685665280UL, 2685669375UL, "whois.apnic.net" },
+{ 2685677568UL, 2685681663UL, "whois.apnic.net" },
+{ 2685685760UL, 2685689855UL, "whois.lacnic.net" },
+{ 2685706240UL, 2685718527UL, "whois.lacnic.net" },
+{ 2697601024UL, 2697609215UL, "whois.apnic.net" },
+{ 2697609216UL, 2697625599UL, "whois.arin.net" },
+{ 2697625600UL, 2697658367UL, "whois.apnic.net" },
+{ 2699968512UL, 2699976703UL, "whois.apnic.net" },
+{ 2699984896UL, 2700017663UL, "whois.lacnic.net" },
+{ 2709192704UL, 2709258239UL, "whois.afrinic.net" },
{ 2737767424UL, 2737771263UL, "whois.apnic.net" },
{ 2737771520UL, 2737772031UL, "whois.apnic.net" },
{ 2737774592UL, 2737778175UL, "whois.apnic.net" },
{ 2737778432UL, 2737831935UL, "whois.apnic.net" },
{ 2738159616UL, 2738225151UL, "whois.apnic.net" },
+{ 2761949184UL, 2762014719UL, "whois.afrinic.net" },
+{ 2762145792UL, 2762211327UL, "whois.lacnic.net" },
+{ 3230404608UL, 3230433279UL, "whois.lacnic.net" },
+{ 3230433280UL, 3230466047UL, "whois.apnic.net" },
+{ 3230466048UL, 3230531583UL, "whois.lacnic.net" },
+{ 3230531584UL, 3230662655UL, "whois.afrinic.net" },
+{ 3230662656UL, 3230679039UL, "whois.ripe.net" },
+{ 3230687232UL, 3230695423UL, "whois.lacnic.net" },
+{ 3230695424UL, 3230728191UL, "whois.arin.net" },
+{ 3230728192UL, 3230760959UL, "whois.ripe.net" },
+{ 3230760960UL, 3230777343UL, "whois.afrinic.net" },
+{ 3230777344UL, 3230785535UL, "whois.lacnic.net" },
+{ 3513483264UL, 3513499647UL, "whois.arin.net" },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/mkpasswd.c new/whois-5.2.12/mkpasswd.c
--- old/whois-5.2.11/mkpasswd.c 2015-04-24 15:58:32.000000000 +0200
+++ new/whois-5.2.12/mkpasswd.c 2016-03-29 02:49:03.000000000 +0200
@@ -19,6 +19,7 @@
/* for crypt, snprintf and strcasecmp */
#define _XOPEN_SOURCE 500
#define _BSD_SOURCE 1
+#define _DEFAULT_SOURCE 1
#define __EXTENSIONS__ 1
/* System library */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/new_gtlds_list new/whois-5.2.12/new_gtlds_list
--- old/whois-5.2.11/new_gtlds_list 2015-12-08 07:43:23.000000000 +0100
+++ new/whois-5.2.12/new_gtlds_list 2016-03-29 04:40:12.000000000 +0200
@@ -16,6 +16,7 @@
aco
active
actor
+adac
ads
adult
aeg
@@ -24,10 +25,14 @@
aig
airforce
airtel
+alibaba
+alipay
allfinanz
+ally
alsace
amica
amsterdam
+analytics
android
apartments
app
@@ -45,19 +50,24 @@
author
auto
autos
+avianca
+aws
axa
azure
+baidu
band
bank
bar
barcelona
barclaycard
barclays
+barefoot
bargains
bauhaus
bayern
bbc
bbva
+bcg
bcn
beats
beer
@@ -87,6 +97,7 @@
boo
book
boots
+bosch
bostik
bot
boutique
@@ -136,6 +147,7 @@
cfd
chanel
channel
+chase
chat
cheap
chloe
@@ -152,6 +164,7 @@
cleaning
click
clinic
+clinique
clothing
cloud
club
@@ -164,16 +177,19 @@
commbank
community
company
+compare
computer
comsec
condos
construction
consulting
+contact
contractors
cooking
cool
corsica
country
+coupon
coupons
courses
credit
@@ -195,10 +211,12 @@
datsun
day
dclk
+dealer
deals
degree
delivery
dell
+deloitte
delta
democrat
dental
@@ -220,10 +238,12 @@
doosan
download
drive
+dubai
durban
dvag
earth
eat
+edeka
education
email
emerck
@@ -244,6 +264,7 @@
expert
exposed
express
+extraspace
fage
fail
fairwinds
@@ -266,6 +287,7 @@
fishing
fit
fitness
+flickr
flights
florist
flowers
@@ -273,18 +295,24 @@
fly
foo
football
+ford
forex
forsale
forum
foundation
+fox
+fresenius
frl
frogans
+frontier
fund
furniture
futbol
fyi
gal
gallery
+gallo
+gallup
game
garden
gbiz
@@ -302,6 +330,7 @@
global
globo
gmail
+gmbh
gmo
gmx
gold
@@ -326,8 +355,11 @@
hamburg
hangout
haus
+hdfcbank
+health
healthcare
help
+helsinki
here
hermes
hiphop
@@ -367,6 +399,7 @@
investments
ipiranga
irish
+iselect
ist
istanbul
itau
@@ -378,13 +411,19 @@
jewelry
jlc
jll
+jmp
joburg
jot
joy
+jpmorgan
jprs
juegos
kaufen
kddi
+kerryhotels
+kerrylogistics
+kerryproperties
+kfh
kia
kim
kinder
@@ -392,14 +431,18 @@
kiwi
koeln
komatsu
+kpn
krd
kred
+kuokgroup
kyoto
lacaixa
lamborghini
+lamer
lancaster
land
landrover
+lanxess
lasalle
lat
latrobe
@@ -414,17 +457,21 @@
liaison
lidl
life
+lifeinsurance
lifestyle
lighting
like
limited
limo
+lincoln
linde
link
live
+living
lixil
loan
loans
+locus
lol
london
lotte
@@ -438,6 +485,7 @@
madrid
maif
maison
+makeup
man
management
mango
@@ -459,6 +507,7 @@
microsoft
mini
mma
+mobily
moda
moe
moi
@@ -479,6 +528,7 @@
mutuelle
nadex
nagoya
+natura
navy
nec
netbank
@@ -490,6 +540,7 @@
ngo
nhk
nico
+nikon
ninja
nissan
nokia
@@ -511,15 +562,19 @@
oracle
orange
organic
+origins
osaka
otsuka
ovh
page
+pamperedchef
panerai
paris
+pars
partners
parts
party
+passagens
pet
pharmacy
philips
@@ -531,6 +586,7 @@
pics
pictet
pictures
+pid
pin
ping
pink
@@ -548,12 +604,15 @@
prod
productions
prof
+promo
properties
property
protection
pub
+pwc
qpon
quebec
+quest
racing
read
realtor
@@ -561,6 +620,7 @@
recipes
red
redstone
+redumbrella
rehab
reise
reisen
@@ -575,6 +635,7 @@
restaurant
review
reviews
+rexroth
rich
ricoh
rio
@@ -590,6 +651,7 @@
ryukyu
saarland
safe
+safety
sakura
sale
salon
@@ -600,10 +662,12 @@
sap
sapo
sarl
+sas
saxo
sbs
sca
scb
+schaeffler
schmidt
scholarships
school
@@ -615,6 +679,7 @@
seat
security
seek
+select
sener
services
seven
@@ -623,6 +688,8 @@
sexy
sfr
sharp
+shaw
+shell
shia
shiksha
shoes
@@ -631,28 +698,37 @@
singles
site
ski
+skin
sky
skype
smile
sncf
soccer
social
+softbank
software
sohu
solar
solutions
+song
sony
soy
space
spiegel
+spot
spreadbetting
srl
stada
+star
starhub
+statefarm
statoil
stc
stcgroup
stockholm
+storage
+store
+stream
studio
study
style
@@ -670,6 +746,8 @@
systems
tab
taipei
+talk
+taobao
tatamotors
tatar
tattoo
@@ -679,6 +757,7 @@
team
tech
technology
+telecity
telefonica
temasek
tennis
@@ -687,15 +766,18 @@
theatre
tickets
tienda
+tiffany
tips
tires
tirol
+tmall
today
tokyo
tools
top
toray
toshiba
+total
tours
town
toyota
@@ -704,9 +786,16 @@
trading
training
travelers
+travelersinsurance
trust
+trv
+tube
tui
+tunes
+tushu
+tvs
ubs
+unicom
university
uno
uol
@@ -719,6 +808,7 @@
vet
viajes
video
+viking
villas
vin
vip
@@ -729,15 +819,22 @@
viva
vlaanderen
vodka
+volkswagen
vote
voting
voto
voyage
+vuelos
wales
walter
wang
+wanggou
watch
+watches
+weather
+weatherchannel
webcam
+weber
website
wed
wedding
@@ -750,6 +847,7 @@
windows
wine
wme
+wolterskluwer
work
works
world
@@ -759,6 +857,7 @@
xerox
xin
xn--11b4c3d
+xn--1ck2e1b
xn--1qqw23a
xn--30rr7y
xn--3bst00m
@@ -774,43 +873,58 @@
xn--80adxhks
xn--80asehdb
xn--80aswg
+xn--8y0a063a
xn--9dbq2a
xn--9et52u
xn--b4w605ferd
+xn--bck1b9a5dre4c
xn--c1avg
xn--c2br7g
+xn--cck2b3b
xn--cg4bki
xn--czr694b
xn--czrs0t
xn--czru2d
xn--d1acj3b
+xn--eckvdtc9d
xn--efvy88h
xn--estv75g
+xn--fct429k
xn--fhbei
xn--fiq228c5hs
xn--fiq64b
xn--fjq720a
xn--flw351e
+xn--g2xx48c
+xn--gckr3f0f
xn--hxt814e
xn--i1b6b1a6a2e
xn--imr513n
xn--io0a7i
xn--j1aef
+xn--jlq61u9w7b
+xn--jvr189m
xn--kcrx77d1x4a
+xn--kpu716f
xn--kput3i
xn--mgba3a3ejt
xn--mgbab2bd
+xn--mgbb9fbpob
+xn--mgbt3dhd
xn--mk1bu44c
xn--mxtq1m
xn--ngbc5azd
+xn--ngbe9e0a
xn--nqv7f
xn--nqv7fs00ema
xn--nyqy26a
xn--p1acf
+xn--pbt977c
xn--pssy2u
xn--q9jyb4c
xn--qcka1pmc
xn--rhqv96g
+xn--rovu88b
xn--ses554g
xn--t60b56a
xn--tckwe
@@ -819,16 +933,19 @@
xn--vermgensberatung-pwb
xn--vhquv
xn--vuq861b
+xn--w4r85el8fhu5dnra
xn--xhq521b
xn--zfr164b
xperia
xyz
yachts
+yahoo
yamaxun
yandex
yodobashi
yoga
yokohama
+you
youtube
zara
zero
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/tld_serv_list new/whois-5.2.12/tld_serv_list
--- old/whois-5.2.11/tld_serv_list 2015-12-08 07:43:23.000000000 +0100
+++ new/whois-5.2.12/tld_serv_list 2016-03-29 04:51:23.000000000 +0200
@@ -49,15 +49,15 @@
.aero whois.aero
.asia whois.nic.asia
.biz whois.biz
-.cat whois.cat
+.cat whois.nic.cat
.coop whois.nic.coop
.info whois.afilias.net
-.jobs VERISIGN jobswhois.verisign-grs.com
+.jobs whois.nic.jobs
.mobi whois.dotmobiregistry.net
.museum whois.museum
.name whois.nic.name
.post whois.dotpostregistry.net
-.pro whois.dotproregistry.net
+.pro whois.afilias.net
.tel whois.nic.tel
.travel whois.nic.travel
.xxx whois.nic.xxx
@@ -150,7 +150,7 @@
.gf WEB https://www.dom-enic.com/whois.html
.gg whois.gg
.gh WEB http://www.nic.gh/customer/search_c.htm
-.gi AFILIAS
+.gi whois2.afilias-grs.net
.gl whois.nic.gl
.gm WEB http://www.nic.gm/htmlpages/whois.htm
.gn NONE # http://www.psg.com/dns/gn/
@@ -187,7 +187,7 @@
.kh NONE # http://www.trc.gov.kh/index.php/en/newsCategory/view?id=42&detail_id=68
.ki whois.nic.ki
.km NONE # www.domaine.km
-.kn WEB http://www.nic.kn/
+.kn whois.nic.kn
.kp NONE # NIC? http://www.star.co.kp/
.kr whois.kr
.kw WEB http://www.kw/
@@ -195,7 +195,7 @@
.kz whois.nic.kz
.la whois.nic.la
.lb WEB http://www.aub.edu.lb/lbdr/
-.lc AFILIAS
+.lc whois2.afilias-grs.net
.li whois.nic.li
.lk whois.nic.lk
.lr NONE # http://www.psg.com/dns/lr/
@@ -215,7 +215,7 @@
.ml whois.dot.ml # www.point.ml
.mm NONE # www.nic.mm
.mn whois.nic.mn
-.mo WEB http://www.monic.net.mo/ # whois.monic.mo is restricted
+.mo WEB http://www.monic.mo/ # whois.monic.mo is restricted
.mp NONE # get.mp
.mq WEB https://www.dom-enic.com/whois.html
.mr NONE # www.nic.mr
@@ -266,7 +266,7 @@
.rw whois.ricta.org.rw # http://www.ricta.org.rw/
.sa whois.nic.net.sa
.sb whois.nic.sb
-.sc AFILIAS # www.nic.sc
+.sc whois2.afilias-grs.net # www.nic.sc
.sd NONE # http://isoc.sd/sis/index.php/sd-domain
.se whois.iis.se
.sg whois.sgnic.sg
@@ -326,7 +326,7 @@
.uy whois.nic.org.uy
.uz whois.cctld.uz
.va NONE
-.vc AFILIAS
+.vc whois2.afilias-grs.net
.ve whois.nic.ve
.vg whois.nic.vg
.vi WEB https://secure.nic.vi/whois-lookup/
@@ -356,6 +356,7 @@
.xn--90ais whois.cctld.by # Belarus
.xn--clchc0ea0b2g2a9gcd whois.sgnic.sg # Singapore, Tamil
.xn--d1alf whois.marnet.mk # Macedonia
+.xn--e1a4c whois.eu # European Union, Cyrillic AW
.xn--fiqs8s cwhois.cnnic.cn # China, Simplified Chinese
.xn--fiqz9s cwhois.cnnic.cn # China, Traditional Chinese
.xn--fpcrj9c3d whois.inregistry.net # India, Telugu AW
@@ -368,6 +369,7 @@
.xn--kpry57d whois.twnic.net.tw # Taiwan, Traditional Chinese
.xn--l1acc NONE # Mongolia
.xn--lgbbat1ad8j whois.nic.dz # Algeria
+.xn--mix891f WEB http://www.monic.mo/ # Macao
.xn--mgb9awbf whois.registry.om # Oman
.xn--mgba3a4f16a whois.nic.ir # Iran
.xn--mgbaam7a8h whois.aeda.net.ae # United Arab Emirates
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/utils.h new/whois-5.2.12/utils.h
--- old/whois-5.2.11/utils.h 2013-03-30 02:31:38.000000000 +0100
+++ new/whois-5.2.12/utils.h 2016-03-28 18:01:31.000000000 +0200
@@ -9,6 +9,10 @@
#define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__)
+#ifndef AFL_MODE
+# define AFL_MODE 0
+#endif
+
/* Portability macros */
#ifdef __GNUC__
# define NORETURN __attribute__((noreturn))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/version.h new/whois-5.2.12/version.h
--- old/whois-5.2.11/version.h 2015-07-30 03:28:28.000000000 +0200
+++ new/whois-5.2.12/version.h 2016-03-29 05:26:20.000000000 +0200
@@ -1 +1 @@
-#define VERSION "5.2.10"
+#define VERSION "5.2.12"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/whois-5.2.11/whois.c new/whois-5.2.12/whois.c
--- old/whois-5.2.11/whois.c 2015-12-08 06:50:18.000000000 +0100
+++ new/whois-5.2.12/whois.c 2016-03-29 05:25:40.000000000 +0200
@@ -140,6 +140,20 @@
fstring = malloc(fstringlen + 1);
*fstring = '\0';
+ /* interface for American Fuzzy Lop */
+ if (AFL_MODE) {
+ FILE *fp = fdopen(0, "r");
+ char *buf = NULL;
+ size_t len = 0;
+
+ /* read one line from stdin */
+ if (getline(&buf, &len, fp) < 0)
+ err_sys("getline");
+ fflush(fp);
+ /* and use it as command line arguments */
+ argv = merge_args(buf, argv, &argc);
+ }
+
/* prepend options from environment */
argv = merge_args(getenv("WHOIS_OPTIONS"), argv, &argc);
@@ -497,8 +511,7 @@
if (strchr(s, '@'))
return strdup("\x05");
- /* no dot and no hyphen means it's a NSI NIC handle or ASN (?) */
- if (!strpbrk(s, ".-")) {
+ if (!strpbrk(s, ".")) {
/* if it is a TLD or a new gTLD then ask IANA */
for (i = 0; tld_serv[i]; i += 2)
if (strcaseeq(s, tld_serv[i]))
@@ -507,7 +520,10 @@
for (i = 0; new_gtlds[i]; i++)
if (strcaseeq(s, new_gtlds[i]))
return strdup("whois.iana.org");
+ }
+ /* no dot and no hyphen means it's a NSI NIC handle or ASN (?) */
+ if (!strpbrk(s, ".-")) {
if (strncaseeq(s, "as", 2) && /* it's an AS */
(isasciidigit(s[2]) || s[2] == ' '))
return strdup(whereas(atol(s + 2)));
@@ -907,6 +923,13 @@
struct sockaddr_in saddr;
#endif
+ /*
+ * When using American Fuzzy Lop get the data from it using stdin
+ * instead of connecting to the actual whois server.
+ */
+ if (AFL_MODE)
+ return (dup(0));
+
alarm(60);
#ifdef HAVE_GETADDRINFO
1
0
Hello community,
here is the log from the commit of package paraview for openSUSE:Factory checked in at 2016-04-28 16:53:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/paraview (Old)
and /work/SRC/openSUSE:Factory/.paraview.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "paraview"
Changes:
--------
--- /work/SRC/openSUSE:Factory/paraview/paraview.changes 2016-01-12 16:13:56.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.paraview.new/paraview.changes 2016-04-28 16:56:30.000000000 +0200
@@ -1,0 +2,20 @@
+Wed Mar 30 08:40:36 UTC 2016 - foss(a)grueninger.de
+
+- update to version 5.0.1
+ + Trace recorder fails for CTH data
+ + improvements to cinema
+ + Move Show Axis functionality into Edit Axes Grid
+ + hover points on is deathly slow remote server
+ + CGNS reader not available in non-MPI windows binaries
+ + update pvospray
+ + Keyboard shortcut Alt+A is assigned twice
+ + Rubber band selection is broken
+ + List of changes at
+ http://www.paraview.org/Bug/changelog_page.php?version_id=126
+
+-------------------------------------------------------------------
+Tue Mar 15 20:35:24 UTC 2016 - dvaleev(a)suse.com
+
+- Add disk constraint 8GB
+
+-------------------------------------------------------------------
Old:
----
ParaView-v5.0.0-source.tar.gz
New:
----
ParaView-v5.0.1-source.tar.gz
_constraints
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ paraview.spec ++++++
--- /var/tmp/diff_new_pack.Fahk2H/_old 2016-04-28 16:56:32.000000000 +0200
+++ /var/tmp/diff_new_pack.Fahk2H/_new 2016-04-28 16:56:32.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package paraview
#
-# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%define major_ver 5.0
Name: paraview
-Version: 5.0.0
+Version: 5.0.1
Release: 0
Summary: Data analysis and visualization application
License: BSD-3-Clause
++++++ ParaView-v5.0.0-source.tar.gz -> ParaView-v5.0.1-source.tar.gz ++++++
/work/SRC/openSUSE:Factory/paraview/ParaView-v5.0.0-source.tar.gz /work/SRC/openSUSE:Factory/.paraview.new/ParaView-v5.0.1-source.tar.gz differ: char 5, line 1
++++++ _constraints ++++++
<constraints>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
</hardware>
</constraints>
1
0
Hello community,
here is the log from the commit of package VFlib3 for openSUSE:Factory checked in at 2016-04-28 16:53:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/VFlib3 (Old)
and /work/SRC/openSUSE:Factory/.VFlib3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "VFlib3"
Changes:
--------
--- /work/SRC/openSUSE:Factory/VFlib3/VFlib3.changes 2013-09-13 14:45:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.VFlib3.new/VFlib3.changes 2016-04-28 16:56:27.000000000 +0200
@@ -1,0 +2,5 @@
+Sat Mar 26 05:41:26 UTC 2016 - i(a)marguerite.su
+
+- clean specfile
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ VFlib3.spec ++++++
--- /var/tmp/diff_new_pack.Un67Gl/_old 2016-04-28 16:56:28.000000000 +0200
+++ /var/tmp/diff_new_pack.Un67Gl/_new 2016-04-28 16:56:28.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package VFlib3
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,12 @@
Name: VFlib3
-BuildRequires: fdupes
-BuildRequires: freetype-devel
-BuildRequires: texlive-bin-devel
-BuildRequires: texlive-devel
-BuildRequires: xorg-x11
-BuildRequires: xorg-x11-devel
-PreReq: %install_info_prereq
Version: 3.6.14
Release: 0
+Summary: Versatile Font Library
+License: LGPL-2.1+
+Group: System/Libraries
+#Summary(ja): "Versatile" フォントライブラリ
Url: http://www-masu.ist.osaka-u.ac.jp/~kakugawa/VFlib/
Source0: http://www-masu.ist.osaka-u.ac.jp/~kakugawa/download/TypeHack/VFlib3-3.6.14…
Source1: vflibcap-tex
@@ -33,11 +30,15 @@
Patch3: VFlib3-info-dir.patch
Patch4: VFlib3-include.patch
Patch5: comparison-is-always-false-due-to-limited-range-of-data-type.patch
+BuildRequires: fdupes
+BuildRequires: freetype-devel
+BuildRequires: texlive-bin-devel
+BuildRequires: texlive-devel
+BuildRequires: xorg-x11
+BuildRequires: xorg-x11-devel
+Requires(post): info
+Requires(postun): info
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Summary: Versatile Font Library
-License: LGPL-2.1+
-Group: System/Libraries
-Summary(ja): "Versatile" フォントライブラリ
# %description -l ja
#
# VFlib は C 言語で書かれたフォントライブラリで、指定したフォン
@@ -80,36 +81,34 @@
%prep
%setup -q
-%patch1 -p0
+%patch1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
rm -f config.cache
-export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
-./configure --prefix=/usr \
+export CFLAGS="%{optflags} -D_GNU_SOURCE"
+./configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-kpathsea \
- --with-kpathsea-libdir=/usr/%{_lib} \
+ --with-kpathsea-libdir=%{_libdir} \
--with-freetype \
- --with-freetype-includedir=/usr/include/freetype \
- --with-freetype-libdir=/usr/%{_lib} \
- --with-texmf-root=/usr/share/texmf \
+ --with-freetype-includedir=%{_includedir}/freetype \
+ --with-freetype-libdir=%{_libdir} \
+ --with-texmf-root=%{_datadir}/texmf \
%{_target_cpu}-suse-linux-gnu
make %{?_smp_mflags}
-# --with-kpathsea-includedir=/usr/include \
-# --with-t1lib-includedir=/usr/include \
%install
-make prefix=$RPM_BUILD_ROOT/usr \
- infodir=$RPM_BUILD_ROOT%{_infodir} \
- mandir=$RPM_BUILD_ROOT%{_mandir} \
- libdir=$RPM_BUILD_ROOT%{_libdir} \
+make prefix=%{buildroot}%{_prefix} \
+ infodir=%{buildroot}%{_infodir} \
+ mandir=%{buildroot}%{_mandir} \
+ libdir=%{buildroot}%{_libdir} \
install
-install -m 644 $RPM_SOURCE_DIR/vflibcap-tex $RPM_BUILD_ROOT/usr/share/VFlib/%{version}/
+install -m 644 $RPM_SOURCE_DIR/vflibcap-tex %{buildroot}%{_datadir}/VFlib/%{version}/
%fdupes %{buildroot}
@@ -130,26 +129,26 @@
%files
%defattr(-, root, root)
%doc ANNOUNCE* CHANGES COPYING* DISTRIB*
-%doc %{_infodir}/VFlib*info*
-%dir /usr/share/VFlib
-%dir /usr/share/VFlib/site
-%dir /usr/share/VFlib/%{version}
-%dir /usr/share/VFlib/%{version}/doc/
-%doc /usr/share/VFlib/%{version}/doc/*
-%dir /usr/share/VFlib/%{version}/t1lib/
-/usr/share/VFlib/%{version}/t1lib/*
-%dir /usr/share/VFlib/%{version}/ccv/
-/usr/share/VFlib/%{version}/ccv/*
-%dir /usr/share/VFlib/%{version}/ascii-jtex/
-/usr/share/VFlib/%{version}/ascii-jtex/*
-/usr/share/VFlib/%{version}/vflibcap*
-/usr/bin/*
+%{_infodir}/VFlib*info*
+%dir %{_datadir}/VFlib
+%dir %{_datadir}/VFlib/site
+%dir %{_datadir}/VFlib/%{version}
+%dir %{_datadir}/VFlib/%{version}/doc/
+%doc %{_datadir}/VFlib/%{version}/doc/*
+%dir %{_datadir}/VFlib/%{version}/t1lib/
+%{_datadir}/VFlib/%{version}/t1lib/*
+%dir %{_datadir}/VFlib/%{version}/ccv/
+%{_datadir}/VFlib/%{version}/ccv/*
+%dir %{_datadir}/VFlib/%{version}/ascii-jtex/
+%{_datadir}/VFlib/%{version}/ascii-jtex/*
+%{_datadir}/VFlib/%{version}/vflibcap*
+%{_bindir}/*
%{_libdir}/libVFlib3.so.*
%files -n VFlib3-devel
%defattr(-, root, root)
%{_libdir}/libVFlib3.so
%{_libdir}/libVFlib3.la
-/usr/include/*
+%{_includedir}/*
%changelog
1
0
Hello community,
here is the log from the commit of package rubygem-test-unit for openSUSE:Factory checked in at 2016-04-28 16:53:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-test-unit (Old)
and /work/SRC/openSUSE:Factory/.rubygem-test-unit.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-test-unit"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-test-unit/rubygem-test-unit.changes 2015-10-14 16:44:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-test-unit.new/rubygem-test-unit.changes 2016-04-28 16:56:23.000000000 +0200
@@ -1,0 +2,75 @@
+Sun Mar 20 05:32:38 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.1.8
+ see installed news.md
+
+ ## 3.1.8 - 2016-03-19 {#version-3-1-8}
+
+ ### Improvements
+
+ * Added `--stop-on-failure` command line option. With this option,
+ running test suite is stopped immediately when one test is failed
+ or an error is raised in one test.
+
+-------------------------------------------------------------------
+Mon Jan 18 06:04:03 UTC 2016 - coolo(a)suse.com
+
+- updated to version 3.1.7
+ see installed news.md
+
+ ## 3.1.7 - 2016-01-17 {#version-3-1-7}
+
+ ### Fixes
+
+ * Added a missing require.
+
+ ## 3.1.6 - 2016-01-17 {#version-3-1-6}
+
+ It's a Ruby on Rails integration improvement release.
+
+ ### Improvements
+
+ * Filtered backtrace of power\_assert.
+ [GitHub#114]
+ * Improved performance to retrieve test defined location.
+ * Improved performance to run fixtures in a test.
+ * Supported running a test by `yield` in `setup`:
+
+ Before:
+
+ def setup
+ @file = File.open("x")
+ end
+
+ def teardown
+ @file.close
+ end
+
+ After:
+
+ def setup
+ File.open("x") do |file|
+ @file = file
+ yield
+ end
+ end
+
+ * Added `--default-test-path` option that specifies the default path
+ that has tests.
+ * Made auto runner registration more lazily. Auto runner isn't
+ registered automatically until user defines a test. In the
+ previous releases, auto runner is registered automatically when
+ user defines a test case.
+ * Supported specifying a test by location in command line. For
+ example, the following command line runs a test that is defined in
+ /tmp/test_a.rb at line 10:
+
+ % ruby -r test-unit -e run_test /tmp/test_a.rb:10
+
+ ### Fixes
+
+ * Fixed a bug that test isn't ran. The test has the same name as
+ data driven test that is defined in parent test case.
+ [GitHub#115]
+
+-------------------------------------------------------------------
Old:
----
test-unit-3.1.5.gem
New:
----
test-unit-3.1.8.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-test-unit.spec ++++++
--- /var/tmp/diff_new_pack.CdN6lm/_old 2016-04-28 16:56:24.000000000 +0200
+++ /var/tmp/diff_new_pack.CdN6lm/_new 2016-04-28 16:56:24.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-test-unit
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-test-unit
-Version: 3.1.5
+Version: 3.1.8
Release: 0
%define mod_name test-unit
%define mod_full_name %{mod_name}-%{version}
++++++ test-unit-3.1.5.gem -> test-unit-3.1.8.gem ++++++
Files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/doc/text/news.md new/doc/text/news.md
--- old/doc/text/news.md 2015-10-09 16:35:53.000000000 +0200
+++ new/doc/text/news.md 2016-03-19 15:20:52.000000000 +0100
@@ -1,5 +1,68 @@
# News
+## 3.1.8 - 2016-03-19 {#version-3-1-8}
+
+### Improvements
+
+ * Added `--stop-on-failure` command line option. With this option,
+ running test suite is stopped immediately when one test is failed
+ or an error is raised in one test.
+
+## 3.1.7 - 2016-01-17 {#version-3-1-7}
+
+### Fixes
+
+ * Added a missing require.
+
+## 3.1.6 - 2016-01-17 {#version-3-1-6}
+
+It's a Ruby on Rails integration improvement release.
+
+### Improvements
+
+ * Filtered backtrace of power\_assert.
+ [GitHub#114]
+ * Improved performance to retrieve test defined location.
+ * Improved performance to run fixtures in a test.
+ * Supported running a test by `yield` in `setup`:
+
+ Before:
+
+ def setup
+ @file = File.open("x")
+ end
+
+ def teardown
+ @file.close
+ end
+
+ After:
+
+ def setup
+ File.open("x") do |file|
+ @file = file
+ yield
+ end
+ end
+
+ * Added `--default-test-path` option that specifies the default path
+ that has tests.
+ * Made auto runner registration more lazily. Auto runner isn't
+ registered automatically until user defines a test. In the
+ previous releases, auto runner is registered automatically when
+ user defines a test case.
+ * Supported specifying a test by location in command line. For
+ example, the following command line runs a test that is defined in
+ /tmp/test_a.rb at line 10:
+
+ % ruby -r test-unit -e run_test /tmp/test_a.rb:10
+
+### Fixes
+
+ * Fixed a bug that test isn't ran. The test has the same name as
+ data driven test that is defined in parent test case.
+ [GitHub#115]
+
## 3.1.5 - 2015-10-09 {#version-3-1-5}
It's a Rack integration improvement release.
@@ -7,8 +70,8 @@
### Improvements
* Renamed experimental top-level `run` method to `run_test` method
- because `run` is conflicted with Rack.
- [GitHub#32][GitHub:basecamp/pow#303] [Reported by Yevhen Viktorov]
+ because `run` is conflicted with Rack.
+ [GitHub#32][GitHub:basecamp/pow#303] [Reported by Yevhen Viktorov]
### Thanks
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/assertions.rb new/lib/test/unit/assertions.rb
--- old/lib/test/unit/assertions.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/assertions.rb 2016-03-19 15:20:52.000000000 +0100
@@ -635,7 +635,6 @@
raise
end
end
- nil
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/attribute.rb new/lib/test/unit/attribute.rb
--- old/lib/test/unit/attribute.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/attribute.rb 2016-03-19 15:20:52.000000000 +0100
@@ -111,7 +111,10 @@
attributes || StringifyKeyHash.new
end
- def find_attribute(method_name, name)
+ def find_attribute(method_name, name, options={})
+ recursive_p = options[:recursive]
+ recursive_p = true if recursive_p.nil?
+
@attributes_table ||= StringifyKeyHash.new
if @attributes_table.key?(method_name)
attributes = @attributes_table[method_name]
@@ -120,6 +123,7 @@
end
end
+ return nil unless recursive_p
return nil if self == TestCase
@cached_parent_test_case ||= ancestors.find do |ancestor|
@@ -128,7 +132,7 @@
ancestor < Test::Unit::Attribute
end
- @cached_parent_test_case.find_attribute(method_name, name)
+ @cached_parent_test_case.find_attribute(method_name, name, options)
end
@@attribute_observers = StringifyKeyHash.new
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/auto-runner-loader.rb new/lib/test/unit/auto-runner-loader.rb
--- old/lib/test/unit/auto-runner-loader.rb 1970-01-01 01:00:00.000000000 +0100
+++ new/lib/test/unit/auto-runner-loader.rb 2016-03-19 15:20:52.000000000 +0100
@@ -0,0 +1,17 @@
+require "test/unit/test-suite-creator"
+
+module Test
+ module Unit
+ module AutoRunnerLoader
+ @loaded = false
+ class << self
+ def check(test_case, method_name)
+ return if @loaded
+ return unless TestSuiteCreator.test_method?(test_case, method_name)
+ require "test/unit"
+ @loaded = true
+ end
+ end
+ end
+ end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/autorunner.rb new/lib/test/unit/autorunner.rb
--- old/lib/test/unit/autorunner.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/autorunner.rb 2016-03-19 15:20:52.000000000 +0100
@@ -1,7 +1,10 @@
-require 'test/unit/color-scheme'
-require 'test/unit/priority'
-require 'test/unit/attribute-matcher'
-require 'optparse'
+require "English"
+
+require "test/unit/color-scheme"
+require "test/unit/priority"
+require "test/unit/attribute-matcher"
+require "test/unit/testcase"
+require "optparse"
module Test
module Unit
@@ -78,14 +81,14 @@
end
register_collector(:descendant) do |auto_runner|
- require 'test/unit/collector/descendant'
+ require "test/unit/collector/descendant"
collector = Collector::Descendant.new
collector.filter = auto_runner.filters
- collector.collect($0.sub(/\.rb\Z/, ''))
+ collector.collect($0.sub(/\.rb\Z/, ""))
end
register_collector(:load) do |auto_runner|
- require 'test/unit/collector/load'
+ require "test/unit/collector/load"
collector = Collector::Load.new
unless auto_runner.pattern.empty?
collector.patterns.replace(auto_runner.pattern)
@@ -94,13 +97,14 @@
collector.excludes.replace(auto_runner.exclude)
end
collector.base = auto_runner.base
+ collector.default_test_paths = auto_runner.default_test_paths
collector.filter = auto_runner.filters
collector.collect(*auto_runner.to_run)
end
# JUST TEST!
# register_collector(:xml) do |auto_runner|
- # require 'test/unit/collector/xml'
+ # require "test/unit/collector/xml"
# collector = Collector::XML.new
# collector.filter = auto_runner.filters
# collector.collect(auto_runner.to_run[0])
@@ -108,15 +112,15 @@
# deprecated
register_collector(:object_space) do |auto_runner|
- require 'test/unit/collector/objectspace'
+ require "test/unit/collector/objectspace"
c = Collector::ObjectSpace.new
c.filter = auto_runner.filters
- c.collect($0.sub(/\.rb\Z/, ''))
+ c.collect($0.sub(/\.rb\Z/, ""))
end
# deprecated
register_collector(:dir) do |auto_runner|
- require 'test/unit/collector/dir'
+ require "test/unit/collector/dir"
c = Collector::Dir.new
c.filter = auto_runner.filters
unless auto_runner.pattern.empty?
@@ -127,12 +131,15 @@
end
c.base = auto_runner.base
$:.push(auto_runner.base) if auto_runner.base
- c.collect(*(auto_runner.to_run.empty? ? ['.'] : auto_runner.to_run))
+ c.collect(*(auto_runner.to_run.empty? ? ["."] : auto_runner.to_run))
end
attr_reader :suite, :runner_options
- attr_accessor :filters, :to_run, :pattern, :exclude, :base, :workdir
+ attr_accessor :filters, :to_run
+ attr_accessor :default_test_paths
+ attr_accessor :pattern, :exclude, :base, :workdir
attr_accessor :color_scheme, :listeners
+ attr_writer :stop_on_failuere
attr_writer :runner, :collector
def initialize(standalone)
@@ -141,11 +148,13 @@
@collector = default_collector
@filters = []
@to_run = []
+ @default_test_paths = []
@color_scheme = ColorScheme.default
@runner_options = {}
@default_arguments = []
@workdir = nil
@listeners = []
+ @stop_on_failure = false
config_file = "test-unit.yml"
if File.exist?(config_file)
load_config(config_file)
@@ -155,6 +164,10 @@
yield(self) if block_given?
end
+ def stop_on_failure?
+ @stop_on_failure
+ end
+
def prepare
PREPARE_HOOKS.each do |handler|
handler.call(self)
@@ -164,7 +177,7 @@
def process_args(args=ARGV)
begin
args.unshift(*@default_arguments)
- options.order!(args) {|arg| @to_run << arg}
+ options.order!(args) {|arg| add_test_path(arg)}
rescue OptionParser::ParseError => e
puts e
puts options
@@ -178,47 +191,56 @@
o.banner = "Test::Unit automatic runner."
o.banner << "\nUsage: #{$0} [options] [-- untouched arguments]"
- o.on('-r', '--runner=RUNNER', RUNNERS,
+ o.on("-r", "--runner=RUNNER", RUNNERS,
"Use the given RUNNER.",
"(" + keyword_display(RUNNERS) + ")") do |r|
@runner = r
end
- o.on('--collector=COLLECTOR', COLLECTORS,
+ o.on("--collector=COLLECTOR", COLLECTORS,
"Use the given COLLECTOR.",
"(" + keyword_display(COLLECTORS) + ")") do |collector|
@collector = collector
end
if (@standalone)
- o.on('-b', '--basedir=DIR', "Base directory of test suites.") do |b|
+ o.on("-b", "--basedir=DIR", "Base directory of test suites.") do |b|
@base = b
end
- o.on('-w', '--workdir=DIR', "Working directory to run tests.") do |w|
+ o.on("-w", "--workdir=DIR", "Working directory to run tests.") do |w|
@workdir = w
end
- o.on('-a', '--add=TORUN', Array,
+ o.on("--default-test-path=PATH",
+ "Add PATH to the default test paths.",
+ "The PATH is used when user doesn't specify any test path.",
+ "You can specify this option multiple times.") do |path|
+ @default_test_paths << path
+ end
+
+ o.on("-a", "--add=TORUN", Array,
"Add TORUN to the list of things to run;",
- "can be a file or a directory.") do |a|
- @to_run.concat(a)
+ "can be a file or a directory.") do |paths|
+ paths.each do |path|
+ add_test_path(path)
+ end
end
@pattern = []
- o.on('-p', '--pattern=PATTERN', Regexp,
+ o.on("-p", "--pattern=PATTERN", Regexp,
"Match files to collect against PATTERN.") do |e|
@pattern << e
end
@exclude = []
- o.on('-x', '--exclude=PATTERN', Regexp,
+ o.on("-x", "--exclude=PATTERN", Regexp,
"Ignore files to collect against PATTERN.") do |e|
@exclude << e
end
end
- o.on('-n', '--name=NAME', String,
+ o.on("-n", "--name=NAME", String,
"Runs tests matching NAME.",
"Use '/PATTERN/' for NAME to use regular expression.") do |name|
name = (%r{\A/(.*)/\Z} =~ name ? Regexp.new($1) : name)
@@ -232,7 +254,7 @@
end
end
- o.on('--ignore-name=NAME', String,
+ o.on("--ignore-name=NAME", String,
"Ignores tests matching NAME.",
"Use '/PATTERN/' for NAME to use regular expression.") do |n|
n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
@@ -244,7 +266,7 @@
end
end
- o.on('-t', '--testcase=TESTCASE', String,
+ o.on("-t", "--testcase=TESTCASE", String,
"Runs tests in TestCases matching TESTCASE.",
"Use '/PATTERN/' for TESTCASE to use regular expression.") do |n|
n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
@@ -253,7 +275,7 @@
end
end
- o.on('--ignore-testcase=TESTCASE', String,
+ o.on("--ignore-testcase=TESTCASE", String,
"Ignores tests in TestCases matching TESTCASE.",
"Use '/PATTERN/' for TESTCASE to use regular expression.") do |n|
n = (%r{\A/(.*)/\Z} =~ n ? Regexp.new($1) : n)
@@ -262,7 +284,7 @@
end
end
- o.on('--location=LOCATION', String,
+ o.on("--location=LOCATION", String,
"Runs tests that defined in LOCATION.",
"LOCATION is one of PATH:LINE, PATH or LINE") do |location|
if /\A\d+\z/ =~ location
@@ -272,14 +294,10 @@
path, line, = location.split(/:(\d+)/, 2)
line = line.to_i unless line.nil?
end
- @filters << lambda do |test|
- test.class.test_defined?(:path => path,
- :line => line,
- :method_name => test.method_name)
- end
+ add_location_filter(path, line)
end
- o.on('--attribute=EXPRESSION', String,
+ o.on("--attribute=EXPRESSION", String,
"Runs tests that matches EXPRESSION.",
"EXPRESSION is evaluated as Ruby's expression.",
"Test attribute name can be used with no receiver in EXPRESSION.",
@@ -317,7 +335,7 @@
Priority.default = priority
end
- o.on('-I', "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]",
+ o.on("-I", "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]",
"Appends directory list to $LOAD_PATH.") do |dirs|
$LOAD_PATH.concat(dirs.split(File::PATH_SEPARATOR))
end
@@ -349,27 +367,33 @@
assertion_message_class.max_diff_target_string_size = size
end
+ o.on("--[no-]stop-on-failure",
+ "Stops immediately on the first non success test",
+ "(#{@stop_on_failure})") do |boolean|
+ @stop_on_failure = boolean
+ end
+
ADDITIONAL_OPTIONS.each do |option_builder|
option_builder.call(self, o)
end
- o.on('--',
+ o.on("--",
"Stop processing options so that the",
"remaining options will be passed to the",
"test."){o.terminate}
- o.on('-h', '--help', 'Display this help.'){puts o; exit}
+ o.on("-h", "--help", "Display this help."){puts o; exit}
o.on_tail
- o.on_tail('Deprecated options:')
+ o.on_tail("Deprecated options:")
- o.on_tail('--console', 'Console runner (use --runner).') do
+ o.on_tail("--console", "Console runner (use --runner).") do
warn("Deprecated option (--console).")
@runner = self.class.runner(:console)
end
if RUNNERS[:fox]
- o.on_tail('--fox', 'Fox runner (use --runner).') do
+ o.on_tail("--fox", "Fox runner (use --runner).") do
warn("Deprecated option (--fox).")
@runner = self.class.runner(:fox)
end
@@ -407,13 +431,16 @@
@runner_options[:color_scheme] ||= @color_scheme
@runner_options[:listeners] ||= []
@runner_options[:listeners].concat(@listeners)
+ if @stop_on_failure
+ @runner_options[:listeners] << StopOnFailureListener.new
+ end
change_work_directory do
runner.run(suite, @runner_options).passed?
end
end
def load_config(file)
- require 'yaml'
+ require "yaml"
config = YAML.load(File.read(file))
runner_name = config["runner"]
@runner = self.class.runner(runner_name) || @runner
@@ -475,10 +502,35 @@
end
false
end
+
+ def add_test_path(path)
+ if /:(\d+)\z/ =~ path
+ line = $1.to_i
+ path = $PREMATCH
+ add_location_filter(path, line)
+ end
+ @to_run << path
+ end
+
+ def add_location_filter(path, line)
+ @filters << lambda do |test|
+ test.class.test_defined?(:path => path,
+ :line => line,
+ :method_name => test.method_name)
+ end
+ end
+
+ class StopOnFailureListener
+ def attach_to_mediator(mediator)
+ mediator.add_listener(TestResult::FINISHED) do |result|
+ result.stop unless result.passed?
+ end
+ end
+ end
end
end
end
-require 'test/unit/runner/console'
-require 'test/unit/runner/emacs'
-require 'test/unit/runner/xml'
+require "test/unit/runner/console"
+require "test/unit/runner/emacs"
+require "test/unit/runner/xml"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/collector/load.rb new/lib/test/unit/collector/load.rb
--- old/lib/test/unit/collector/load.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/collector/load.rb 2016-03-19 15:20:52.000000000 +0100
@@ -10,6 +10,7 @@
include Collector
attr_reader :patterns, :excludes, :base
+ attr_reader :default_test_paths
def initialize
super
@@ -18,6 +19,7 @@
@patterns = [/\Atest[_\-].+\.rb\z/m, /[_\-]test\.rb\z/]
@excludes = []
@base = nil
+ @default_test_paths = []
@require_failed_infos = []
end
@@ -26,8 +28,15 @@
@base = base
end
+ def default_test_paths=(paths)
+ @default_test_paths = paths.collect do |path|
+ Pathname(path)
+ end
+ end
+
def collect(*froms)
add_load_path(@base) do
+ froms = @default_test_paths if froms.empty?
froms = ["."] if froms.empty?
test_suites = []
already_gathered = find_test_cases
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/fixture.rb new/lib/test/unit/fixture.rb
--- old/lib/test/unit/fixture.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/fixture.rb 2016-03-19 15:20:52.000000000 +0100
@@ -24,9 +24,11 @@
attr_reader :teardown
def initialize(test_case)
@test_case = test_case
- @setup = HookPoint.new(:after => :append)
- @cleanup = HookPoint.new(:before => :prepend)
- @teardown = HookPoint.new(:before => :prepend)
+ @setup = HookPoint.new(@test_case, :setup, :after => :append)
+ @cleanup = HookPoint.new(@test_case, :cleanup, :before => :prepend)
+ @teardown = HookPoint.new(@test_case, :teardown, :before => :prepend)
+ @cached_before_callbacks = {}
+ @cached_after_callbacks = {}
end
def [](type)
@@ -41,6 +43,19 @@
end
def before_callbacks(type)
+ @cached_before_callbacks[type] ||= collect_before_callbacks(type)
+ end
+
+ def after_callbacks(type)
+ @cached_after_callbacks[type] ||= collect_after_callbacks(type)
+ end
+
+ private
+ def target_test_cases
+ @cached_target_test_cases ||= collect_target_test_cases
+ end
+
+ def collect_before_callbacks(type)
prepend_callbacks = []
append_callbacks = []
target_test_cases.each do |ancestor|
@@ -51,7 +66,7 @@
merge_callbacks(prepend_callbacks, append_callbacks)
end
- def after_callbacks(type)
+ def collect_after_callbacks(type)
prepend_callbacks = []
append_callbacks = []
target_test_cases.each do |ancestor|
@@ -62,11 +77,6 @@
merge_callbacks(prepend_callbacks, append_callbacks)
end
- private
- def target_test_cases
- @cached_target_test_cases ||= collect_target_test_cases
- end
-
def collect_target_test_cases
ancestors = @test_case.ancestors
base_index = ancestors.index(::Test::Unit::Fixture)
@@ -89,7 +99,9 @@
end
class HookPoint
- def initialize(default_options)
+ def initialize(test_case, type, default_options)
+ @test_case = test_case
+ @type = type
@default_options = default_options
@before_prepend_callbacks = []
@before_append_callbacks = []
@@ -112,11 +124,24 @@
end
before_how = options[:before]
after_how = options[:after]
- add_callback(method_name_or_callback, before_how, after_how)
+ if method_name_or_callback.respond_to?(:call)
+ callback = method_name_or_callback
+ method_name = callback_method_name(callback)
+ @test_case.__send__(:define_method, method_name, &callback)
+ else
+ method_name = method_name_or_callback
+ end
+ add_callback(method_name, before_how, after_how)
end
def unregister(method_name_or_callback)
- @unregistered_callbacks << method_name_or_callback
+ if method_name_or_callback.respond_to?(:call)
+ callback = method_name_or_callback
+ method_name = callback_method_name(callback)
+ else
+ method_name = method_name_or_callback
+ end
+ @unregistered_callbacks << method_name
end
def before_prepend_callbacks
@@ -145,6 +170,10 @@
[:prepend, :append].include?(options[key])
end
+ def callback_method_name(callback)
+ "#{(a)type}_#{callback.object_id}"
+ end
+
def add_callback(method_name_or_callback, before_how, after_how)
case before_how
when :prepend
@@ -208,38 +237,50 @@
end
private
- def run_fixture(type, options={})
- [
+ def run_fixture(type, options={}, &block)
+ fixtures = [
self.class.fixture.before_callbacks(type),
type,
self.class.fixture.after_callbacks(type),
- ].flatten.each do |method_name_or_callback|
- run_fixture_callback(method_name_or_callback, options)
+ ].flatten
+ if block
+ runner = create_fixtures_runner(fixtures, options, &block)
+ runner.call
+ else
+ fixtures.each do |method_name|
+ run_fixture_callback(method_name, options)
+ end
end
end
- def run_fixture_callback(method_name_or_callback, options)
- if method_name_or_callback.respond_to?(:call)
- callback = lambda do
- instance_eval(&method_name_or_callback)
- end
+ def create_fixtures_runner(fixtures, options, &block)
+ if fixtures.empty?
+ block
else
- return unless respond_to?(method_name_or_callback, true)
- callback = lambda do
- __send__(method_name_or_callback)
+ last_fixture = fixtures.pop
+ create_fixtures_runner(fixtures, options) do
+ block_is_called = false
+ run_fixture_callback(last_fixture, options) do
+ block_is_called = true
+ block.call
+ end
+ block.call unless block_is_called
end
end
+ end
+ def run_fixture_callback(method_name, options, &block)
+ return unless respond_to?(method_name, true)
begin
- callback.call
+ __send__(method_name, &block)
rescue Exception
raise unless options[:handle_exception]
raise unless handle_exception($!)
end
end
- def run_setup
- run_fixture(:setup)
+ def run_setup(&block)
+ run_fixture(:setup, &block)
end
def run_cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/test-suite-creator.rb new/lib/test/unit/test-suite-creator.rb
--- old/lib/test/unit/test-suite-creator.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/test-suite-creator.rb 2016-03-19 15:20:52.000000000 +0100
@@ -8,6 +8,13 @@
module Test
module Unit
class TestSuiteCreator # :nodoc:
+ class << self
+ def test_method?(test_case, method_name)
+ /\Atest./ =~ method_name.to_s or
+ test_case.find_attribute(method_name, :test)
+ end
+ end
+
def initialize(test_case)
@test_case = test_case
end
@@ -15,7 +22,8 @@
def create
suite = TestSuite.new((a)test_case.name, @test_case)
collect_test_names.each do |test_name|
- data_sets = @test_case.find_attribute(test_name, :data)
+ data_sets = @test_case.find_attribute(test_name, :data,
+ :recursive => false)
if data_sets
data_sets.each do |data_set|
data_set = data_set.call if data_set.respond_to?(:call)
@@ -47,8 +55,7 @@
methods |= @test_case.public_instance_methods(false)
method_names = methods.collect(&:to_s)
test_names = method_names.find_all do |method_name|
- /\Atest./ =~ method_name or
- @test_case.find_attribute(method_name, :test)
+ self.class.test_method?(@test_case, method_name)
end
__send__("sort_test_names_in_#{(a)test_case.test_order}_order", test_names)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/testcase.rb new/lib/test/unit/testcase.rb
--- old/lib/test/unit/testcase.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/testcase.rb 2016-03-19 15:20:52.000000000 +0100
@@ -20,6 +20,7 @@
require 'test/unit/testsuite'
require 'test/unit/test-suite-creator'
require 'test/unit/assertion-failed-error'
+require 'test/unit/auto-runner-loader'
require 'test/unit/util/backtracefilter'
require 'test/unit/util/output'
require 'test/unit/util/method-owner-finder'
@@ -104,7 +105,6 @@
class << self
def inherited(sub_class) # :nodoc:
- require "test/unit"
DESCENDANTS << sub_class
super
end
@@ -120,7 +120,12 @@
source_location = find_attribute(stringified_name, :source_location)
if source_location
path, line = source_location
+ elsif respond_to?(:caller_locations, true)
+ location = caller_locations(1, 1)[0]
+ path = location.absolute_path || location.path
+ line = location.lineno
else
+ # TODO: Remove me when Ruby 1.9 support is dropped
path, line, = caller[0].split(/:(\d+)/, 2)
line = line.to_i if line
end
@@ -130,6 +135,7 @@
:line => line,
}
added_method_names[stringified_name] = true
+ AutoRunnerLoader.check(self, stringified_name)
end
def added_method_names # :nodoc:
@@ -281,6 +287,9 @@
else
targets = test_description_or_targets
attribute(:test, true, {}, *targets)
+ targets.each do |target|
+ AutoRunnerLoader.check(self, target)
+ end
end
end
@@ -453,14 +462,31 @@
@internal_data.test_started
yield(STARTED, name)
yield(STARTED_OBJECT, self)
+ processed_exception_in_setup = false
begin
- run_setup
- run_test
- run_cleanup
- add_pass
+ catch do |tag|
+ run_setup do
+ begin
+ run_test
+ run_cleanup
+ add_pass
+ rescue Exception
+ @internal_data.interrupted
+ unless handle_exception($!)
+ processed_exception_in_setup = true
+ raise
+ end
+ throw(tag)
+ end
+ end
+ end
rescue Exception
- @internal_data.interrupted
- raise unless handle_exception($!)
+ if processed_exception_in_setup
+ raise
+ else
+ @internal_data.interrupted
+ raise unless handle_exception($!)
+ end
ensure
begin
run_teardown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/testresult.rb new/lib/test/unit/testresult.rb
--- old/lib/test/unit/testresult.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/testresult.rb 2016-03-19 15:20:52.000000000 +0100
@@ -38,12 +38,15 @@
attr_reader :run_count, :pass_count, :assertion_count, :faults
+ attr_accessor :stop_tag
+
# Constructs a new, empty TestResult.
def initialize
@run_count, @pass_count, @assertion_count = 0, 0, 0
@summary_generators = []
@problem_checkers = []
@faults = []
+ @stop_tag = nil
initialize_containers
end
@@ -92,6 +95,10 @@
end
end
+ def stop
+ throw @stop_tag
+ end
+
def to_s
summary
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/ui/testrunnermediator.rb new/lib/test/unit/ui/testrunnermediator.rb
--- old/lib/test/unit/ui/testrunnermediator.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/ui/testrunnermediator.rb 2016-03-19 15:20:52.000000000 +0100
@@ -4,7 +4,6 @@
# Copyright:: Copyright (c) 2000-2002 Nathaniel Talbott. All rights reserved.
# License:: Ruby license.
-require 'test/unit'
require 'test/unit/util/observable'
require 'test/unit/testresult'
@@ -18,9 +17,9 @@
RESET = name + "::RESET"
STARTED = name + "::STARTED"
FINISHED = name + "::FINISHED"
-
+
include Util::Observable
-
+
# Creates a new TestRunnerMediator initialized to run
# the passed suite.
def initialize(suite)
@@ -37,11 +36,14 @@
Test::Unit.run_at_start_hooks
start_time = Time.now
begin
- with_listener(result) do
- notify_listeners(RESET, @suite.size)
- notify_listeners(STARTED, result)
+ catch do |stop_tag|
+ result.stop_tag = stop_tag
+ with_listener(result) do
+ notify_listeners(RESET, @suite.size)
+ notify_listeners(STARTED, result)
- run_suite(result)
+ run_suite(result)
+ end
end
ensure
elapsed_time = Time.now - start_time
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/util/backtracefilter.rb new/lib/test/unit/util/backtracefilter.rb
--- old/lib/test/unit/util/backtracefilter.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/util/backtracefilter.rb 2016-03-19 15:20:52.000000000 +0100
@@ -1,3 +1,8 @@
+begin
+ require 'power_assert'
+rescue LoadError, SyntaxError
+end
+
module Test
module Unit
module Util
@@ -6,21 +11,28 @@
TESTUNIT_PREFIX = __FILE__.split(TESTUNIT_FILE_SEPARATORS)[0..-3]
TESTUNIT_RB_FILE = /\.rb\Z/
+ POWERASSERT_PREFIX =
+ defined?(PowerAssert) ?
+ PowerAssert.method(:start).source_location[0].split(TESTUNIT_FILE_SEPARATORS)[0..-2] :
+ nil
+
module_function
def filter_backtrace(backtrace, prefix=nil)
return ["No backtrace"] unless backtrace
return backtrace if ENV["TEST_UNIT_ALL_BACKTRACE"]
if prefix
- split_prefix = prefix.split(TESTUNIT_FILE_SEPARATORS)
+ split_prefixes = [prefix.split(TESTUNIT_FILE_SEPARATORS)]
else
- split_prefix = TESTUNIT_PREFIX
+ split_prefixes = [TESTUNIT_PREFIX, POWERASSERT_PREFIX].compact
end
test_unit_internal_p = lambda do |entry|
components = entry.split(TESTUNIT_FILE_SEPARATORS)
- split_entry = components[0, split_prefix.size]
- next false unless split_entry[0..-2] == split_prefix[0..-2]
- split_entry[-1].sub(TESTUNIT_RB_FILE, '') == split_prefix[-1]
+ split_prefixes.any? do |split_prefix|
+ split_entry = components[0, split_prefix.size]
+ next false unless split_entry[0..-2] == split_prefix[0..-2]
+ split_entry[-1].sub(TESTUNIT_RB_FILE, '') == split_prefix[-1]
+ end
end
in_user_code = false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/test/unit/version.rb new/lib/test/unit/version.rb
--- old/lib/test/unit/version.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/lib/test/unit/version.rb 2016-03-19 15:20:52.000000000 +0100
@@ -1,5 +1,5 @@
module Test
module Unit
- VERSION = '3.1.5'
+ VERSION = '3.1.8'
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2015-10-09 16:35:53.000000000 +0200
+++ new/metadata 2016-03-19 15:20:52.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: test-unit
version: !ruby/object:Gem::Version
- version: 3.1.5
+ version: 3.1.8
platform: ruby
authors:
- Kouhei Sutou
@@ -9,7 +9,7 @@
autorequire:
bindir: bin
cert_chain: []
-date: 2015-10-09 00:00:00.000000000 Z
+date: 2016-03-19 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: power_assert
@@ -121,6 +121,7 @@
- lib/test/unit/assertions.rb
- lib/test/unit/attribute-matcher.rb
- lib/test/unit/attribute.rb
+- lib/test/unit/auto-runner-loader.rb
- lib/test/unit/autorunner.rb
- lib/test/unit/code-snippet-fetcher.rb
- lib/test/unit/collector.rb
@@ -228,49 +229,49 @@
version: '0'
requirements: []
rubyforge_project:
-rubygems_version: 2.2.2
+rubygems_version: 2.5.1
signing_key:
specification_version: 4
summary: An xUnit family unit testing framework for Ruby.
test_files:
-- test/test-assertions.rb
-- test/test-color.rb
- test/test-code-snippet.rb
+- test/test-fault-location-detector.rb
+- test/test-attribute.rb
+- test/test-priority.rb
+- test/test-color-scheme.rb
+- test/test-failure.rb
+- test/test-color.rb
+- test/ui/test_testrunmediator.rb
+- test/test-attribute-matcher.rb
+- test/test-test-suite.rb
- test/test-test-suite-creator.rb
+- test/test-diff.rb
+- test/test-emacs-runner.rb
+- test/test-data.rb
+- test/fixtures/header.csv
+- test/fixtures/header.tsv
+- test/fixtures/no-header.tsv
+- test/fixtures/plus.csv
+- test/fixtures/no-header.csv
+- test/fixtures/header-label.tsv
+- test/fixtures/header-label.csv
+- test/test-assertions.rb
- test/test-test-result.rb
+- test/testunit-test-util.rb
+- test/collector/test-load.rb
+- test/collector/test_dir.rb
+- test/collector/test_objectspace.rb
+- test/collector/test-descendant.rb
- test/test-error.rb
-- test/test-failure.rb
- test/run-test.rb
- test/test-pending.rb
-- test/test-color-scheme.rb
-- test/test-attribute-matcher.rb
-- test/testunit-test-util.rb
-- test/test-data.rb
-- test/ui/test_testrunmediator.rb
-- test/util/test-method-owner-finder.rb
+- test/test-fixture.rb
- test/util/test-output.rb
+- test/util/test-method-owner-finder.rb
- test/util/test_observable.rb
-- test/util/test_backtracefilter.rb
- test/util/test_procwrapper.rb
+- test/util/test_backtracefilter.rb
+- test/test-notification.rb
- test/test-omission.rb
- test/test-test-case.rb
-- test/test-fixture.rb
-- test/fixtures/no-header.csv
-- test/fixtures/header-label.tsv
-- test/fixtures/plus.csv
-- test/fixtures/no-header.tsv
-- test/fixtures/header-label.csv
-- test/fixtures/header.csv
-- test/fixtures/header.tsv
-- test/collector/test-descendant.rb
-- test/collector/test_objectspace.rb
-- test/collector/test-load.rb
-- test/collector/test_dir.rb
-- test/test-priority.rb
-- test/test-test-suite.rb
-- test/test-diff.rb
-- test/test-emacs-runner.rb
-- test/test-attribute.rb
-- test/test-fault-location-detector.rb
-- test/test-notification.rb
has_rdoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-assertions.rb new/test/test-assertions.rb
--- old/test/test-assertions.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/test/test-assertions.rb 2016-03-19 15:20:52.000000000 +0100
@@ -68,7 +68,10 @@
"Incorrect expected message type in assert_nothing_failed")
end
else
- if return_value_expected
+ case return_value_expected
+ when :dont_care
+ # do nothing
+ when true
check(!return_value.nil?, "Should return a value")
else
check(return_value.nil?,
@@ -812,22 +815,22 @@
end
def test_assert_nothing_raised
- check_nothing_fails {
+ check_nothing_fails(:dont_care) {
assert_nothing_raised {
1 + 1
}
}
- check_nothing_fails {
+ check_nothing_fails(:dont_care) {
assert_nothing_raised("successful assert_nothing_raised") {
1 + 1
}
}
- check_nothing_fails {
+ check_nothing_fails(:dont_care) {
assert_nothing_raised("successful assert_nothing_raised") {
1 + 1
}
}
- check_nothing_fails {
+ check_nothing_fails(:dont_care) {
begin
assert_nothing_raised(RuntimeError, StandardError, Comparable, "successful assert_nothing_raised") {
raise ZeroDivisionError.new("ArgumentError")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-data.rb new/test/test-data.rb
--- old/test/test-data.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/test/test-data.rb 2016-03-19 15:20:52.000000000 +0100
@@ -75,6 +75,21 @@
@calc.plus(data["augend"], data["addend"]))
end
end
+
+ class TestSuperclass < TestCalc
+ data("positive positive" => {:expected => 4, :augend => 3, :addend => 1},
+ "positive negative" => {:expected => -1, :augend => 1, :addend => -2})
+ def test_plus(data)
+ assert_equal(data[:expected],
+ @calc.plus(data[:augend], data[:addend]))
+ end
+
+ class TestNormalTestInSubclass < self
+ def test_plus
+ assert_equal(2, @calc.plus(1, 1))
+ end
+ end
+ end
end
def setup
@@ -168,13 +183,20 @@
data("data set" => TestCalc::TestDataSet,
"n-data" => TestCalc::TestNData,
"dynamic-data-set" => TestCalc::TestDynamicDataSet,
- "load-data-set" => TestCalc::TestLoadDataSet)
+ "load-data-set" => TestCalc::TestLoadDataSet,
+ "superclass" => TestCalc::TestSuperclass)
def test_run(test_case)
result = _run_test(test_case)
assert_equal("2 tests, 2 assertions, 0 failures, 0 errors, 0 pendings, " \
"0 omissions, 0 notifications", result.to_s)
end
+ def test_run_normal_test_in_subclass
+ result = _run_test(TestCalc::TestSuperclass::TestNormalTestInSubclass)
+ assert_equal("1 tests, 1 assertions, 0 failures, 0 errors, 0 pendings, " \
+ "0 omissions, 0 notifications", result.to_s)
+ end
+
data("data set" => TestCalc::TestDataSet,
"n-data" => TestCalc::TestNData,
"dynamic-data-set" => TestCalc::TestDynamicDataSet,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test-fixture.rb new/test/test-fixture.rb
--- old/test/test-fixture.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/test/test-fixture.rb 2016-03-19 15:20:52.000000000 +0100
@@ -535,6 +535,60 @@
called)
end
+ def test_setup_with_block
+ test_case = Class.new(Test::Unit::TestCase) do
+ def called_ids
+ @called_ids ||= []
+ end
+
+ def called(id)
+ called_ids << id
+ end
+
+ setup
+ def setup1
+ called(:setup1)
+ begin
+ yield
+ called(:setup1_after_yield)
+ ensure
+ called(:setup1_teardown)
+ end
+ end
+
+ setup
+ def setup2
+ called(:setup2)
+ begin
+ yield
+ called(:setup2_after_yield)
+ ensure
+ called(:setup2_teardown)
+ end
+ end
+
+ def teardown
+ called(:teardown)
+ end
+
+ def test_nothing
+ called(:test)
+ flunk
+ called(:test_after_failure)
+ end
+ end
+
+ assert_called_fixtures([
+ :setup1,
+ :setup2,
+ :test,
+ :setup2_teardown,
+ :setup1_teardown,
+ :teardown,
+ ],
+ test_case)
+ end
+
private
def assert_teardown_customizable(expected, parent, options)
test_case = Class.new(parent || Test::Unit::TestCase) do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/util/test_backtracefilter.rb new/test/util/test_backtracefilter.rb
--- old/test/util/test_backtracefilter.rb 2015-10-09 16:35:53.000000000 +0200
+++ new/test/util/test_backtracefilter.rb 2016-03-19 15:20:52.000000000 +0100
@@ -16,7 +16,7 @@
%q{tc_thing.rb:3}]
assert_equal(backtrace[1..2], filter_backtrace(backtrace, %q{C:\some\old\path\test\unit}), "Should filter out all TestUnit-specific lines")
-backtrace = [%q{tc_thing.rb:4:in 'a'},
+ backtrace = [%q{tc_thing.rb:4:in 'a'},
%q{tc_thing.rb:4:in 'test_stuff'},
%q{tc_thing.rb:3}]
assert_equal(backtrace, filter_backtrace(backtrace, %q{C:\some\old\path\test\unit}), "Shouldn't filter too much")
@@ -37,5 +37,16 @@
def test_nil_backtrace
assert_equal(["No backtrace"], filter_backtrace(nil))
end
+
+ def test_power_assert_backtrace
+ omit('test for power_assert') unless defined?(PowerAssert)
+ blk = Proc.new {caller.find {|i| /power_assert.*in \`start\'/ =~ i}}
+ PowerAssert.start(blk) do |pa|
+ backtrace = [pa.yield,
+ %q{tc_thing.rb:4:in 'a'},
+ %q{tc_thing.rb:4:in 'test_stuff'}]
+ assert_equal(backtrace[1..2], filter_backtrace(backtrace))
+ end
+ end
end
end
1
0