From f555e97587bb38a6d191c081539c846caf376a9a Mon Sep 17 00:00:00 2001 From: Eric Guo Date: Mon, 26 Feb 2024 14:28:06 +0800 Subject: [PATCH] Manual fix. --- app/services/ldap/import_users_from_filter_service.rb | 2 +- db/migrate/tables/base.rb | 2 +- lib/open_project/plugins/acts_as_op_engine.rb | 2 +- lib/redmine/menu_manager/menu_helper.rb | 2 +- .../app/services/ldap_groups/synchronize_filter_service.rb | 2 +- .../recaptcha/app/controllers/recaptcha/request_controller.rb | 2 +- spec/support/pages/projects/index.rb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/services/ldap/import_users_from_filter_service.rb b/app/services/ldap/import_users_from_filter_service.rb index cb486f9290a8..c0d5e41aff36 100644 --- a/app/services/ldap/import_users_from_filter_service.rb +++ b/app/services/ldap/import_users_from_filter_service.rb @@ -23,7 +23,7 @@ def get_entries_from_filter(&block) base: ldap.base_dn, filter: filter & ldap.default_filter, attributes: ldap.search_attributes, - & + &block ) end end diff --git a/db/migrate/tables/base.rb b/db/migrate/tables/base.rb index 837d8df7c0c3..ca6fb7f52278 100644 --- a/db/migrate/tables/base.rb +++ b/db/migrate/tables/base.rb @@ -42,7 +42,7 @@ def self.id_options end def self.create_table(migration, &block) - migration.create_table table_name, **id_options.merge(bulk: true), & + migration.create_table table_name, **id_options.merge(bulk: true), &block end def self.table(_migration) diff --git a/lib/open_project/plugins/acts_as_op_engine.rb b/lib/open_project/plugins/acts_as_op_engine.rb index 6ba18b8fc727..fc9b165a3d22 100644 --- a/lib/open_project/plugins/acts_as_op_engine.rb +++ b/lib/open_project/plugins/acts_as_op_engine.rb @@ -258,7 +258,7 @@ def add_api_attribute(on:, # defined. If no cache key was defined before, the block's result makes up # the whole cache key. def add_api_representer_cache_key(*path, - &) + &block) mod = Module.new mod.send :define_method, :json_cache_key do if defined?(super) diff --git a/lib/redmine/menu_manager/menu_helper.rb b/lib/redmine/menu_manager/menu_helper.rb index dccbb3c811e8..0da7847e17be 100644 --- a/lib/redmine/menu_manager/menu_helper.rb +++ b/lib/redmine/menu_manager/menu_helper.rb @@ -108,7 +108,7 @@ def render_menu_dropdown(label_node, options = {}, &block) style: 'display:none', id: options[:drop_down_id], class: "op-app-menu--dropdown #{options.fetch(:drop_down_class, '')}", - &)) + &block)) end end diff --git a/modules/ldap_groups/app/services/ldap_groups/synchronize_filter_service.rb b/modules/ldap_groups/app/services/ldap_groups/synchronize_filter_service.rb index 271eb674e5a8..1d528f6e0f13 100644 --- a/modules/ldap_groups/app/services/ldap_groups/synchronize_filter_service.rb +++ b/modules/ldap_groups/app/services/ldap_groups/synchronize_filter_service.rb @@ -62,7 +62,7 @@ def search(filter, ldap_con, &block) base: filter.used_base_dn, filter: filter.parsed_filter_string, attributes: ['dn', filter.group_name_attribute], - & + &block ) end diff --git a/modules/recaptcha/app/controllers/recaptcha/request_controller.rb b/modules/recaptcha/app/controllers/recaptcha/request_controller.rb index 2f24d9fbbd34..c48000630032 100644 --- a/modules/recaptcha/app/controllers/recaptcha/request_controller.rb +++ b/modules/recaptcha/app/controllers/recaptcha/request_controller.rb @@ -48,7 +48,7 @@ def set_captcha_settings(&block) if OpenProject::Recaptcha::Configuration.use_hcaptcha? Recaptcha.with_configuration(verify_url: OpenProject::Recaptcha.hcaptcha_verify_url, api_server_url: OpenProject::Recaptcha.hcaptcha_api_server_url, - &) + &block) else yield end diff --git a/spec/support/pages/projects/index.rb b/spec/support/pages/projects/index.rb index b8a86b5018f9..d4f6b4176596 100644 --- a/spec/support/pages/projects/index.rb +++ b/spec/support/pages/projects/index.rb @@ -297,7 +297,7 @@ def got_to_page(page_number) end def within_table(&block) - within '#project-table', & + within '#project-table', &block end private