chore: Upgrade rails and ruby versions (#2400)

ruby version: 3.0.2
rails version: 6.1.4
This commit is contained in:
Sojan Jose
2021-08-03 20:11:52 +05:30
committed by GitHub
parent 7e960b7c72
commit ab54d9c629
61 changed files with 498 additions and 626 deletions

View File

@@ -14,7 +14,7 @@ class Api::V1::Accounts::BaseController < Api::BaseController
account = Account.find(params[:account_id])
if current_user
account_accessible_for_user?(account)
elsif @resource&.is_a?(AgentBot)
elsif @resource.is_a?(AgentBot)
account_accessible_for_bot?(account)
end
account

View File

@@ -69,7 +69,7 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
return [] if data.empty?
data.inject([]) do |result, page_detail|
page_detail[:exists] = Current.account.facebook_pages.exists?(page_id: page_detail['id']) ? true : false
page_detail[:exists] = Current.account.facebook_pages.exists?(page_id: page_detail['id'])
result << page_detail
end
end
@@ -99,7 +99,7 @@ class Api::V1::Accounts::CallbacksController < Api::V1::Accounts::BaseController
end
pic_url = response.base_uri.to_s
rescue StandardError => e
Rails.logger.debug "Rescued: #{e.inspect}"
Rails.logger.debug { "Rescued: #{e.inspect}" }
pic_url = nil
end
pic_url

View File

@@ -6,9 +6,8 @@ class Api::V1::Accounts::Channels::TwilioChannelsController < Api::V1::Accounts:
authenticate_twilio
build_inbox
setup_webhooks if @twilio_channel.sms?
rescue Twilio::REST::TwilioError => e
render_could_not_create_error(e.message)
rescue StandardError => e
Sentry.capture_exception(e)
render_could_not_create_error(e.message)
end
end

View File

@@ -9,7 +9,7 @@ class Api::V1::Accounts::InboxMembersController < Api::V1::Accounts::BaseControl
update_agents_list
head :ok
rescue StandardError => e
Rails.logger.debug "Rescued: #{e.inspect}"
Rails.logger.debug { "Rescued: #{e.inspect}" }
render_could_not_create_error('Could not add agents to inbox')
end
end

View File

@@ -10,7 +10,7 @@ class Api::V1::WebhooksController < ApplicationController
twitter_consumer.consume
head :ok
rescue StandardError => e
Raven.capture_exception(e)
Sentry.capture_exception(e)
head :ok
end