Browse Source

Corrected with rubocop cop 'Style/For'.

Thorsten Eckel 9 years ago
parent
commit
6a9aafac84
4 changed files with 6 additions and 8 deletions
  1. 0 2
      .rubocop.yml
  2. 2 2
      config/routes.rb
  3. 2 2
      lib/session_helper.rb
  4. 2 2
      lib/sessions/backend/collections.rb

+ 0 - 2
.rubocop.yml

@@ -279,5 +279,3 @@ Style/AccessModifierIndentation:
   Enabled: false
 Lint/Loop:
   Enabled: false
-Style/For:
-  Enabled: false

+ 2 - 2
config/routes.rb

@@ -11,12 +11,12 @@ Zammad::Application.routes.draw do
   # load routes from external files
   dir = File.expand_path('../', __FILE__)
   files = Dir.glob( "#{dir}/routes/*.rb" )
-  for file in files
+  files.each { |file|
     if Rails.configuration.cache_classes
       require file
     else
       load file
     end
-  end
+  }
 
 end

+ 2 - 2
lib/session_helper.rb

@@ -8,10 +8,10 @@ module SessionHelper
     # load collections to deliver from external files
     dir = File.expand_path('../../', __FILE__)
     files = Dir.glob( "#{dir}/app/controllers/sessions/collection_*.rb" )
-    for file in files
+    files.each { |file|
       load file
       (default_collection, assets ) = ExtraCollection.session( default_collection, assets, user )
-    end
+    }
 
     [default_collection, assets]
   end

+ 2 - 2
lib/sessions/backend/collections.rb

@@ -29,7 +29,7 @@ class Sessions::Backend::Collections
     # load collections to deliver from external files
     dir = File.expand_path('../../../../', __FILE__)
     files = Dir.glob( "#{dir}/lib/sessions/backend/collections/*.rb" )
-    for file in files
+    files.each { |file|
       file.gsub!("#{dir}/lib/", '')
       file.gsub!(/\.rb$/, '')
       next if file.classify == 'Sessions::Backend::Collections::Base'
@@ -39,7 +39,7 @@ class Sessions::Backend::Collections
       if backend
         backends.push backend
       end
-    end
+    }
 
     backends
   end