about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-12-06 19:41:57 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-12-06 11:41:57 +0100
commitb21db9bbde3784556a5861e2cdec0c8c2184c72e (patch)
tree5702878677aa85352185fd22e69fb10cd142d9ee /app/services
parent42bcbd36b72c7ddc5ae1ecced09614863ca382bd (diff)
Using double splat operator (#5859)
Diffstat (limited to 'app/services')
-rw-r--r--app/services/activitypub/process_collection_service.rb2
-rw-r--r--app/services/authorize_follow_service.rb2
-rw-r--r--app/services/post_status_service.rb2
-rw-r--r--app/services/process_feed_service.rb2
-rw-r--r--app/services/remove_status_service.rb2
-rw-r--r--app/services/suspend_account_service.rb2
6 files changed, 6 insertions, 6 deletions
diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb
index db4d1b4bc..eb93329e9 100644
--- a/app/services/activitypub/process_collection_service.rb
+++ b/app/services/activitypub/process_collection_service.rb
@@ -3,7 +3,7 @@
 class ActivityPub::ProcessCollectionService < BaseService
   include JsonLdHelper
 
-  def call(body, account, options = {})
+  def call(body, account, **options)
     @account = account
     @json    = Oj.load(body, mode: :strict)
     @options = options
diff --git a/app/services/authorize_follow_service.rb b/app/services/authorize_follow_service.rb
index b1bff8962..f47d488f1 100644
--- a/app/services/authorize_follow_service.rb
+++ b/app/services/authorize_follow_service.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class AuthorizeFollowService < BaseService
-  def call(source_account, target_account, options = {})
+  def call(source_account, target_account, **options)
     if options[:skip_follow_request]
       follow_request = FollowRequest.new(account: source_account, target_account: target_account)
     else
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index de350f8e6..92d868afe 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -13,7 +13,7 @@ class PostStatusService < BaseService
   # @option [Doorkeeper::Application] :application
   # @option [String] :idempotency Optional idempotency key
   # @return [Status]
-  def call(account, text, in_reply_to = nil, options = {})
+  def call(account, text, in_reply_to = nil, **options)
     if options[:idempotency].present?
       existing_id = redis.get("idempotency:status:#{account.id}:#{options[:idempotency]}")
       return Status.find(existing_id) if existing_id
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index 60eff135e..30a9dd85e 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class ProcessFeedService < BaseService
-  def call(body, account, options = {})
+  def call(body, account, **options)
     @options = options
 
     xml = Nokogiri::XML(body)
diff --git a/app/services/remove_status_service.rb b/app/services/remove_status_service.rb
index 9f603bb36..a100f73ce 100644
--- a/app/services/remove_status_service.rb
+++ b/app/services/remove_status_service.rb
@@ -3,7 +3,7 @@
 class RemoveStatusService < BaseService
   include StreamEntryRenderer
 
-  def call(status, options = {})
+  def call(status, **options)
     @payload      = Oj.dump(event: :delete, payload: status.id.to_s)
     @status       = status
     @account      = status.account
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index 5b37ba9ba..958b28cdc 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class SuspendAccountService < BaseService
-  def call(account, options = {})
+  def call(account, **options)
     @account = account
     @options = options