Corrected with rubocop cop 'Style/For'.
This commit is contained in:
parent
7717f7fec7
commit
6a9aafac84
4 changed files with 6 additions and 8 deletions
|
@ -279,5 +279,3 @@ Style/AccessModifierIndentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Lint/Loop:
|
Lint/Loop:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
Style/For:
|
|
||||||
Enabled: false
|
|
||||||
|
|
|
@ -11,12 +11,12 @@ Zammad::Application.routes.draw do
|
||||||
# load routes from external files
|
# load routes from external files
|
||||||
dir = File.expand_path('../', __FILE__)
|
dir = File.expand_path('../', __FILE__)
|
||||||
files = Dir.glob( "#{dir}/routes/*.rb" )
|
files = Dir.glob( "#{dir}/routes/*.rb" )
|
||||||
for file in files
|
files.each { |file|
|
||||||
if Rails.configuration.cache_classes
|
if Rails.configuration.cache_classes
|
||||||
require file
|
require file
|
||||||
else
|
else
|
||||||
load file
|
load file
|
||||||
end
|
end
|
||||||
end
|
}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,10 +8,10 @@ module SessionHelper
|
||||||
# load collections to deliver from external files
|
# load collections to deliver from external files
|
||||||
dir = File.expand_path('../../', __FILE__)
|
dir = File.expand_path('../../', __FILE__)
|
||||||
files = Dir.glob( "#{dir}/app/controllers/sessions/collection_*.rb" )
|
files = Dir.glob( "#{dir}/app/controllers/sessions/collection_*.rb" )
|
||||||
for file in files
|
files.each { |file|
|
||||||
load file
|
load file
|
||||||
(default_collection, assets ) = ExtraCollection.session( default_collection, assets, user )
|
(default_collection, assets ) = ExtraCollection.session( default_collection, assets, user )
|
||||||
end
|
}
|
||||||
|
|
||||||
[default_collection, assets]
|
[default_collection, assets]
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Sessions::Backend::Collections
|
||||||
# load collections to deliver from external files
|
# load collections to deliver from external files
|
||||||
dir = File.expand_path('../../../../', __FILE__)
|
dir = File.expand_path('../../../../', __FILE__)
|
||||||
files = Dir.glob( "#{dir}/lib/sessions/backend/collections/*.rb" )
|
files = Dir.glob( "#{dir}/lib/sessions/backend/collections/*.rb" )
|
||||||
for file in files
|
files.each { |file|
|
||||||
file.gsub!("#{dir}/lib/", '')
|
file.gsub!("#{dir}/lib/", '')
|
||||||
file.gsub!(/\.rb$/, '')
|
file.gsub!(/\.rb$/, '')
|
||||||
next if file.classify == 'Sessions::Backend::Collections::Base'
|
next if file.classify == 'Sessions::Backend::Collections::Base'
|
||||||
|
@ -39,7 +39,7 @@ class Sessions::Backend::Collections
|
||||||
if backend
|
if backend
|
||||||
backends.push backend
|
backends.push backend
|
||||||
end
|
end
|
||||||
end
|
}
|
||||||
|
|
||||||
backends
|
backends
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue