public
Description: Collective Idea's Awesomeness. A collection of useful Rails bits and pieces.
Clone URL: git://github.com/collectiveidea/awesomeness.git
Search Repo:
Click here to lend your support to: awesomeness and make a donation at www.pledgie.com !
name age message
folder README Sun Apr 27 14:16:47 -0700 2008 updated docs [brandon]
folder Rakefile Tue Mar 27 20:26:19 -0700 2007 Moved rake task to where it belongs [danielmorrison]
folder generators/ Sun Jul 15 05:00:54 -0700 2007 added generators for some default deployment co... [brandon]
folder init.rb Fri Sep 14 14:20:29 -0700 2007 cap 2 fixes and general cleanup [brandon]
folder install.rb Tue May 06 01:25:42 -0700 2008 Fixed bug introduced in 5290ab9c8f11e8efeb88dff... [Narnach]
folder lib/ Tue Jul 01 11:41:24 -0700 2008 fixing a math bug [bryckbost]
folder recipes/ Thu May 01 06:57:42 -0700 2008 renamed backup:clone to backup:mirror [brandon]
folder tasks/ Sun Apr 27 14:49:08 -0700 2008 remove unused schema task [brandon]
folder test/ Tue Jul 01 11:41:24 -0700 2008 fixing a math bug [bryckbost]
folder uninstall.rb Wed Feb 28 17:17:16 -0800 2007 Making awesomeness happen [danielmorrison]
README
Collective Idea's Awesomeness
=============================

A collection of stuff that we use often, but not generic enough to go in another plugin.

If you've stumbled across this and love/hate it, let us know!

== Core Extensions

* Object#tap (http://moonbase.rydia.net/mental/blog/programming/eavesdropping-on-expressions)

* String#widont to make typography nicer (http://shauninman.com/archive/2006/08/22/widont_wordpress_plugin)

* Array#uniq with a block

  >> %w(the cow jumped over the moon).uniq {|s| s.length }
  => ["the", "jumped", "over"]

* Round floats to the nearest x

  >> 5.38475.round(0.5)
  => 5.5

* Hash goodies

  >> {:a => [1,3,4], :b => [2,5]}.without(:a => 1)
  => {:a => [3,4], :b => [2,5]}

  >> {:a => "", :b => nil, :c => 1}.compact
  => {:c => 1}

* And more…

== Rails Helpers

* Unicode TextHelper additions that change the default truncate & excerpt string to an elipsis (…) instead of just 
three periods (...)

* Add widont to textilize methods

* Transparent removal of trailing slashes in URLs

== Rake Tasks

== Capistrano Recipes

* Use :remote_cache by default

* Disable and enable web during restarts

* Run deploy:cleanup after deploys

* Backups