Skip to content

Commit

Permalink
Merge pull request #4062 from zendesk/zendesk-mattlefevre/upgrade-to-…
Browse files Browse the repository at this point in the history
…ruby-3

Upgrade to ruby 3.0
  • Loading branch information
zendesk-mattlefevre authored Jul 17, 2023
2 parents 107efb4 + 7a1e990 commit 3b5aa8b
Show file tree
Hide file tree
Showing 31 changed files with 176 additions and 143 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.6
3.0.6
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.6-slim
FROM ruby:3.0.6-slim

# Install dependencies
RUN \
Expand Down
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruby File.read('.ruby-version').strip

# gems that have rails engines are are always needed
group :preload do
gem 'rails', '~> 6.1.7.3'
gem 'rails', '~> 6.1.7.4'
gem 'dotenv'
gem 'connection_pool'
gem 'marco-polo'
Expand All @@ -15,7 +15,7 @@ group :preload do
gem 'pagy'
gem 'audited'
gem 'soft_deletion'
gem 'doorkeeper', '~> 5.4.0' # TODO: upgrade breaks `rails c`
gem 'doorkeeper'
gem 'mail', '~> 2.7.0' # TODO: upgrade breaks `rails c`
end

Expand Down Expand Up @@ -52,6 +52,7 @@ gem 'validates_lengths_from_database'
gem 'large_object_store'
gem 'parallel'
gem 'stackprof'
gem 'webrick'

# treat included plugins like gems
Dir[File.join(Bundler.root, 'plugins/*/')].each { |f| gemspec path: f }
Expand Down Expand Up @@ -98,7 +99,7 @@ group :debugging do
end

group :development, :staging do
gem 'rack-mini-profiler'
gem 'rack-mini-profiler', '~>3.1.0'
end

