Skip to content

Commit 47b27bc

Browse files
authored
Merge pull request #4097 from zendesk/grosser/32
use ruby 3.2
2 parents ae92881 + 800ebec commit 47b27bc

File tree

16 files changed

+89
-27
lines changed

16 files changed

+89
-27
lines changed

.rubocop.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,34 @@ Rails/HelperInstanceVariable:
257257
Rails/FilePath:
258258
Enabled: false
259259

260+
# TODO: enable
261+
Rails/FindEach:
262+
Enabled: false
263+
264+
# TODO: enable
265+
Rails/IndexBy:
266+
Enabled: false
267+
268+
# TODO: enable
269+
Rails/IndexWith:
270+
Enabled: false
271+
272+
# we don't always need environment
273+
Rails/RakeEnvironment:
274+
Enabled: false
275+
276+
# TODO: enable
277+
Rails/ApplicationController:
278+
Enabled: false
279+
280+
# TODO: enable
281+
Rails/ContentTag:
282+
Enabled: false
283+
284+
# TODO: enable
285+
Rails/UniqueValidationWithoutIndex:
286+
Enabled: false
287+
260288
Gemspec/RequiredRubyVersion:
261289
Enabled: false
262290

@@ -266,3 +294,6 @@ Style/AccessorGrouping:
266294
# produces false-positives with html-safe, see app/helpers/application_helper.rb
267295
Style/StringConcatenation:
268296
Enabled: false
297+
298+
Style/HashSyntax:
299+
Enabled: false

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.6
1+
3.2.2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.0.6-slim
1+
FROM ruby:3.2.2-slim
22

33
# Install dependencies
44
RUN \

Gemfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ group :preload do
88
gem 'rails', '~> 6.1.7.6'
99
gem 'dotenv'
1010
gem 'connection_pool'
11-
gem 'marco-polo'
11+
gem 'marco-polo' # TODO: https://github.com/arches/marco-polo/pull/16
1212

1313
# AR extensions
1414
gem 'goldiloader'
@@ -39,6 +39,7 @@ gem 'octokit'
3939
gem 'faraday', '~> 2.7'
4040
gem 'faraday-net_http_persistent', '~> 2.0'
4141
gem 'faraday-http-cache'
42+
gem 'faraday-retry'
4243
gem 'warden'
4344
gem 'active_hash'
4445
gem 'ansible'
@@ -50,11 +51,15 @@ gem 'concurrent-ruby'
5051
gem 'vault', git: 'https://github.com/zendesk/vault-ruby.git', ref: '96be391a2fd50a42871c8b9dc3c59fddbdbdc556'
5152
gem 'lograge'
5253
gem 'logstash-event'
54+
gem 'hashdiff', git: 'https://github.com/liufengyun/hashdiff.git' # fails to install on ruby 3.2 from gem when deploying
5355
gem 'diffy'
5456
gem 'validates_lengths_from_database'
5557
gem 'large_object_store'
5658
gem 'parallel'
5759
gem 'stackprof'
60+
gem 'net-smtp'
61+
gem 'net-pop'
62+
gem 'net-imap'
5863

5964
# treat included plugins like gems
6065
Dir[File.join(Bundler.root, 'plugins/*/')].each { |f| gemspec path: f }

