Pivotal Labs

Main menu

Skip to primary content
Skip to secondary content
  • About
  • Case Studies
  • Team
    • Executives
    • Locations
      • San Francisco (HQ)
      • Boston
      • Boulder
      • Denver
      • London
      • Los Angeles
      • New York
  • Community
    • Blogs
    • Tech Talks
    • Events
  • Careers
    • Lifestyle
    • Principles & Practices
    • Benefits
    • FAQ
    • Apply
  • Tools
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

Standup 03/26/2007

Joe Moore
Monday, March 26, 2007

Interesting Things

  • Running initialization blocks per environment
    • Set an array in environment.rb to capture your procs that will do your post-initialization: POST_LOAD_BLOCKS = []
    • Now, in your environment-specific initialization files, you can do stuff like:
    • Then, back in environment.rb, after your environment has been initialized, loop over your array:
<code>
POST_LOAD_BLOCKS << Proc.new {
  a.runFoo
  b.runBar
}
</code>

Paydirt! These procs you’re appending to the POST_LOAD_BLOCKS array will get executed after your environment is completely initialized.

  • Use silence_warnings to (you guessed it!) ‘silence’ warnings in Ruby – only pros should use it, and only when its clear exactly what you are doing!

Ask for Help

  • None need today

Total Stand-up Meeting Time: ?

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

One comment

  1. Brian Takita says:

    Rails::Initializer has a method named after_initialize that takes a block. Unfortunately, it can only take one callback, so it can’t be used multiple times without special handling.

    December 12, 2007 at 11:50 pm

Add New Comment Cancel reply

Your email address will not be published.

Joe Moore

Joe Moore
New York

Recent Posts

  • How We Use tmux for Remote Pair Programming
  • Integrating Remote Developers: Intuitive, Flexible Video Conferencing
  • Pair Programming Matrix
Subscribe to Joe's Feed

Author Topics

agile (117)
pair programming (6)
remote (4)
remote pair programming (3)
tmux (1)
android (10)
mobile (10)
robolectric (4)
java (4)
c2dm (2)
testing (8)
apple (1)
ipad (1)
pivotal tracker (6)
sf.tug (2)
desert (2)
ruby on rails (13)
javascript (2)
capistrano (1)
palmpre (1)
active record (3)
activerecord (6)
mysql (1)
rubymine (1)
fun (4)
acts_as_fu (1)
rspec (2)
xp (1)
flash (1)
  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • Tools
  • Contact
  • Labs
  • Events

Contact Us

contact@pivotallabs.com
+1 415-77-PIVOT
TwitterLinkedInFacebook

Pivotal Tracker

Tracker is the award-winning agile project management tool that enables real-time collaboration around a shared, prioritized backlog.
Visit pivotaltracker.com >