Browse Source

Maintenance: Update dependency rubocop-performance to v1.20.0

renovatebot 1 year ago
parent
commit
0758a94304

+ 3 - 3
Gemfile.lock

@@ -560,9 +560,9 @@ GEM
       activesupport
       rubocop
       rubocop-rspec
-    rubocop-performance (1.19.1)
-      rubocop (>= 1.7.0, < 2.0)
-      rubocop-ast (>= 0.4.0)
+    rubocop-performance (1.20.0)
+      rubocop (>= 1.48.1, < 2.0)
+      rubocop-ast (>= 1.30.0, < 2.0)
     rubocop-rails (2.23.0)
       activesupport (>= 4.2.0)
       rack (>= 1.1)

+ 1 - 1
app/controllers/concerns/has_publishing.rb

@@ -5,7 +5,7 @@ module HasPublishing
 
   included do
     CanBePublished::StateMachine.aasm.events.each do |event|
-      define_method "has_publishing_#{event.name}" do
+      define_method :"has_publishing_#{event.name}" do
         object = klass.find params[:id]
         object.can_be_published_aasm.aasm.fire! event.name, current_user
 

+ 1 - 1
app/helpers/knowledge_base_helper.rb

@@ -4,7 +4,7 @@ module KnowledgeBaseHelper
   def effective_layout_name(knowledge_base, object)
     layout_prefix = object.present? ? :category : :homepage
 
-    knowledge_base.send("#{layout_prefix}_layout")
+    knowledge_base.send(:"#{layout_prefix}_layout")
   end
 
   def custom_path_if_needed(path, knowledge_base, full: false)

+ 1 - 1
app/models/application_model/can_assets.rb

@@ -205,7 +205,7 @@ Compiles an assets hash for given items
 
     def reduce(items, data = {}, suffix = nil)
       items.reduce(data) do |memo, elem|
-        method_name = if suffix.present? && elem.respond_to?("assets_#{suffix}")
+        method_name = if suffix.present? && elem.respond_to?(:"assets_#{suffix}")
                         "assets_#{suffix}"
                       else
                         :assets

+ 2 - 2
app/models/application_model/can_associations.rb

@@ -60,7 +60,7 @@ returns
 
       next if Array(list).sort == Array(send(real_ids)).sort
 
-      send("#{real_ids}=", list)
+      send(:"#{real_ids}=", list)
       self.updated_at = Time.zone.now
     end
 
@@ -109,7 +109,7 @@ returns
 
       next if Array(list).sort == Array(send(real_ids)).sort
 
-      send("#{real_ids}=", list)
+      send(:"#{real_ids}=", list)
       self.updated_at = Time.zone.now
     end
   end

+ 2 - 2
app/models/concerns/can_be_published.rb

@@ -91,9 +91,9 @@ module CanBePublished
   end
 
   def update_user_reference_item(scope_name)
-    return if !send("#{scope_name}_at_changed?")
+    return if !send(:"#{scope_name}_at_changed?")
 
-    send("#{scope_name}_by_id=", UserInfo.current_user_id)
+    send(:"#{scope_name}_by_id=", UserInfo.current_user_id)
   end
 
   def archived_after_internal

+ 1 - 1
app/models/concerns/can_perform_changes.rb

@@ -104,7 +104,7 @@ module CanPerformChanges
 
       action = nil
       action_checks.each do |key|
-        action = send("#{key}_action", object_name, object_key, action_value, actions)
+        action = send(:"#{key}_action", object_name, object_key, action_value, actions)
         break if action
       end
 

+ 3 - 3
app/models/concerns/has_rich_text.rb

@@ -70,7 +70,7 @@ Checks if file is used inline
 
     (parsed, attachments_inline) = HtmlSanitizer.replace_inline_images(parsed, image_prefix)
 
-    send("#{attr}=", parsed)
+    send(:"#{attr}=", parsed)
 
     self.has_rich_text_attachments_cache ||= []
     self.has_rich_text_attachments_cache += attachments_inline
@@ -94,7 +94,7 @@ Checks if file is used inline
     attrs = super
 
     self.class.has_rich_text_attributes.each do |attr|
-      attrs[attr.to_s] = send("#{attr}_with_urls")
+      attrs[attr.to_s] = send(:"#{attr}_with_urls")
     end
 
     attrs
@@ -125,7 +125,7 @@ Checks if file is used inline
       (self.has_rich_text_attributes += attrs.map(&:to_sym)).freeze
 
       attrs.each do |attr|
-        define_method "#{attr}_with_urls" do
+        define_method :"#{attr}_with_urls" do
           self.class.has_rich_text_insert_urls(self, attr)
         end
       end

+ 1 - 1
app/models/object_manager/attribute.rb

@@ -999,7 +999,7 @@ is certain attribute used by triggers, overviews or schedulers
   end
 
   def local_data_option=(val)
-    send("#{local_data_attr}=", val)
+    send(:"#{local_data_attr}=", val)
   end
 
   def data_option_maxlength_check

+ 1 - 1
app/models/object_manager/attribute/set_defaults.rb

@@ -15,7 +15,7 @@ class ObjectManager
         method_name = "#{attr}="
 
         return if !record.respond_to? method_name
-        return if record.send("#{attr}_came_from_user?")
+        return if record.send(:"#{attr}_came_from_user?")
 
         record.send method_name, build_value(config)
       end

Some files were not shown because too many files changed in this diff