DEV: Prefer public_send over send.

This commit is contained in:
Guo Xiang Tan
2019-05-07 09:27:05 +08:00
parent 9be70a22cd
commit 152238b4cf
74 changed files with 216 additions and 129 deletions

View File

@ -40,7 +40,8 @@ module DiscourseHub
def self.singular_action(action, rel_url, params = {})
connect_opts = connect_opts(params)
JSON.parse(Excon.send(action,
JSON.parse(Excon.public_send(action,
"#{hub_base_url}#{rel_url}",
{
headers: { 'Referer' => referer, 'Accept' => accepts.join(', ') },
@ -53,7 +54,7 @@ module DiscourseHub
def self.collection_action(action, rel_url, params = {})
connect_opts = connect_opts(params)
response = Excon.send(action,
response = Excon.public_send(action,
"#{hub_base_url}#{rel_url}",
{
body: JSON[params],