Sam Pierson's blog



Sam PiersonSam Pierson
Standup 8/19/2010: Bundler and RVM Gemsets, Rails 3 and JQuery, Why Day
edit Posted by Sam Pierson on Thursday August 19, 2010 at 10:03AM

Interesting

  • Bundler and RVM Gemsets work! For a while now, Bundler has been putting gems in the system gems location (instead of a private folder as it did previously). This means that it now works well with RVM Gemsets. Use It.
  • Rails 3 & JQuery: Someone has written a nice generator that will unplug Prototype from Rails 3 and install JQuery.
  • Ruby 1.9.2 was released yesterday.
  • Today is international Why Day, commemorating the day that Why the Lucky Stiff disappeared from the online community. Interestingly August 19th is also the day that 3 witches where put on trial in Samlesbury, England in 1612 and that 5 witches where executed in Salem, Massachusetts in 1692. Coincidence? I think not.

Sam PiersonSam Pierson
Standup 8/18/2010: Time#to_json in milliseconds, Encoded vs. encrypted Session Cookies
edit Posted by Sam Pierson on Wednesday August 18, 2010 at 09:11AM

Interesting

  • Make Ruby Time#to_json always return time in milliseconds: It turns out that while Firefox and Chrome can, Safari cannot parse the default time format that Time#to_json produces. The team decided to override Time#as_json to return an integer number of milliseconds, which to_json will then render into a string (JavaScript can easily work with number-of-milliseconds-since-the-start-of-the-epoch).
  • A pivot wanted to remind everyone that in Rails 2.x, session cookies are not encrypted. Reassuringly, all present were already aware of this. Session cookies are Base64 encoded, and if you ever need to take a look at their contents, here's how. If you want to encrypt your session cookies, there are Rails plugins available for that purpose.

Sam PiersonSam Pierson
Standup 8/17/2010: RubyMine shortcuts, client visible Cucumber results
edit Posted by Sam Pierson on Tuesday August 17, 2010 at 09:23AM

Help

  • RubyMine Keyboard Shortcuts:

    • How do I move from one side of a split editor window to the other side? Answer: Ctrl-Tab.
    • So how do I figure this out for myself? Helpful-Non-Answers: Cmd-Shift-A pulls up a search box that you can type in commands (e.g. "move") and get suggestions. Preferences -> Keymap has an even better search box, and also a reverse-search (click the funnel next to the search box) that lets you type in a keystroke and see what command it is. Of course, unless you know that the thing you need is called the "Switcher", you're still not going to find out. Sometimes you just have to resort to interacting with another human (let's call it "using the meat-net"). Company wide standups FTW.
  • How do I make the results of our integration tests (e.g. using cucumber) easily visible to a non-technical product owner by putting them on a web-page, a là Fit? One answer: use the --format html option, capture the output and copy to a web server. One project also has a url that a client can visit that will cause the cucumber tests to be run.