A platform for community discussion. Free, open, simple.
DEV: Ruby 3.1 compat (#19543)
Rafael dos Santos Silva7c5744a4cbb1
diff --git a/.licensed.yml b/.licensed.ymlindex f89daae2bd0..e1268542c8f 100644--- a/.licensed.yml+++ b/.licensed.yml@@ -14,6 +14,8 @@ ignored:bundler:- rchardet # Ruby terms- strscan # Ruby+ - ruby2_keywords # BSD-2-Clause+ - openssl # Ruby termsreviewed:bundler:@@ -43,7 +45,6 @@ reviewed:- net-protocol # Ruby- net-smtp # Ruby- omniauth # MIT- - openssl # Ruby terms- pg # Ruby terms- r2 # Apache-2.0 (Twitter)- racc # Ruby termsdiff --git a/Gemfile b/Gemfileindex b35e4805cc4..5748f027299 100644--- a/Gemfile+++ b/Gemfile@@ -169,6 +169,7 @@ group :test, :development dogem 'rswag-specs'gem 'annotate'+ gem 'webrick', require: falseendgroup :development dodiff --git a/Gemfile.lock b/Gemfile.lockindex b3d676d7a8b..28f00a67db2 100644--- a/Gemfile.lock+++ b/Gemfile.lock@@ -479,6 +479,7 @@ GEMwebpush (1.1.0)hkdf (~> 0.2)jwt (~> 2.0)+ webrick (1.7.0)websocket (1.2.9)xorcist (1.1.3)xpath (3.2.0)@@ -625,6 +626,7 @@ DEPENDENCIESwebdriverswebmockwebpush+ webrickxorcistyaml-lintdiff --git a/plugins/chat/spec/requests/chat_controller_spec.rb b/plugins/chat/spec/requests/chat_controller_spec.rbindex 3bb10269190..949c5608b2f 100644--- a/plugins/chat/spec/requests/chat_controller_spec.rb+++ b/plugins/chat/spec/requests/chat_controller_spec.rb@@ -1329,14 +1329,14 @@ RSpec.describe Chat::ChatController doit "ensures message's channel can be seen" doGuardian.any_instance.expects(:can_join_chat_channel?).with(channel)- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }endcontext "when the message doesn’t belong to the channel" dolet!(:message) { Fabricate(:chat_message) }it "returns a 404" do- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(404)end@@ -1346,18 +1346,18 @@ RSpec.describe Chat::ChatController dolet(:channel) { Fabricate(:category_channel) }it "ensures the user can access that category" do- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(200)expect(response.parsed_body["chat_messages"][0]["id"]).to eq(message.id)group = Fabricate(:group)chatable.update!(read_restricted: true)Fabricate(:category_group, group: group, category: chatable)- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(403)GroupUser.create!(user: user, group: group)- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(200)expect(response.parsed_body["chat_messages"][0]["id"]).to eq(message.id)end@@ -1367,11 +1367,11 @@ RSpec.describe Chat::ChatController dolet(:channel) { Fabricate(:direct_message_channel) }it "ensures the user can access that direct message channel" do- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(403)DirectMessageUser.create!(user: user, direct_message: chatable)- get "/chat/lookup/#{message.id}.json", { params: { chat_channel_id: channel.id } }+ get "/chat/lookup/#{message.id}.json", params: { chat_channel_id: channel.id }expect(response.status).to eq(200)expect(response.parsed_body["chat_messages"][0]["id"]).to eq(message.id)end