Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replace deprecated Kernel#returning with Object#tap

Change-Id: I568320d9bd4d3834ffbf903f068d0002c0846080
Reviewed-on: https://gerrit.causes.com/3502
Reviewed-by: Richard Zschech <richard.zschech@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
  • Loading branch information...
commit 79a220ce47d2d9152b75315fbb7ae57cf98b8e11 1 parent f7e49ed
Greg Hurrell authored
2  lib/facebooker/models/user.rb
@@ -644,7 +644,7 @@ def ==(other_user)
644 644 def self.register(users)
645 645 user_map={}
646 646 users=users.map do |h|
647   - returning h.dup do |d|
  647 + h.dup.tap do |d|
648 648 if email=d.delete(:email)
649 649 hash = hash_email(email)
650 650 user_map[hash]=h
2  lib/facebooker/rails/controller.rb
@@ -311,7 +311,7 @@ def ensure_authenticated_to_facebook
311 311
312 312 def ensure_application_is_installed_by_facebook_user
313 313 @installation_required = true
314   - returning ensure_authenticated_to_facebook && application_is_installed? do |authenticated_and_installed|
  314 + (ensure_authenticated_to_facebook && application_is_installed?).tap do |authenticated_and_installed|
315 315 application_is_not_installed_by_facebook_user unless authenticated_and_installed
316 316 end
317 317 end
2  lib/facebooker/rails/publisher.rb
@@ -459,7 +459,7 @@ def initialize_template_class(assigns)
459 459 else
460 460 view_paths = [template_root, controller_root]
461 461 end
462   - returning ActionView::Base.new(view_paths, assigns, self) do |template|
  462 + ActionView::Base.new(view_paths, assigns, self).tap do |template|
463 463 template.controller=self
464 464 template.extend(self.class.master_helper_module)
465 465 def template.request_comes_from_facebook?

0 comments on commit 79a220c

Please sign in to comment.
Something went wrong with that request. Please try again.