Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Upgrade to Rails 7 #6719

Merged
merged 51 commits into from
May 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ea24299
chore: Experiement rails upgrade
sojan-official Mar 21, 2023
046cd08
Merge branch 'develop' into chore/update-rails
sojan-official Mar 21, 2023
81fa949
chore: fix
sojan-official Mar 21, 2023
ecd435c
chore: Upgrade chores
sojan-official Mar 21, 2023
24e521a
Merge branch 'develop' into chore/update-rails
sojan-official Apr 19, 2023
144aa5a
chore: bump up gems
sojan-official Apr 19, 2023
36bee21
chore: bump ruby version
sojan-official Apr 19, 2023
d04bd86
chore: fix nokogiri build issue
sojan-official Apr 19, 2023
a55ad21
chore: fix build error
sojan-official Apr 19, 2023
77493ed
Merge branch 'develop' into chore/update-rails
sojan-official Apr 19, 2023
eec4263
chore: fix rubocop
sojan-official Apr 19, 2023
0471f1d
Delete validate_push
sojan-official Apr 19, 2023
406a0a8
chore: fix specs
sojan-official Apr 19, 2023
ccbdeba
chore: update timeouts
sojan-official Apr 19, 2023
14e2c5f
Merge branch 'develop' into chore/update-rails
sojan-official Apr 20, 2023
cc4ffe3
chore: Action cable spec fix
sojan-official Apr 20, 2023
e32faf9
chore: spec fix
sojan-official Apr 20, 2023
6c65a9c
chore: more spec fixes
sojan-official Apr 20, 2023
d8c3968
chore: spec fix
sojan-official Apr 20, 2023
f2212dc
chore: rubocop fixes
sojan-official Apr 20, 2023
ae71350
Merge branch 'develop' into chore/update-rails
sojan-official Apr 20, 2023
e65bf08
chore: fix docker builds
sojan-official Apr 20, 2023
d44f4ce
Merge branch 'develop' into chore/update-rails
sojan-official Apr 25, 2023
a51210d
chore: switch to forks
sojan-official Apr 25, 2023
7833311
chore: resolve dependencies
sojan-official Apr 25, 2023
c9cf9e5
chore: minor cleanups
sojan-official Apr 25, 2023
92a0a8f
Merge branch 'develop' into chore/update-rails
sojan-official Apr 26, 2023
ef5dd3b
Merge branch 'develop' into chore/update-rails
sojan-official Apr 26, 2023
4efecac
Merge branch 'develop' into chore/update-rails
sojan-official Apr 26, 2023
3ef08d6
chore: spec fix
sojan-official Apr 26, 2023
c732ed5
chore: clean up schema.rb
sojan-official Apr 27, 2023
4c12c47
Merge branch 'develop' into chore/update-rails
sojan-official Apr 27, 2023
91e751d
chore: deploy fix
sojan-official Apr 27, 2023
f9cc643
chore: fix rubocop
sojan-official Apr 27, 2023
155363b
chore: debug
sojan-official Apr 27, 2023
e5d29b6
chore: test
sojan-official Apr 27, 2023
47e8859
Workaround for broken build from postcss error
nithindavid May 2, 2023
db5cd29
Fixes broken build with css variables
nithindavid May 2, 2023
98cf5a7
Merge branch 'develop' into chore/update-rails
sojan-official May 2, 2023
2d48c05
chore: fix rake task for db enhancements
sojan-official May 2, 2023
16432c9
chore: fix sentry error
sojan-official May 2, 2023
d94e656
Merge branch 'develop' into chore/update-rails
sojan-official May 3, 2023
ddd0e0c
chore: fix specs
sojan-official May 3, 2023
f1eef2a
Merge branch 'develop' into chore/update-rails
sojan-official May 3, 2023
ad18f58
Merge branch 'develop' into chore/update-rails
sojan-official May 4, 2023
80ae368
chore: Add slugignore
sojan-official May 5, 2023
e762d39
chore: fix dialogflow
sojan-official May 5, 2023
8d8d8d7
chore: add missing gem
sojan-official May 5, 2023
e2ecc28
chore: rubocop fix
sojan-official May 5, 2023
bfa5679
chore: fix partial rendering
sojan-official May 5, 2023
25bd621
Merge branch 'develop' into chore/update-rails
pranavrajs May 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: resolve dependencies
  • Loading branch information
