Hello community,
here is the log from the commit of package rubygem-responders for
openSUSE:Factory checked in at 2017-06-08 15:00:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-responders (Old)
and /work/SRC/openSUSE:Factory/.rubygem-responders.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-responders"
Thu Jun 8 15:00:52 2017 rev:5 rq:497688 version:2.4.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-responders/rubygem-responders.changes
2016-09-12 13:26:28.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-responders.new/rubygem-responders.changes
2017-06-08 15:00:53.328926897 +0200
@@ -1,0 +2,6 @@
+Tue May 23 10:16:05 UTC 2017 - [email protected]
+
+- updated to version 2.4.0
+ see installed CHANGELOG.md
+
+-------------------------------------------------------------------
Old:
----
responders-2.3.0.gem
New:
----
responders-2.4.0.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-responders.spec ++++++
--- /var/tmp/diff_new_pack.WKVXr8/_old 2017-06-08 15:00:53.864851261 +0200
+++ /var/tmp/diff_new_pack.WKVXr8/_new 2017-06-08 15:00:53.868850697 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-responders
#
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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.3.0
+Version: 2.4.0
Release: 0
%define mod_name responders
%define mod_full_name %{mod_name}-%{version}
++++++ responders-2.3.0.gem -> responders-2.4.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md 2016-08-15 18:31:02.000000000 +0200
+++ new/CHANGELOG.md 2017-04-29 00:13:52.000000000 +0200
@@ -1,4 +1,10 @@
-## Unreleased
+## 2.4.0
+
+* `respond_with` now accepts a new kwargs called `:render` which goes straight
to the `render`
+ call after an unsuccessful post request. Usefull if for example you need to
render a template
+ which is outside of controller's path eg:
+
+ `respond_with resource, render: { template: 'path/to/template' }`
## 2.3.0
Binary 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 2016-08-15 18:31:02.000000000
+0200
+++ new/lib/action_controller/respond_with.rb 2017-04-29 00:13:52.000000000
+0200
@@ -182,11 +182,17 @@
# to save a resource, e.g. when automatically rendering <tt>:new</tt>
# after a post request.
#
- # Two additional options are relevant specifically to +respond_with+ -
+ # Three additional options are relevant specifically to +respond_with+ -
# 1. <tt>:location</tt> - overwrites the default redirect location used
after
# a successful html +post+ request.
# 2. <tt>:action</tt> - overwrites the default render action used after an
# unsuccessful html +post+ request.
+ # 3. <tt>:render</tt> - allows to pass any options directly to the
<tt>:render<tt/>
+ # call after unsuccessful html +post+ request. Usefull if for example
you
+ # need to render a template which is outside of controller's path or you
+ # want to override the default http <tt>:status</tt> code, e.g.
+ #
+ # response_with(resource, render: { template: 'path/to/template',
status: 422 })
def respond_with(*resources, &block)
if self.class.mimes_for_respond_to.empty?
raise "In order to use respond_with, first you need to declare the " \
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 2016-08-15 18:31:02.000000000
+0200
+++ new/lib/action_controller/responder.rb 2017-04-29 00:13:52.000000000
+0200
@@ -200,7 +200,7 @@
if get?
raise error
elsif has_errors? && default_action
- render :action => default_action
+ render rendering_options
else
redirect_to navigation_location
end
@@ -297,5 +297,13 @@
def response_overridden?
@default_response.present?
end
+
+ def rendering_options
+ if options[:render]
+ options[:render]
+ else
+ { action: default_action }
+ end
+ end
end
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 2016-08-15 18:31:02.000000000 +0200
+++ new/lib/responders/version.rb 2017-04-29 00:13:52.000000000 +0200
@@ -1,3 +1,3 @@
module Responders
- VERSION = "2.3.0".freeze
+ VERSION = "2.4.0".freeze
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2016-08-15 18:31:02.000000000 +0200
+++ new/metadata 2017-04-29 00:13:52.000000000 +0200
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: responders
version: !ruby/object:Gem::Version
- version: 2.3.0
+ version: 2.4.0
platform: ruby
authors:
- José Valim
autorequire:
bindir: bin
cert_chain: []
-date: 2016-08-15 00:00:00.000000000 Z
+date: 2017-04-28 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.1'
+ version: '5.3'
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,27 @@
version: 4.2.0
- - "<"
- !ruby/object:Gem::Version
- version: '5.1'
+ version: '5.3'
+- !ruby/object:Gem::Dependency
+ name: actionpack
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: 4.2.0
+ - - "<"
+ - !ruby/object:Gem::Version
+ version: '5.3'
+ type: :runtime
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: 4.2.0
+ - - "<"
+ - !ruby/object:Gem::Version
+ version: '5.3'
description: A set of Rails responders to dry up your application
email: [email protected]
executables: []
@@ -74,7 +94,7 @@
version: '0'
requirements: []
rubyforge_project: responders
-rubygems_version: 2.5.1
+rubygems_version: 2.6.11
signing_key:
specification_version: 4
summary: A set of Rails responders to dry up your application