Corrected with rubocop cop 'Style/For'.

This commit is contained in:
Thorsten Eckel 2015-05-05 12:17:52 +02:00
parent 7717f7fec7
commit 6a9aafac84
4 changed files with 6 additions and 8 deletions

View file

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

View file

@ -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

View file

@ -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

View file

@ -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