lib/spiderfw.rb in spiderfw-0.5.10 vs lib/spiderfw.rb in spiderfw-0.5.11

- old
+ new

@@ -378,11 +378,12 @@ end app = nil if (path[0].chr == '/') first_part = path[1..-1].split('/')[0] Spider.apps_by_path.each do |p, a| - if first_part == p + if path.index(p) == 1 # FIXME: breaks something + #if first_part == p app = a path = path[p.length+2..-1] break end end @@ -390,9 +391,10 @@ app = owner_class else app = owner_class.app if (owner_class && owner_class.app) end return Resource.new(cur_path+'/'+path, owner_class) if cur_path && File.exist?(cur_path+'/'+path) # !app + raise "Can't find owner app for resource #{path}" unless app search_locations = [["#{Spider.paths[:root]}/#{resource_rel_path}/#{app.relative_path}", @home]] if app.respond_to?("#{resource_type}_path") search_locations << [app.send("#{resource_type}_path"), app] else search_locations << [app.path+'/'+resource_rel_path, app]