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
  • Contact
    • Press Room
    • Press Releases
    • In The News
    • Press Kit
  • All
  • Labs
  • Standup
  • Tracker

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

Add New Comment Cancel reply

Your email address will not be published.

Wiley Kestner

Wiley Kestner
San Francisco

Recent Posts

  • WWDC && More
  • Now on your mobile device!
  • WWDC && More
Subscribe to Wiley's Feed

Author Topics

  • About
  • Case Studies
  • Team
  • Community
  • Careers
  • 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 >