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

WWDC && More

Wiley Kestner
Friday, June 15, 2012

Helps

  • Standup is back in the Lounge today

Hang on folks, we’re iterating again…

  • Recommendations when writing a migration

This is in regards to a migration which involves a large amount of models.

One option is to clone the models you care about (into a different directory).

Another option is to do the schema change and the data migration as a rake task that is unit testable.

It depends whether this is a one-time event or if it’s a boundary you’re going to cross back-and-forth.

Interestings

  • JSON Deep Clone in 1 line

def JSON.deep(object)
JSON.parse(object.to_json)
end

Events

  • Yoga @ 6p – all welcome
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Pairing blog posts (Wednesday && Thursday)

Wiley Kestner
Thursday, June 14, 2012

Helps

  • WED: Packaging a Rails app

A client needs to create a packaged version of their Rails app which can be installed on a machine that does not have internet access nor root access. Any recommendations for how to build a portable ruby, with gems? JRuby? Tokaido?

  • WED: Add a banner to jasmine runner

We have multiple jasmine test suites that we need to switch once in a while but sometimes we run the wrong suite by mistake. Is there a way to have a banner to identify which jasmine suite is running? Like having the project’s name on it?

  • WED: Patience with growth, esp Tuesday lunch
  • THUR: Jasmine!!?

PLEASE ROLL THIS FORWARD TO WEDNESDAY’S WHITEBOARD.

We wrote a Jasmine matcher that returned an object (or undefined) expecting the truth-iness of that value to determine whether the matcher succeeded.

When running in Chrome, that was fine. But when we ran headless via chromedriver it resulting in the following error:

Failure/Error: fail out unless spec_results['result'] == 'passed'
RuntimeError:
  TypeError: Converting circular structure to JSON

Changing our matcher’s return value to !!object (making it true/false) fixed it.

WHY!!?

  • THUR: Force download dialog on opening file in development

We’re using thin/rack as a rails dev server. We want to force the browser to open a download dialog for certain file types (.txt) that it wants to open and display itself. We’ve found that we need to set "Content-Disposition: attachment" in the headers, but how do we set the headers in thin/rack? We don’t serve the files through Rails.

Interestings

  • WED: We have a GIANT thank you card for Frederika, it is with HR if you would like to sign it
  • WED: Paperclip …#url + :filesystem != URL

Using the :filesystem storage option in Paperclip, the #url method returns a relative path, not a url. I consider this false advertising, but that’s out of my control. If you change the :url option to include a host, e.g. http://localhost/, you must also edit :path, otherwise the default :path (where :filesystem will store the images) will be public:url (that is, Rails.root/publichttp;/…)

  • WED: Rails SQL injection

Apparently the parameters hash can be exploited to select form arbitrary tables. This is fixed in 3.2.6, 3.1.6, 3.0.14 and a patch is available for Rails 2. See the following links for details:

http://seclists.org/oss-sec/2012/q2/504

http://weblog.rubyonrails.org/2012/6/12/ann-rails-3-2-6-has-been-released/

  • WED: David G. OOO 6/14-6/20

Please follow up with Danny Burkes for any issues.

  • THUR: Capybara "within" block

"within" scopes page to whatever elements are inside the within selector, but does NOT scope page.body or page.source.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Now on your mobile device!

Wiley Kestner
Tuesday, June 12, 2012

Helps

  • Google Dev Conference Happy Hour

There’s a Google dev conference at Moscone on June 28-29, and they have a careers fair concurrently which we’re attending. As a result we would like to do a Pivotal office tour, a brownbag talk, and happy hour from about 4pm that Thursday 6/28. Need about 6 pivots

  • jruby resque workers

We have java libraries that we need to run in a resque worker. Any patterns for doing this. Just run the workers as jruby. The whole project?

Interestings

  • Pivots and Clients don’t need tickets to tech talks
  • You need reset_column_information

If you have a migration that changes the columns on a model and a migration later that uses said model, you need to reset_column_information or Rails gets confused and won’t write your columns.

  • Please remember to turn in your 401k rollover form by the end of June to HR.

Events

  • WWDC Dev Lounge 4p-7p
  • CocoaHeads breakfast meetup Wed @ 07:30am

Yet another WWDC meetup

  • 0 Shares
  • Share on Facebook
  • Share on Twitter

WWDC && More

Wiley Kestner
Monday, June 11, 2012

Helps

  • Standup is back in the Lounge today

Hang on folks, we’re iterating again…

  • Recommendations when writing a migration

This is in regards to a migration which involves a large amount of models.

One option is to clone the models you care about (into a different directory).

Another option is to do the schema change and the data migration as a rake task that is unit testable.

It depends whether this is a one-time event or if it’s a boundary you’re going to cross back-and-forth.

Interestings

  • JSON Deep Clone in 1 line

def JSON.deep(object)
JSON.parse(object.to_json)
end

Events

  • Yoga @ 6p – all welcome
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

WWDC && More

Wiley Kestner
Monday, June 11, 2012

Helps

  • Standup is back in the Lounge today

Hang on folks, we’re iterating again…

  • Recommendations when writing a migration

This is in regards to a migration which involves a large amount of models.

One option is to clone the models you care about (into a different directory).

Another option is to do the schema change and the data migration as a rake task that is unit testable.

It depends whether this is a one-time event or if it’s a boundary you’re going to cross back-and-forth.

Interestings

  • JSON Deep Clone in 1 line

def JSON.deep(object)
JSON.parse(object.to_json)
end

Events

  • Yoga @ 6p – all welcome
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

[Standup][SF] 05/09/2012 – 2012年五月九日

Wiley Kestner
Wednesday, May 9, 2012

Ask for Help

“How should I fill out my life insurance benefit information?”

On paper forms you can get from HR

“Is today my last chance to see Bari?”

For now, yes.

“How can I deploy Rails & Maven?”

Suggest using warbler to turn your Rails app into a “.war” which plays nicely with Maven.

Interesting Things

  • Tomorrow is “Ride Your Bike To Work” day
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

(Title: SF Standup 05/07/2012: Testing views)

Wiley Kestner
Monday, May 7, 2012

Ask for Help

“Benefits enrollment this week”

Please refer to the emails you’re getting from HR

“How do I test views without doing integration tests?”

Differing viewpoints were expressed, namely, that integration tests should be done all the time and writing explicit view tests.

Interesting Things

  • Yoga on mondays
  • Company meeting on Thursday afternoon
  • New nets by ping pong tables are neither a petting zoo, nor a day care pen, FYI
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Wiley Kestner

Wiley Kestner
San Francisco

Subscribe to Wiley's Feed

Author Topics

  • 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 >