Skip to content

Our project template for firing up new Iridesco projects

License

Notifications You must be signed in to change notification settings

davidd2k/template

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Template

Where Iridesco starts a project.

Installation

This is a fully-formed Rails application, used as a baseline for new Iridesco projects. Maybe you want to fork this? Update the following files appropriately:

environment.rb:

ExceptionNotifier.sender_address       = %("Template bug" <[email protected]>)
ExceptionNotifier.exception_recipients = %w([email protected] [email protected])

Also, at this time the restful_authentication plugin is here, but nothing has been generated.

Summary of contents

Auto-escaping HTML in Rails is a big ol’ pain. Rail Spikes’ Luke Francl wrote up a wondering description of the options in the sanitizing space. We decided to go with an über-paranoid outlook and coupled xss_terminate with cross_site_sniper. In Co-op we only needed to work around these wonderful plugins for a couple instances of attribute access. Not bad at all for the protection these plugins provide.

Currently we are still using basic exception notification rather than 3rd-party services like Hoptoad or Exceptional. We will be looking into them, however…

We find technoweenie’s classic authentication plugin to be a sufficient starting point for the apps we create. (Note: for now you’ll have to generate the authentication logic yourself.)

The designers at Iridesco love Sass for the power it brings to their stylesheets. Easy variable definition alone is worth the price of admission, which incidentally is free. We don’t use Haml in our applications, mainly to avoid inconsistency between apps. We don’t find the cost of learning to be offset by a big enough efficiency gain.

An excellent gem that helps us manage our scheduled jobs across our apps, directly in Ruby. This offers us source control of our scheduling and unification of that little bit of code that previously escaped our repository.

Paperclip is a refreshingly easy way to attach a file to an object, period. It also provides the means (with some enhancements we added) to strip out exif data from your avatars via the convert_options capability and ImageMagick’s “-strip”. Really, do you need to be providing bandwidth for exif data on tiny, resized avatars?

I don’t know of anyone else using this little gem, but we at Iridesco love it. Provides a lot more contextual information when your tests fail.

We use flexmock in Harvest, but we now much prefer the syntax of mocha. Granted, we at Iridesco mock as little as possible, but when we do it’s mocha time.

For testing RJS code.

This is Iridesco’s first open source plugin, and we find it quite useful. Harvest, as you can imagine, is a very time-sensitive application. Same goes for Co-op. Sometimes we need to test edge cases and this really helps us get it done.

Another Iridesco plugin. A handy way to gzip compress response bodies automatically with each request. This was taken from an Agile Web Development with Rails example and extended to allow easy skipping of the compression algorithm.

application_helper.rb

We repeatedly use helpers in each application. But they just don’t feel right in a plugin.

config/initializers

We have initializers for: date formats, adding an #api? method to a request, and a validate_email validator. A couple enhancements close to our hearts:

  • concerned_with (nice way to clean up a complex model)

  • disable_mass_assignment (making attributes mass assignable should not be the default behavior of Rails)

config/session.secret

We use a session.secret file to store the session secret in production. See config/environment.rb for details.

Other things we use

As the project dictates, we also bring in the following plugins and gems:

Things we have tried

  • shoulda (love contexts, but we’re not sold on efficiency gains)

  • flexmock (we just prefer the syntax of mocha)

Credits

Template is maintained and funded by Iridesco.

License

Copyright © 2009 Iridesco. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.

About

Our project template for firing up new Iridesco projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published