Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changed loops class loading code to work with non-stadard loop names

  • Loading branch information...
commit 7af4f549f6c0424cfb6a80dcc051b90adbc783f0 1 parent 343d295
@kovyrin kovyrin authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/loops/engine.rb
View
3  lib/loops/engine.rb
@@ -97,8 +97,9 @@ def load_loop_class(name, config)
return false
end
- klass_name = "#{loop_name}_loop".capitalize.gsub(/_(.)/) { $1.upcase }
+ klass_name = "#{loop_name}_loop".split('/').map { |x| x.capitalize.gsub(/_(.)/) { $1.upcase } }.join('::')
klass = Object.const_get(klass_name) rescue nil
+ klass = klass_name.constantize if klass_name.respond_to?(:constantize) && !klass
unless klass
error "Can't find class: #{klass_name}. Worker #{name} won't be started!"
Please sign in to comment.
Something went wrong with that request. Please try again.