sojan-official committed Apr 25, 2023
commit 7833311cf43b6e9dde7a91621c1fe4a304eb1304
12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ gem 'down'
gem 'gmail_xoauth'
# Prevent CSV injection
gem 'csv-safe'
# Support message translation
gem 'google-cloud-translate'

##-- for active storage --##
gem 'aws-sdk-s3', require: false
# original gem isn't maintained actively
# we wanted updated version of farady which is a dependecy for slack-ruby-client
#gem 'azure-storage-blob', git: 'https://github.com/chatwoot/azure-storage-ruby', branch: 'chatwoot', require: false
gem 'azure-storage-blob'
gem 'azure-storage-blob', git: 'https://github.com/chatwoot/azure-storage-ruby', branch: 'chatwoot', require: false
gem 'google-cloud-storage', require: false
gem 'image_processing'

Expand Down Expand Up @@ -84,7 +81,6 @@ gem 'administrate'
gem 'wisper', '2.0.0'

##--- gems for channels ---##
# TODO: bump up gem to 2.0
gem 'facebook-messenger'
gem 'line-bot-api'
gem 'twilio-ruby', '~> 5.66'
Expand All @@ -94,9 +90,13 @@ gem 'twitty', '~> 0.1.5'
# facebook client
gem 'koala'
# slack client
gem 'slack-ruby-client'
gem 'slack-ruby-client', '~> 2.0.0'
# for dialogflow integrations
gem 'google-cloud-dialogflow'
# Translate integrations
# 'google-cloud-translate' gem depends on faradau unde 2.0 version
# this dependency breaks the slack-ruby-client gem
gem 'google-cloud-translate-v3'

##-- apm and error monitoring ---#
# loaded only when environment variables are set.
Expand Down
92 changes: 37 additions & 55 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
GIT
remote: https://github.com/chatwoot/azure-storage-ruby
revision: 9957cf899d33a285b5dfe15bdb875292398e392b
branch: chatwoot
specs:
azure-storage-blob (2.0.3)
azure-storage-common (~> 2.0)
nokogiri (~> 1, >= 1.10.8)
azure-storage-common (2.0.4)
faraday (~> 2.0)
faraday-follow_redirects (~> 0.3.0)
faraday-net_http_persistent (~> 2.0)
net-http-persistent (~> 4.0)
nokogiri (~> 1, >= 1.10.8)

GIT
remote: https://github.com/chatwoot/devise-secure_password
revision: adcc85fe1babfe40feae73dbcae64d14fff86e69
Expand Down Expand Up @@ -107,7 +122,7 @@ GEM
activerecord (>= 5.0, < 7.1)
request_store (~> 1.2)
aws-eventstream (1.2.0)
aws-partitions (1.753.0)
aws-partitions (1.754.0)
aws-sdk-core (3.171.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
Expand All @@ -122,14 +137,6 @@ GEM
aws-sigv4 (~> 1.4)
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
azure-storage-blob (2.0.3)
azure-storage-common (~> 2.0)
nokogiri (~> 1, >= 1.10.8)
azure-storage-common (2.0.4)
faraday (~> 1.0)
faraday_middleware (~> 1.0, >= 1.0.0.rc1)
net-http-persistent (~> 4.0)
nokogiri (~> 1, >= 1.10.8)
barnes (0.0.9)
multi_json (~> 1)
statsd-ruby (~> 1.1)
Expand Down Expand Up @@ -217,31 +224,22 @@ GEM
railties (>= 5.0.0)
faker (3.2.0)
i18n (>= 1.8.11, < 2)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
faraday-mashify (0.1.1)
faraday (~> 2.0)
hashie
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
faraday-net_http (3.0.2)
faraday-net_http_persistent (2.1.0)
faraday (~> 2.5)
net-http-persistent (~> 4.0)
faraday-retry (2.1.0)
faraday (~> 2.0)
fcm (1.0.8)
faraday (>= 1.0.0, < 3.0)
googleauth (~> 1)
Expand Down Expand Up @@ -305,20 +303,9 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
google-cloud-translate (3.4.0)
google-cloud-core (~> 1.6)
google-cloud-translate-v2 (>= 0.0, < 2.a)
google-cloud-translate-v3 (>= 0.6, < 2.a)
google-cloud-translate-v2 (0.4.0)
faraday (>= 0.17.3, < 2.a)
google-cloud-core (~> 1.6)
googleapis-common-protos (>= 1.3.10, < 2.a)
googleapis-common-protos-types (>= 1.0.5, < 2.a)
googleauth (>= 0.16.2, < 2.a)
google-cloud-translate-v3 (0.6.0)
gapic-common (>= 0.17.1, < 2.a)
google-cloud-errors (~> 1.0)
google-protobuf (3.22.3)
google-protobuf (3.22.3-arm64-darwin)
google-protobuf (3.22.3-x86_64-darwin)
google-protobuf (3.22.3-x86_64-linux)
Expand Down Expand Up @@ -414,8 +401,6 @@ GEM
launchy (>= 2.2, < 3)
libdatadog (2.0.0.1.0)
libdatadog (2.0.0.1.0-x86_64-linux)
libddwaf (1.6.2.0.0)
ffi (~> 1.0)
libddwaf (1.6.2.0.0-arm64-darwin)
ffi (~> 1.0)
libddwaf (1.6.2.0.0-x86_64-darwin)
Expand Down Expand Up @@ -452,7 +437,6 @@ GEM
mime-types-data (3.2023.0218.1)
mini_magick (4.12.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
minitest (5.18.0)
mock_redis (0.36.0)
ruby2_keywords
Expand All @@ -477,9 +461,6 @@ GEM
sidekiq
newrelic_rpm (8.16.0)
nio4r (2.5.9)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.14.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-darwin)
Expand Down Expand Up @@ -703,9 +684,10 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
slack-ruby-client (1.0.0)
faraday (>= 1.0)
faraday_middleware
slack-ruby-client (2.0.0)
faraday (>= 2.0)
faraday-mashify
faraday-multipart
gli
hashie
websocket-driver
Expand Down Expand Up @@ -791,10 +773,10 @@ GEM

PLATFORMS
arm64-darwin-20
ruby
x86_64-darwin-18
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
Expand All @@ -806,7 +788,7 @@ DEPENDENCIES
attr_extras
audited (~> 5.2)
aws-sdk-s3
azure-storage-blob
azure-storage-blob!
barnes
bootsnap
brakeman
Expand Down Expand Up @@ -837,7 +819,7 @@ DEPENDENCIES
gmail_xoauth
google-cloud-dialogflow
google-cloud-storage
google-cloud-translate
google-cloud-translate-v3
groupdate
haikunator
hairtrigger
Expand Down Expand Up @@ -893,7 +875,7 @@ DEPENDENCIES
sidekiq
sidekiq-cron
simplecov (= 0.17.1)
slack-ruby-client
slack-ruby-client (~> 2.0.0)
spring
spring-watcher-listen
squasher
Expand Down
3 changes: 2 additions & 1 deletion lib/integrations/google_translate/detect_language_service.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'google/cloud/translate/v3'
class Integrations::GoogleTranslate::DetectLanguageService
pattr_initialize [:hook!, :message!]

Expand Down Expand Up @@ -33,7 +34,7 @@ def update_conversation(response)
end

def client
@client ||= Google::Cloud::Translate.translation_service do |config|
@client ||= ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config|
config.credentials = hook.settings['credentials']
end
end
Expand Down
3 changes: 2 additions & 1 deletion lib/integrations/google_translate/processor_service.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'google/cloud/translate/v3'
class Integrations::GoogleTranslate::ProcessorService
pattr_initialize [:message!, :target_language!]

Expand All @@ -23,7 +24,7 @@ def hook
end

def client
@client ||= Google::Cloud::Translate.translation_service do |config|
@client ||= ::Google::Cloud::Translate::V3::TranslationService::Client.new do |config|
config.credentials = hook.settings['credentials']
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:translate_client) { double }

before do
allow(::Google::Cloud::Translate).to receive(:translation_service).and_return(translate_client)
allow(::Google::Cloud::Translate::V3::TranslationService::Client).to receive(:new).and_return(translate_client)
allow(translate_client).to receive(:detect_language).and_return(::Google::Cloud::Translate::V3::DetectLanguageResponse
.new({ languages: [{ language_code: 'es', confidence: 0.71875 }] }))
end
Expand Down