-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Compass-Fail wiki,
Just a stupid stub sinatra/rack app using haml/sass and compass to demonstrate how compass was failing due to outdated docs and or design decisions made by the sinatra team when releasing 0.9×. Specifically :sass => options still work fine for a top level sinatra app but fail when using a subclassed sinatra app (Sinatra::Base) due to the requirement of passing a sass search path from compass. The strange thing was that it works for top level apps while complaining but fails for Sinatra::Base subclassed apps without a whisper or peep. Probably should be the reverse when doing re-design (hint hint sinatra guys).
Anyway I just turned it into a stub program that demonstrates Sinatra::Base apps using Haml/Sass and Compass – a very very cool combination of tools for small apps or web services.
I will add some comments for the newbie users of this combination of ruby junk but here it is…
cssnew.rb = traditional top level sinatra app with self-running mongrel server
cssmod.rb = same app in a module and subclassed from Sinatra:Base
css.ru = rackup configuration file that can be used with rackup, thin, etc demonstrating url mapping.
views/*.haml haml templates using partials/layouts
views/stylesheets = sass / compass stylesheets that use sass and the compass objects for functionality and dynamic rendering (you will be fine if you use sass compass to create the css as well because the thin/mongrel/etc will just pickup the static css files and the app will never see the css request, if they are not there the app dynamically renders them.
Enjoy – I have no idea why there is not a whole lot on this combination of tools floating around out there = fantastic when you do not need a full blown rails framework or just need some XML or JSON services.
Peripherally hpricot and rest_client gems are also used in the /dorss routes just for fun.
RB