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
Linting
Oliver Günther6e5b92c45728
diff --git a/config/initializers/grape.rb b/config/initializers/grape.rbindex d3b68e29b2f..bad5b6e72db 100644--- a/config/initializers/grape.rb+++ b/config/initializers/grape.rb@@ -26,9 +26,11 @@# See COPYRIGHT and LICENSE files for more details.#++Rails.application.reloader.to_prepare do+ # rubocop:disable Lint/ConstantDefinitionInBlockmodule Grapeclass Endpointinclude ::API::V3::Utilities::PathHelperendend+ # rubocop:enable Lint/ConstantDefinitionInBlockenddiff --git a/config/initializers/rack_timeout.rb b/config/initializers/rack_timeout.rbindex 947c035b2fd..9d93c6a8b7f 100644--- a/config/initializers/rack_timeout.rb+++ b/config/initializers/rack_timeout.rb@@ -30,6 +30,7 @@ if OpenProject::Configuration.web_workers >= 2# report the generic internal server error too as it doesn't# add any more information. Even worse, it's not immediately# clear that the two reports are related.+ # rubocop:disable Lint/ConstantDefinitionInBlockmodule SuppressInternalErrorReportOnTimeoutdef op_handle_error(message_or_exception, context = {})return if request && request.env[Rack::Timeout::ENV_INFO_KEY].try(:state) == :timed_out@@ -40,6 +41,7 @@ if OpenProject::Configuration.web_workers >= 2OpenProjectErrorHelper.prepend SuppressInternalErrorReportOnTimeoutend+ # rubocop:enable Lint/ConstantDefinitionInBlockelseRails.logger.debug { "Not enabling Rack::Timeout since we are not running in cluster mode with at least 2 workers" }enddiff --git a/config/initializers/secure_headers.rb b/config/initializers/secure_headers.rbindex c3caf8765d8..99b259db0a5 100644--- a/config/initializers/secure_headers.rb+++ b/config/initializers/secure_headers.rb@@ -1,3 +1,4 @@+# rubocop:disable Lint/PercentStringArrayRails.application.reloader.to_prepare doSecureHeaders::Configuration.default do |config|config.cookies = {@@ -42,7 +43,7 @@ Rails.application.reloader.to_prepare doscript_src = assets_src# Allow unsafe-eval for rack-mini-profiler- if Rails.env.development? && ENV['OPENPROJECT_RACK_PROFILER_ENABLED']+ if Rails.env.development? && ENV.fetch('OPENPROJECT_RACK_PROFILER_ENABLED', false)script_src += %w('unsafe-eval')end@@ -75,3 +76,4 @@ Rails.application.reloader.to_prepare do}endend+# rubocop:enable Lint/PercentStringArraydiff --git a/config/initializers/warden.rb b/config/initializers/warden.rbindex efc05c9bf64..53762fad9c2 100644--- a/config/initializers/warden.rb+++ b/config/initializers/warden.rb@@ -1,13 +1,13 @@Rails.application.config.after_initialize do- WS = OpenProject::Authentication::Strategies::Warden+ namespace = OpenProject::Authentication::Strategies::Wardenstrategies = [- [:basic_auth_failure, WS::BasicAuthFailure, 'Basic'],- [:global_basic_auth, WS::GlobalBasicAuth, 'Basic'],- [:user_basic_auth, WS::UserBasicAuth, 'Basic'],- [:oauth, WS::DoorkeeperOAuth, 'OAuth'],- [:anonymous_fallback, WS::AnonymousFallback, 'Basic'],- [:session, WS::Session, 'Session']+ [:basic_auth_failure, namespace::BasicAuthFailure, 'Basic'],+ [:global_basic_auth, namespace::GlobalBasicAuth, 'Basic'],+ [:user_basic_auth, namespace::UserBasicAuth, 'Basic'],+ [:oauth, namespace::DoorkeeperOAuth, 'OAuth'],+ [:anonymous_fallback, namespace::AnonymousFallback, 'Basic'],+ [:session, namespace::Session, 'Session']]strategies.each do |name, clazz, auth_scheme|diff --git a/modules/bim/lib/open_project/bim/engine.rb b/modules/bim/lib/open_project/bim/engine.rbindex 878a9f2780d..ff9cfb1c2e9 100644--- a/modules/bim/lib/open_project/bim/engine.rb+++ b/modules/bim/lib/open_project/bim/engine.rb@@ -199,11 +199,12 @@ module OpenProject::BimMime::Type.register "application/octet-stream", :bcfzip unless Mime::Type.lookup_by_extension(:bcfzip)end+ # rubocop:disable Naming/VariableNumberconfig.to_prepare doDoorkeeper.configuration.scopes.add(:bcf_v2_1)module OpenProject::Authentication::Scope- BCF_V2_1 = :bcf_v2_1+ BCF_V2_1 = :bcf_v2_1 # rubocop:disable Lint/ConstantDefinitionInBlockendOpenProject::Authentication.update_strategies(OpenProject::Authentication::Scope::BCF_V2_1,@@ -211,6 +212,7 @@ module OpenProject::Bim%i[oauth session]endend+ # rubocop:enable Naming/VariableNumberconfig.to_prepare do::Exports::Register.register do