OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Remove StorageRequests
Marcello Rocha33d941b59560
diff --git a/modules/storages/app/common/storages/peripherals/storage_requests.rb b/modules/storages/app/common/storages/peripherals/storage_requests.rbdeleted file mode 100644index 89e8e4f52f7..00000000000--- a/modules/storages/app/common/storages/peripherals/storage_requests.rb+++ /dev/null@@ -1,37 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2023 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++--module Storages::Peripherals- class StorageRequests-- def self.call(storage:, operation:, **)- resource_type = operation.to_s.ends_with?('query') ? 'queries' : 'commands'- Registry.resolve("#{resource_type}.#{storage.short_provider_type}.#{operation}").call(storage:, **)- end- end-enddiff --git a/modules/storages/spec/common/peripherals/storage_requests_spec.rb b/modules/storages/spec/common/peripherals/registry_spec.rbsimilarity index 99%rename from modules/storages/spec/common/peripherals/storage_requests_spec.rbrename to modules/storages/spec/common/peripherals/registry_spec.rbindex 65494239fb9..8ce072548f5 100644--- a/modules/storages/spec/common/peripherals/storage_requests_spec.rb+++ b/modules/storages/spec/common/peripherals/registry_spec.rb@@ -30,7 +30,7 @@require 'spec_helper'-RSpec.describe Storages::Peripherals::StorageRequests, webmock: true do+RSpec.describe Storages::Peripherals::Registry, webmock: true dousing Storages::Peripherals::ServiceResultRefinementslet(:user) { create(:user) }@@ -38,7 +38,7 @@ RSpec.describe Storages::Peripherals::StorageRequests, webmock: true dolet(:origin_user_id) { 'admin' }let(:storage) { build(:nextcloud_storage, :as_automatically_managed, host: url, password: 'OpenProjectSecurePassword') }- subject(:registry) { Storages::Peripherals::Registry }+ subject(:registry) { described_class }context 'when requests depend on OAuth token' dolet(:token) do