lib/jets/stack.rb in jets-1.1.5 vs lib/jets/stack.rb in jets-1.2.0
- old
+ new
@@ -1,7 +1,5 @@
-require 'active_support/concern'
-
module Jets
class Stack
autoload :Definition, 'jets/stack/definition' # Registration and definitions
autoload :Main, 'jets/stack/main'
autoload :Parameter, 'jets/stack/parameter'
@@ -73,10 +71,10 @@
end
end
def eager_load_shared_resources!
ActiveSupport::Dependencies.autoload_paths += ["#{Jets.root}app/shared/resources"]
- Dir.glob("#{Jets.root}app/shared/resources/*.rb").select do |path|
+ Dir.glob("#{Jets.root}app/shared/resources/**/*.rb").select do |path|
next if !File.file?(path) or path =~ %r{/javascript/} or path =~ %r{/views/}
class_name = path
.sub(/\.rb$/,'') # remove .rb
.sub(Jets.root.to_s,'') # remove ./