diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 4 | ||||
-rw-r--r-- | config/environment.rb | 2 | ||||
-rw-r--r-- | config/initializers/active_record_locking.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/config/application.rb b/config/application.rb index 97bc86b3e3a..0304f466734 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,4 +1,4 @@ -require File.expand_path('../boot', __FILE__) +require File.expand_path('boot', __dir__) require 'rails/all' @@ -211,7 +211,7 @@ module Gitlab next unless name.include?('namespace_project') define_method(name.sub('namespace_project', 'project')) do |project, *args| - send(name, project&.namespace, project, *args) # rubocop:disable GitlabSecurity/PublicSend + send(name, project&.namespace, project, *args) end end end diff --git a/config/environment.rb b/config/environment.rb index 487a4564b47..5d35937f7c6 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -4,7 +4,7 @@ if %w[1 true].include?(ENV["RAILS5"]) require_relative 'application' else - require File.expand_path('../application', __FILE__) + require File.expand_path('application', __dir__) end # Initialize the rails application diff --git a/config/initializers/active_record_locking.rb b/config/initializers/active_record_locking.rb index 0861544c5a4..21ff323927b 100644 --- a/config/initializers/active_record_locking.rb +++ b/config/initializers/active_record_locking.rb @@ -17,7 +17,7 @@ module ActiveRecord lock_col = self.class.locking_column - previous_lock_value = send(lock_col).to_i # rubocop:disable GitlabSecurity/PublicSend + previous_lock_value = send(lock_col).to_i # This line is added as a patch previous_lock_value = nil if previous_lock_value == '0' || previous_lock_value == 0 @@ -47,7 +47,7 @@ module ActiveRecord # If something went wrong, revert the version. rescue Exception - send(lock_col + '=', previous_lock_value) # rubocop:disable GitlabSecurity/PublicSend + send(lock_col + '=', previous_lock_value) raise end end |