Hello community,

here is the log from the commit of package rubygem-responders for 
openSUSE:Factory checked in at 2016-09-12 13:26:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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    
2016-06-14 23:06:41.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-responders.new/rubygem-responders.changes   
    2016-09-12 13:26:28.000000000 +0200
@@ -1,0 +2,14 @@
+Tue Aug 16 04:32:22 UTC 2016 - [email protected]
+
+- updated to version 2.3.0
+ see installed CHANGELOG.md
+
+  ## Unreleased
+  
+  ## 2.3.0
+  
+  * `verify_request_format!` is aliased to `verify_requested_format!` now.
+  * Implementing the `interpolation_options` method on your controller is 
deprecated
+    in favor of naming it `flash_interpolation_options` instead.
+
+-------------------------------------------------------------------

Old:
----
  responders-2.2.0.gem

New:
----
  responders-2.3.0.gem

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

Other differences:
------------------
++++++ rubygem-responders.spec ++++++
--- /var/tmp/diff_new_pack.LDfa6r/_old  2016-09-12 13:26:29.000000000 +0200
+++ /var/tmp/diff_new_pack.LDfa6r/_new  2016-09-12 13:26:29.000000000 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-responders
-Version:        2.2.0
+Version:        2.3.0
 Release:        0
 %define mod_name responders
 %define mod_full_name %{mod_name}-%{version}

++++++ responders-2.2.0.gem -> responders-2.3.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2016-04-29 19:47:31.000000000 +0200
+++ new/CHANGELOG.md    2016-08-15 18:31:02.000000000 +0200
@@ -1,3 +1,11 @@
+## Unreleased
+
+## 2.3.0
+
+* `verify_request_format!` is aliased to `verify_requested_format!` now.
+* Implementing the `interpolation_options` method on your controller is 
deprecated
+  in favor of naming it `flash_interpolation_options` instead.
+
 ## 2.2.0
 
 * Added the `verify_request_format!` method, that can be used as a 
`before_action`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2016-04-29 19:47:31.000000000 +0200
+++ new/README.md       2016-08-15 18:31:02.000000000 +0200
@@ -160,7 +160,7 @@
 
 ## Interpolation Options
 
-You can pass in extra interpolation options for the translation by adding an 
`interpolation_options` method to your controller:
+You can pass in extra interpolation options for the translation by adding an 
`flash_interpolation_options` method to your controller:
 
 ```ruby
 class InvitationsController < ApplicationController
@@ -173,7 +173,7 @@
 
   private
 
-  def interpolation_options
+  def flash_interpolation_options
     { resource_name: @invitation.email }
   end
 end
@@ -222,13 +222,13 @@
 mime type was not configured through the class level `respond_to`, but the
 action will still be executed and any side effects (like creating a new record)
 will still occur. To raise the `UnknownFormat` exception before your action
-is invoked you can set the `verify_request_format!` method as a `before_action`
+is invoked you can set the `verify_requested_format!` method as a 
`before_action`
 on your controller.
 
 ```ruby
 class WidgetsController < ApplicationController
   respond_to :json
-  before_action :verify_request_format!
+  before_action :verify_requested_format!
 
   # POST /widgets.html won't reach the `create` action.
   def create
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-04-29 19:47:31.000000000 
+0200
+++ new/lib/action_controller/respond_with.rb   2016-08-15 18:31:02.000000000 
+0200
@@ -216,9 +216,9 @@
     #   class PeopleController < ApplicationController
     #     respond_to :html, :xml, :json
     #
-    #     before_action :verify_request_format!
+    #     before_action :verify_requested_format!
     #   end
-    def verify_request_format!
+    def verify_requested_format!
       mimes = collect_mimes_from_class_level
       collector = ActionController::MimeResponds::Collector.new(mimes, 
request.variant)
 
@@ -227,6 +227,8 @@
       end
     end
 
+    alias :verify_request_format! :verify_requested_format!
+
     # Collect mimes declared in the class method respond_to valid for the
     # current action.
     def collect_mimes_from_class_level #:nodoc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/responders/flash_responder.rb 
new/lib/responders/flash_responder.rb
--- old/lib/responders/flash_responder.rb       2016-04-29 19:47:31.000000000 
+0200
+++ new/lib/responders/flash_responder.rb       2016-08-15 18:31:02.000000000 
+0200
@@ -33,9 +33,9 @@
   #         notice: "Hooray! You just tuned your %{car_brand}!"
   #
   # Since :car_name is not available for interpolation by default, you have
-  # to overwrite interpolation_options in your controller.
+  # to overwrite `flash_interpolation_options` in your controller.
   #
-  #   def interpolation_options
+  #   def flash_interpolation_options
   #     { :car_brand => @car.brand }
   #   end
   #
@@ -147,25 +147,37 @@
     end
 
     def mount_i18n_options(status) #:nodoc:
-      resource_name = if resource.class.respond_to?(:model_name)
-        resource.class.model_name.human
-      else
-        resource.class.name.underscore.humanize
-      end
-
       options = {
         :default => flash_defaults_by_namespace(status),
         :resource_name => resource_name,
         :downcase_resource_name => resource_name.downcase
       }
 
-      if controller.respond_to?(:interpolation_options, true)
-        options.merge!(controller.send(:interpolation_options))
+      controller_options = controller_interpolation_options
+      if controller_options
+        options.merge!(controller_options)
       end
 
       options
     end
 
+    def controller_interpolation_options
+      if controller.respond_to?(:flash_interpolation_options, true)
+        controller.send(:flash_interpolation_options)
+      elsif controller.respond_to?(:interpolation_options, true)
+        ActiveSupport::Deprecation.warn("[responders] 
`#{controller.class}#interpolation_options` is deprecated, please rename it to 
`flash_interpolation_options`.")
+        controller.send(:interpolation_options)
+      end
+    end
+
+    def resource_name
+      if resource.class.respond_to?(:model_name)
+        resource.class.model_name.human
+      else
+        resource.class.name.underscore.humanize
+      end
+    end
+
     def flash_defaults_by_namespace(status) #:nodoc:
       defaults = []
       slices   = controller.controller_path.split('/')
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-04-29 19:47:31.000000000 +0200
+++ new/lib/responders/version.rb       2016-08-15 18:31:02.000000000 +0200
@@ -1,3 +1,3 @@
 module Responders
-  VERSION = "2.2.0".freeze
+  VERSION = "2.3.0".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2016-04-29 19:47:31.000000000 +0200
+++ new/metadata        2016-08-15 18:31:02.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: responders
 version: !ruby/object:Gem::Version
-  version: 2.2.0
+  version: 2.3.0
 platform: ruby
 authors:
 - José Valim
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2016-04-29 00:00:00.000000000 Z
+date: 2016-08-15 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: railties


Reply via email to