lib/engine_assets/public_locator.rb in engine-assets-0.5.1 vs lib/engine_assets/public_locator.rb in engine-assets-0.6.0.pre1
- old
+ new
@@ -8,21 +8,11 @@
@paths ||= []
public_path = File.join(full_path, 'public')
if File.exist?(public_path)
- # TODO:
- # * spec me
- # * split me into separate implementations
-
- if defined?(Rails) && Rails::VERSION::MAJOR == 3
- # Rails 3
- Rails.configuration.middleware.use ::ActionDispatch::Static, public_path
- else
- # Rails 2
- paths << public_path
- end
+ paths << public_path
end
end
def locate(file_path)
full_paths = (paths || []).map { |base_path| File.join(base_path, file_path) }
@@ -32,13 +22,12 @@
end
nil
end
-
private
- def clear
- @paths = nil
- end
+ def clear
+ @paths = nil
+ end
end
end