Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

quick conversion of the README to textile

  • Loading branch information...
commit a7713566346fa8e051f9a15b4f3acb27551b0c9b 1 parent 7b73de3
@justinfrench authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 README.rdoc → README.textile
18 README.rdoc → README.textile
@@ -1,11 +1,11 @@
+h1. Publicious
It's a plugin for plugins. It allows plugin engine[] developers to supply image, javascript and stylesheet assets in a public directory inside their plugin that "just work" without having to copy those assets over to the app's main public directory with rake tasks or installation scripts, which is stupid.
In short, it responds to "missing" asset URLs (like /stylesheets/foo.css, /images/foo.png, /javascripts/foo.js) when the web server can't find the file in the public directory, and tries to find a matching file in your plugins and pass that back to the browser through Rails.
+h2. Example
Let's assume you have the following plugins installed:
@@ -34,24 +34,24 @@ As soon as a matching file is found, it's passed back to the browser with the co
It works for plugins and gem plugins. It works for the following URLs:
-* /images/*
-* /stylesheets/*
-* /javascripts/*
+* @/images/*@
+* @/stylesheets/*@
+* @/javascripts/*@
One day I'll make it configurable for other assets, but in the meantime it's easy to hack/fork.
+h2. Caveats
Publicious leverages the view_paths array used by Rails plugins that supply their own views. Rails plugins and gems are only added to the view_paths array automatically if there's an app/views directory inside the plugin. If you're supplying public assets, chances are pretty good you're supplying views too, so that probably isn't a big deal.
-==Isn't it inefficient?
+h2. Isn't it inefficient?
Yes, it's probably inefficient to go looking through the filesystem and pass the asset back through a Rails request over and over, but this problem should be solved with caching and appropriate response headers, not by copying files around through rake tasks and installer scripts.
-==There's Still Plenty To Do!
+h2. There's Still Plenty To Do!
I wrote this on the train this morning as a proof of concept, so there's a long list:
@@ -62,6 +62,6 @@ I wrote this on the train this morning as a proof of concept, so there's a long
I actually want to see this in Rails core, so help me make it awesome!
+h2. Etc
Publicious is Copyright (c) 2009 Justin French, released under the MIT license. Your feedback, forkings and contributions are greatly welcomed. Many thanks to Daniel Neighman (hassox) for his help converting Publicious to Rack middleware rather than a regular Rails routing and controller stack.
Please sign in to comment.
Something went wrong with that request. Please try again.