Skip to content

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

linting

ulferts0bab7839b14c
diff --git a/app/services/api/parse_resource_params_service.rb b/app/services/api/parse_resource_params_service.rb
index 12086156ead..c781a654782 100644
--- a/app/services/api/parse_resource_params_service.rb
+++ b/app/services/api/parse_resource_params_service.rb
@@ -58,7 +58,7 @@ module API
private
- def deduce_representer(model)
+ def deduce_representer(_model)
raise NotImplementedError
end
diff --git a/lib/api/utilities/endpoints/bodied.rb b/lib/api/utilities/endpoints/bodied.rb
index 839077ea61b..30c869b12fe 100644
--- a/lib/api/utilities/endpoints/bodied.rb
+++ b/lib/api/utilities/endpoints/bodied.rb
@@ -141,7 +141,6 @@ module API
def deduce_parse_representer
raise NotImplementedError
- #"::API::V3::#{deduce_api_namespace}::#{api_name}PayloadRepresenter".constantize
end
def deduce_parse_service
diff --git a/lib/api/utilities/endpoints/modify.rb b/lib/api/utilities/endpoints/modify.rb
index 4eea40f9d2a..2d410854ad9 100644
--- a/lib/api/utilities/endpoints/modify.rb
+++ b/lib/api/utilities/endpoints/modify.rb
@@ -38,7 +38,7 @@ module API
private
- def present_success(current_user, call)
+ def present_success(_current_user, _call)
raise NotImplementedError
end
@@ -79,10 +79,6 @@ module API
"::#{deduce_backend_namespace}::#{update_or_create}Service".constantize
end
- #def deduce_render_representer
- # "::API::V3::#{deduce_api_namespace}::#{api_name}Representer".constantize
- #end
-
def deduce_process_contract
nil
end
diff --git a/lib/api/v3/utilities/endpoints/index.rb b/lib/api/v3/utilities/endpoints/index.rb
index f39ae751e9d..67b7e7339fd 100644
--- a/lib/api/v3/utilities/endpoints/index.rb
+++ b/lib/api/v3/utilities/endpoints/index.rb
@@ -33,16 +33,6 @@ module API
class Index < API::Utilities::Endpoints::Index
include ::API::Utilities::PageSizeHelper
- def initialize(model:,
- api_name: model.name.demodulize,
- scope: nil,
- render_representer: nil)
- self.model = model_class(model)
- self.scope = scope
- self.api_name = api_name
- self.render_representer = render_representer || deduce_render_representer
- end
-
def mount
index = self
diff --git a/modules/bcf/app/controllers/bcf/api/v2_1/endpoints/update.rb b/modules/bcf/app/controllers/bcf/api/v2_1/endpoints/update.rb
index 81e9e886743..537270d9499 100644
--- a/modules/bcf/app/controllers/bcf/api/v2_1/endpoints/update.rb
+++ b/modules/bcf/app/controllers/bcf/api/v2_1/endpoints/update.rb
@@ -30,7 +30,7 @@
module Bcf::API::V2_1::Endpoints
class Update < API::Utilities::Endpoints::Update
- def present_success(current_user, call)
+ def present_success(_current_user, call)
render_representer
.new(call.result)
end
diff --git a/modules/bcf/app/controllers/bcf/api/v2_1/projects_api.rb b/modules/bcf/app/controllers/bcf/api/v2_1/projects_api.rb
index 20fb68aefd1..26c5d7ec120 100644
--- a/modules/bcf/app/controllers/bcf/api/v2_1/projects_api.rb
+++ b/modules/bcf/app/controllers/bcf/api/v2_1/projects_api.rb
@@ -54,4 +54,4 @@ module Bcf::API::V2_1
end
end
end
-end
\ No newline at end of file
+end
diff --git a/modules/bcf/spec/features/bcf_api_authorization.rb b/modules/bcf/spec/features/bcf_api_authorization.rb
index 26c29ea4f0e..55d76f8260c 100644
--- a/modules/bcf/spec/features/bcf_api_authorization.rb
+++ b/modules/bcf/spec/features/bcf_api_authorization.rb
@@ -63,8 +63,10 @@ describe 'authorization for BCF api', type: :feature, js: true do
expect(page).to have_selector('.flash.notice', text: 'Successful creation.')
- expect(page).to have_selector('.attributes-key-value--key', text: 'Client ID')
- expect(page).to have_selector('.attributes-key-value--value', text: "urn:ietf:wg:oauth:2.0:oob\nhttps://localhost/my/callback")
+ expect(page).to have_selector('.attributes-key-value--key',
+ text: 'Client ID')
+ expect(page).to have_selector('.attributes-key-value--value',
+ text: "urn:ietf:wg:oauth:2.0:oob\nhttps://localhost/my/callback")
# Should print secret on initial visit
expect(page).to have_selector('.attributes-key-value--key', text: 'Client secret')
diff --git a/modules/bcf/spec/requests/api/bcf/v2_1/shared_responses.rb b/modules/bcf/spec/requests/api/bcf/v2_1/shared_responses.rb
index bd671ab8234..63b5257a5d3 100644
--- a/modules/bcf/spec/requests/api/bcf/v2_1/shared_responses.rb
+++ b/modules/bcf/spec/requests/api/bcf/v2_1/shared_responses.rb
@@ -105,4 +105,3 @@ shared_examples_for 'bcf api unprocessable response' do
.to eql 'application/json; charset=utf-8'
end
end
-