group :development, :test do
Expand Down
171 changes: 87 additions & 84 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -194,62 +194,62 @@ GEM
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
actioncable (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionmailbox (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (>= 2.7.1)
actionmailer (6.1.7.3)
actionpack (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionmailer (6.1.7.4)
actionpack (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.3)
actionview (= 6.1.7.3)
activesupport (= 6.1.7.3)
actionpack (6.1.7.4)
actionview (= 6.1.7.4)
activesupport (= 6.1.7.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.3)
actionpack (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
actiontext (6.1.7.4)
actionpack (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
nokogiri (>= 1.8.5)
actionview (6.1.7.3)
activesupport (= 6.1.7.3)
actionview (6.1.7.4)
activesupport (= 6.1.7.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_hash (3.0.0)
activesupport (>= 5.0.0)
activejob (6.1.7.3)
activesupport (= 6.1.7.3)
activejob (6.1.7.4)
activesupport (= 6.1.7.4)
globalid (>= 0.3.6)
activemodel (6.1.7.3)
activesupport (= 6.1.7.3)
activerecord (6.1.7.3)
activemodel (= 6.1.7.3)
activesupport (= 6.1.7.3)
activestorage (6.1.7.3)
actionpack (= 6.1.7.3)
activejob (= 6.1.7.3)
activerecord (= 6.1.7.3)
activesupport (= 6.1.7.3)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activestorage (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activesupport (= 6.1.7.4)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.3)
activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -293,8 +293,8 @@ GEM
aws-eventstream (~> 1.0, >= 1.0.2)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootsnap (1.4.5)
msgpack (~> 1.0)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
Expand Down Expand Up @@ -323,11 +323,11 @@ GEM
dogstatsd-ruby (3.0.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
doorkeeper (5.4.0)
doorkeeper (5.6.6)
railties (>= 5)
dotenv (2.2.1)
encryptor (3.0.0)
erubi (1.11.0)
erubi (1.12.0)
erubis (2.7.0)
execjs (2.7.0)
faraday (2.7.4)
Expand Down Expand Up @@ -356,9 +356,9 @@ GEM
forking_test_runner (1.2.0)
parallel_tests (>= 1.3.7)
git_diff_parser (3.1.0)
gitlab (4.10.0)
httparty (~> 0.14, >= 0.14.0)
terminal-table (~> 1.5, >= 1.5.1)
gitlab (4.19.0)
httparty (~> 0.20)
terminal-table (>= 1.5.1)
globalid (1.1.0)
activesupport (>= 5.0)
goldiloader (3.2.0)
Expand All @@ -378,7 +378,7 @@ GEM
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.13.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
inflection (1.0.0)
interception (0.5)
Expand Down Expand Up @@ -410,9 +410,9 @@ GEM
railties (>= 4)
request_store (~> 1.0)
logstash-event (1.2.02)
loofah (2.19.1)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
Expand All @@ -426,7 +426,7 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
mini_portile2 (2.8.2)
minitest (5.11.3)
minitest-rails (6.1.0)
minitest (~> 5.10)
Expand All @@ -437,7 +437,7 @@ GEM
metaclass (~> 0.0.1)
momentjs-rails (2.29.4.1)
railties (>= 3.1)
msgpack (1.4.2)
msgpack (1.7.1)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
Expand All @@ -447,13 +447,13 @@ GEM
net-ldap (0.16.1)
netrc (0.11.0)
newrelic_rpm (6.7.0.359)
nio4r (2.5.8)
nokogiri (1.14.3)
mini_portile2 (~> 2.8.0)
nio4r (2.5.9)
nokogiri (1.15.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-darwin)
nokogiri (1.15.2-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.3-x86_64-linux)
nokogiri (1.15.2-x86_64-linux)
racc (~> 1.4)
oauth2 (1.4.11)
faraday (>= 0.17.3, < 3.0)
Expand Down Expand Up @@ -515,26 +515,26 @@ GEM
puma (5.6.4)
nio4r (~> 2.0)
pyu-ruby-sasl (0.0.3.3)
racc (1.6.2)
racc (1.7.1)
rack (2.2.7)
rack-mini-profiler (1.1.4)
rack-mini-profiler (3.1.0)
rack (>= 1.2.0)
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.3)
actioncable (= 6.1.7.3)
actionmailbox (= 6.1.7.3)
actionmailer (= 6.1.7.3)
actionpack (= 6.1.7.3)
actiontext (= 6.1.7.3)
actionview (= 6.1.7.3)
activejob (= 6.1.7.3)
activemodel (= 6.1.7.3)
activerecord (= 6.1.7.3)
activestorage (= 6.1.7.3)
activesupport (= 6.1.7.3)
rails (6.1.7.4)
actioncable (= 6.1.7.4)
actionmailbox (= 6.1.7.4)
actionmailer (= 6.1.7.4)
actionpack (= 6.1.7.4)
actiontext (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activemodel (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
bundler (>= 1.15.0)
railties (= 6.1.7.3)
railties (= 6.1.7.4)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -543,11 +543,12 @@ GEM
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
railties (6.1.7.3)
actionpack (= 6.1.7.3)
activesupport (= 6.1.7.3)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -614,8 +615,8 @@ GEM
single_cov (1.3.2)
slop (3.6.0)
socksify (1.7.1)
soft_deletion (1.6.0)
activerecord (>= 4.2.0, < 6.2.0)
soft_deletion (1.8.0)
activerecord (>= 5.0.0, < 7.1)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -625,9 +626,9 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
stackprof (0.2.12)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.2.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.2)
tilt (2.0.10)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand All @@ -645,6 +646,7 @@ GEM
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
webrick (1.8.1)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand Down Expand Up @@ -681,7 +683,7 @@ DEPENDENCIES
dalli
diffy
dogstatsd-ruby
doorkeeper (~> 5.4.0)
doorkeeper
dotenv
faraday (~> 2.7)
faraday-http-cache
Expand Down Expand Up @@ -719,8 +721,8 @@ DEPENDENCIES
pry-rescue
pry-stack_explorer
puma
rack-mini-profiler
rails (~> 6.1.7.3)
rack-mini-profiler (~> 3.1.0)
rails (~> 6.1.7.4)
rails-assets-bootstrap-select!
rails-assets-jquery!
rails-assets-jquery-cookie!
Expand Down Expand Up @@ -772,9 +774,10 @@ DEPENDENCIES
vault!
warden
webmock
webrick

RUBY VERSION
ruby 2.7.6p219
ruby 3.0.6p216

BUNDLED WITH
2.3.25
2 changes: 1 addition & 1 deletion app/channels/deploy_notifications_channel.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class DeployNotificationsChannel < ActionCable::Channel::Base
def self.broadcast(count)
ActionCable.server.broadcast channel_name, count: count
ActionCable.server.broadcast(channel_name, {count: count})
end

# called when using javascript App.cable.subscriptions.create
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/access_tokens_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def resource_class

def render_resource_as_json(**args)
# Override constraints in Doorkeeper::AccessToken
render_as_json resource_name, @resource.serializable_hash, nil, **args, allowed_includes: nil
render_as_json resource_name, @resource.serializable_hash, nil, allowed_includes: nil, **args
end

def resource_params
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/csv_exports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def new
case params[:type]
when "users"
options = user_filter
send_data UserCsvPresenter.to_csv(options), type: :csv, filename: "Users_#{options[:datetime]}.csv"
send_data UserCsvPresenter.to_csv(**options), type: :csv, filename: "Users_#{options[:datetime]}.csv"
when "deploy_group_usage"
date_time_now = Time.now.strftime "%Y%m%d_%H%M"
send_data DeployGroupUsageCsvPresenter.to_csv, type: :csv, filename: "DeployGroupUsage_#{date_time_now}.csv"
Expand Down
Loading

0 comments on commit 3b5aa8b

Please sign in to comment.