Skip to content

Commit f832836

Browse files
committed
Initial attempt at upgrading to Ruby 3.4
1 parent 2e7d472 commit f832836

8 files changed

+25
-5
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.5
1+
3.4.2

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ gem 'loggregator_emitter', '~> 5.0'
1919
gem 'membrane', '~> 1.0'
2020
gem 'mime-types', '~> 3.6'
2121
gem 'multipart-parser'
22+
gem 'mutex_m'
2223
gem 'netaddr', '>= 2.0.4'
2324
gem 'net-ssh'
2425
gem 'newrelic_rpm'
@@ -39,10 +40,10 @@ gem 'sinatra-contrib'
3940
gem 'sshkey'
4041
gem 'statsd-ruby', '~> 1.5.0'
4142
gem 'steno'
43+
gem 'syslog'
4244
gem 'talentbox-delayed_job_sequel', '~> 4.3.0'
4345
gem 'thin'
4446
gem 'vmstat', '~> 2.3'
45-
4647
# Rails Components
4748
gem 'actionpack', '~> 7.2.2'
4849
gem 'actionview', '~> 7.2.1'

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ GEM
554554
fluent-logger
555555
yajl-ruby (~> 1.0)
556556
stringio (3.1.2)
557+
syslog (0.1.1)
557558
talentbox-delayed_job_sequel (4.3.0)
558559
delayed_job (~> 4.1.0)
559560
sequel (>= 3.38, < 6.0)
@@ -631,6 +632,7 @@ DEPENDENCIES
631632
mime-types (~> 3.6)
632633
mock_redis
633634
multipart-parser
635+
mutex_m
634636
mysql2 (~> 0.5.6)
635637
net-ssh
636638
netaddr (>= 2.0.4)
@@ -676,6 +678,7 @@ DEPENDENCIES
676678
sshkey
677679
statsd-ruby (~> 1.5.0)
678680
steno
681+
syslog
679682
talentbox-delayed_job_sequel (~> 4.3.0)
680683
thin
681684
timecop

db/migrations/20220601183937_create_asg_lastest_updates.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Sequel.migration do
22
change do
33
create_table :asg_timestamps do
4-
primary_key name: :id
4+
primary_key '{:name=>:id}'
55
Timestamp :last_update
66
end
77
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Sequel.migration do
22
change do
33
alter_table :asg_timestamps do
4-
rename_column :'{:name=>:id}', :id
4+
rename_column '{:name=>:id}', :id
55
end
66
end
77
end

spec/request/admin_actions_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
h = Hash.new(
1515
{ code: 403 }.freeze
1616
)
17+
1718
h['admin'] = {
1819
code: 202
1920
}

spec/request/app_features_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060

6161
let(:expected_codes_and_responses) do
6262
h = Hash.new({ code: 404 }.freeze)
63+
6364
%w[admin admin_read_only global_auditor space_developer space_manager space_auditor org_manager
6465
space_supporter].each do |r|
6566
h[r] = { code: 200, response_object: features_response_object }
@@ -78,6 +79,7 @@
7879
describe 'GET /v3/apps/:guid/features/:name' do
7980
let(:expected_codes_and_responses) do
8081
h = Hash.new({ code: 404 }.freeze)
82+
8183
%w[admin admin_read_only global_auditor space_developer space_manager space_auditor org_manager
8284
space_supporter].each do |r|
8385
h[r] = { code: 200, response_object: feature_response_object }
@@ -161,8 +163,9 @@
161163

162164
let(:expected_codes_and_responses) do
163165
h = Hash.new({ code: 403, errors: CF_NOT_AUTHORIZED }.freeze)
166+
164167
%w[no_role org_auditor org_billing_manager].each { |r| h[r] = { code: 404 } }
165-
%w[admin space_developer].each { |r| h[r] = { code: 200, response_object: feature_response_object } }
168+
%w[admin space_devµeloper].each { |r| h[r] = { code: 200, response_object: feature_response_object } }
166169
h
167170
end
168171

spec/request/stacks_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@
5656
end
5757

5858
let(:expected_codes_and_responses) do
59+
<<<<<<< HEAD
5960
Hash.new({ code: 200, response_objects: stacks_response_objects }.freeze)
61+
=======
62+
Hash.new({ code: 200, response_objects: stacks_response_objects })
63+
>>>>>>> f9c219ec5 (Initial attempt at upgrading to Ruby 3.4)
6064
end
6165
let!(:stack1) { VCAP::CloudController::Stack.make }
6266
let!(:stack2) { VCAP::CloudController::Stack.make(name: default_stack_name) }
@@ -335,7 +339,11 @@
335339
}
336340
end
337341
let(:expected_codes_and_responses) do
342+
<<<<<<< HEAD
338343
Hash.new({ code: 200, response_object: stacks_response_object }.freeze)
344+
=======
345+
Hash.new({ code: 200, response_object: stacks_response_object })
346+
>>>>>>> f9c219ec5 (Initial attempt at upgrading to Ruby 3.4)
339347
end
340348

341349
it_behaves_like 'permissions for single object endpoint', ALL_PERMISSIONS
@@ -548,7 +556,11 @@
548556
let(:api_call) { ->(user_headers) { get "/v3/stacks/#{stack.guid}/apps", nil, user_headers } }
549557

550558
let(:expected_codes_and_responses) do
559+
<<<<<<< HEAD
551560
h = Hash.new({ code: 200, response_guids: [app_model1.guid, app_model2.guid] }.freeze)
561+
=======
562+
h = Hash.new({ code: 200, response_guids: [app_model1.guid, app_model2.guid] })
563+
>>>>>>> f9c219ec5 (Initial attempt at upgrading to Ruby 3.4)
552564

553565
h['org_auditor'] = {
554566
code: 200,

0 commit comments

Comments
 (0)