Gemfile.lock

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
GIT
2+
remote: https://github.com/liufengyun/hashdiff.git
3+
revision: 3832f805bddfa5e738a6d82b51ab4a27b61169b6
4+
specs:
5+
hashdiff (1.1.0)
6+
17
GIT
28
remote: https://github.com/omniauth/omniauth-github.git
39
revision: f27bb4e018150d87e9444ad13955acfc9e76f4d7
@@ -332,6 +338,7 @@ GEM
332338
crass (1.0.6)
333339
dalli (3.2.7)
334340
base64
341+
date (3.3.4)
335342
ddtrace (0.45.0)
336343
msgpack
337344
debug_inspector (0.0.3)
@@ -357,6 +364,8 @@ GEM
357364
faraday-net_http_persistent (2.1.0)
358365
faraday (~> 2.5)
359366
net-http-persistent (~> 4.0)
367+
faraday-retry (2.2.0)
368+
faraday (~> 2.0)
360369
ffi (1.16.3)
361370
ffi-compiler (1.0.1)
362371
ffi (>= 1.0.0)
@@ -380,7 +389,6 @@ GEM
380389
goldiloader (3.2.0)
381390
activerecord (>= 4.2, < 6.3)
382391
activesupport (>= 4.2, < 6.3)
383-
hashdiff (0.4.0)
384392
hashie (5.0.0)
385393
http (5.2.0)
386394
addressable (~> 2.8)
@@ -438,19 +446,20 @@ GEM
438446
railties (>= 6)
439447
maxitest (3.7.0)
440448
minitest (>= 5.0.0, < 5.15.0)
441-
method_source (0.9.2)
449+
method_source (1.0.0)
442450
mime-types (3.5.2)
443451
mime-types-data (~> 3.2015)
444452
mime-types-data (3.2024.0206)
445453
mini_mime (1.1.5)
446454
mini_portile2 (2.8.5)
447-
minitest (5.11.3)
455+
minitest (5.14.4)
448456
minitest-rails (6.1.1)
449457
minitest (~> 5.10)
450458
railties (~> 6.1.0)
451459
mixlib-shellout (3.2.7)
452460
chef-utils
453-
mocha (1.16.1)
461+
mocha (2.1.0)
462+
ruby2_keywords (>= 0.0.5)
454463
momentjs-rails (2.29.4.1)
455464
railties (>= 3.1)
456465
msgpack (1.7.2)
@@ -460,7 +469,16 @@ GEM
460469
mysql2 (0.5.5)
461470
net-http-persistent (4.0.2)
462471
connection_pool (~> 2.2)
472+
net-imap (0.4.10)
473+
date
474+
net-protocol
463475
net-ldap (0.19.0)
476+
net-pop (0.1.2)
477+
net-protocol
478+
net-protocol (0.2.2)
479+
timeout
480+
net-smtp (0.4.0.1)
481+
net-protocol
464482
netrc (0.11.0)
465483
newrelic_rpm (9.7.1)
466484
nio4r (2.7.0)
@@ -514,9 +532,9 @@ GEM
514532
racc
515533
path_expander (1.1.1)
516534
pg (1.5.4)
517-
pry (0.12.2)
518-
coderay (~> 1.1.0)
519-
method_source (~> 0.9.0)
535+
pry (0.14.2)
536+
coderay (~> 1.1)
537+
method_source (~> 1.0)
520538
pry-byebug (3.3.0)
521539
byebug (~> 8.0)
522540
pry (~> 0.10)
@@ -601,9 +619,11 @@ GEM
601619
unicode-display_width (>= 1.4.0, < 3.0)
602620
rubocop-ast (1.30.0)
603621
parser (>= 3.2.1.0)
604-
rubocop-rails (2.3.2)
622+
rubocop-rails (2.23.1)
623+
activesupport (>= 4.2.0)
605624
rack (>= 1.1)
606-
rubocop (>= 0.72.0)
625+
rubocop (>= 1.33.0, < 2.0)
626+
rubocop-ast (>= 1.30.0, < 2.0)
607627
ruby-progressbar (1.13.0)
608628
ruby2_keywords (0.0.5)
609629
ruby_parser (3.21.0)
@@ -658,6 +678,7 @@ GEM
658678
unicode-display_width (~> 1.1, >= 1.1.1)
659679
thor (1.3.0)
660680
tilt (2.3.0)
681+
timeout (0.4.1)
661682
tzinfo (2.0.6)
662683
concurrent-ruby (~> 1.0)
663684
uglifier (3.2.0)
@@ -716,10 +737,12 @@ DEPENDENCIES
716737
faraday (~> 2.7)
717738
faraday-http-cache
718739
faraday-net_http_persistent (~> 2.0)
740+
faraday-retry
719741
flay
720742
forking_test_runner
721743
gcloud_image_tagger!
722744
goldiloader
745+
hashdiff!
723746
large_object_store
724747
lograge
725748
logstash-event
@@ -731,6 +754,9 @@ DEPENDENCIES
731754
momentjs-rails
732755
mysql2
733756
net-http-persistent
757+
net-imap
758+
net-pop
759+
net-smtp
734760
oauth2 (~> 2.0.9)
735761
octokit
736762
omniauth (~> 2.0)
@@ -805,7 +831,7 @@ DEPENDENCIES
805831
webmock
806832

807833
RUBY VERSION
808-
ruby 3.0.6p216
834+
ruby 3.2.2p53
809835

810836
BUNDLED WITH
811-
2.4.22
837+
2.5.6

app/models/concerns/has_role.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def role
44
Role.find(role_id)
55
end
66

7-
Role.all.each do |role| # rubocop:disable Rails/FindEach
7+
Role.all.each do |role| # rubocop:disable Lint/RedundantCopDisableDirective Rails/FindEach
88
define_method "#{role.name}?" do
99
role_id >= role.id
1010
end

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def self.deprecated_url(var)
188188
RestartSignalHandler.after_restart
189189
RestartSignalHandler.listen
190190
end
191-
Samson::BootCheck.check if Rails.env.development?
191+
# Samson::BootCheck.check if Rails.env.development? # TODO: re-enable
192192
end
193193

194194
unless ENV['PRECOMPILE']

db/migrate/20150223135916_create_deploy_groups.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def change
1818
end
1919
add_foreign_key :deploy_groups, :environments
2020

21-
create_table :deploy_groups_stages, id: false do |t| # rubocop:disable Rails/CreateTableWithTimestamps
21+
create_table :deploy_groups_stages, id: false do |t|
2222
t.belongs_to :deploy_group, index: true
2323
t.belongs_to :stage, index: true
2424
end

db/migrate/20170616180533_seed_audited_from_versions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def create_audit(version, current_state)
5757
if current_state == :bad
5858
{}
5959
else
60-
previous_state = YAML.load(version.object || "{}").except(*IGNORED) # rubocop:disable Security/YAMLLoad
61-
current_state = YAML.load(current_state || "{}").except(*IGNORED) # # rubocop:disable Security/YAMLLoad
60+
previous_state = YAML.load(version.object || "{}").except(*IGNORED)
61+
current_state = YAML.load(current_state || "{}").except(*IGNORED)
6262

6363
# audited has a strange behavior where the create/destroy changes don't have arrays but just a value
6464
simple = ["create", "destroy"].include?(version.event)

plugins/kubernetes/app/models/kubernetes/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def self.yaml_safe_load_stream(contents, filename)
2323
YAML.parse_stream(contents, filename: filename).children.map do |child|
2424
temp_stream = Psych::Nodes::Stream.new
2525
temp_stream.children << child
26-
YAML.safe_load(temp_stream.to_yaml, [Symbol], aliases: true)
26+
YAML.safe_load(temp_stream.to_yaml, permitted_classes: [Symbol], aliases: true)
2727
end
2828
end
2929
end

0 commit comments

Comments
 (0)