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

Monthly Archives: July 2012

Andrew Bruce

Rager Party (Standup 7/31/12)

Andrew Bruce
Tuesday, July 31, 2012

Helps

  • New Mail Rack

There’s a new mail rack near the lockers.

  • Capybara inconsistent about what page it’s on

We have a spec that does something along the lines of

visit '/#foo'
visit '/#bar'
save_and_open_page
page.should have_content("bar")

The save_and_open_page gives the bar page, but the assertion fails because it looks for "bar" in the contents of the foo page rather than the bar page.

One suggestion was to tell capybara to resync.

  • Webviews for iOS app – slow?

One team was worried about the speed of Webviews versus the speed of e.g. mobile Safari. It was suggested to try it and see, benchmark even.

Interestings

  • Mad at your Rails logs? Try Lograge

https://github.com/roidrage/lograge uses the amazing notification system in Rails 3 – which itself is worth a read – to make more useful logs for staging & production environments. Looks like it came out of the TravisCI project. And if you’re logging to Splunk, this is more like what you want.

  • Jasmine busted after Firefox upgrade?

Upgrade the selenium-webdriver gem to 2.25.0 and happiness will prevail.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Cameron Cundiff

[Standup][NY] 07/30/12 and 07/31/12

Cameron Cundiff
Tuesday, July 31, 2012

Interestings

  • Frank – Cucumber like framework for iOS – trending on HackerNews.
  • rspec shared_example names do not get scoped within describe blocks

    As of rspec 2.6, shared examples are global. You can declare them in a describe block, but they are not scoped to that description. This ultimately means that shared_example names should be unique across your test suite!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Charlie Springer

Screencast: The current, the backlog, together again!

Charlie Springer
Monday, July 30, 2012

Today’s screencast is about understanding workflow in Tracker, with a twist of organization.

The Current panel shows you all of the stories your team is working on this week or “iteration”, including those that are in progress, as well as stories that Tracker thinks you’re going to get done based on velocity. As you’ve probably noticed, stories will jump from Current to the Backlog automatically as you move stories around, estimate them, etc.

If you prefer to see and think of the current iteration and the rest of the backlog as one continuous thing, you can combine them! Check out the screencast below, or just do the following:

  • Sign into Tracker
  • Open up your Profile
  • Scroll down to Project Page Preferences and check the ‘Include Current in Backlog’ checkbox
  • Head into your Project

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Brandon Liu

SF Standup 7/30

Brandon Liu
Monday, July 30, 2012

Helps

  • Apache proxy: (502)Unknown error 502: proxy: pass request body failed

We need to make requests to a server and these requests have to come from a fixed IP address and be authenticated via SSL. For this purpose we set up a EC2 instance to function as a proxy. We can make cURL requests using our key and certificate from the proxy machine successfully. But when we go through Apache we get:
“(502)Unknown error 502: proxy: pass request body failed”

Interestings

  • Backbone’s views’ $el contains all matched elements

If you initialize a Backbone view with an el selector that matches more than one element: within the view $el will refer to a jQuery collection that contains all the matched elements, while el will contain the DOM object for only the first element matched. To achieve consistency, you might want to instantiate your view like so:

new view({el: '.selector_that_matches_many:eq(0)'});
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mark Rushakoff

You can’t (yet) programmatically copy an image to the clipboard from a Javascript web app

Mark Rushakoff
Sunday, July 29, 2012

Earlier this week we had an investigation chore about whether it was possible to programmatically copy an image to the clipboard in a Javascript web app.

Our conclusion was no, it’s not currently possible (at least not standardized across browsers).

While there is a draft for the HTML5 clipboard API that does look like it will support copying images to the clipboard, it isn’t yet standardized.

After the jump, I’ll explain the steps we took to reach our conclusion.

When we started investigating, we were searching for something like “javascript copy image to clipboard” and we were not finding any relevant search results.

We decided to look up how to copy text, then. A cursory web search for copying text to the clipboard in Javascript will show you a lot of people recommending Flash-based solutions like Zeroclipboard. Zeroclipboard works by using a flash movie that copies text to the clipboard when clicked.

A search through Zeroclipboard’s documentation didn’t turn up anything about images. Thankfully, Zeroclipboard is open source! Let’s find how they are doing the copy.

We went to the Actionscript (Flash’s ECMAScript-based programming language) source code for Zeroclipboard, and found this code:

// user click copies text to clipboard
// as of flash player 10, this MUST happen from an in-movie flash click event
System.setClipboard( clipText );

System.setClipboard it is. Maybe there’s a richer API than just copying text? Off to the docs!

The Actionscript docs had this to say about System.setClipboard:

This method is provided for SWF content running in Flash Player 9. It allows only adding String content to the Clipboard.

Flash Player 10 content and content in the application security sandbox in an AIR application can call the Clipboard.setData() method.

So Flash Player 10 can do something besides strings? Let’s look at the docs for Clipboard.setData.

The standard formats are:

  • BITMAP_FORMAT: a BitmapData object (AIR only)
  • FILE_LIST_FORMAT: an array of File objects (AIR only)
  • HTML_FORMAT: HTML-formatted string data
  • TEXT_FORMAT: string data
  • RICH_TEXT_FORMAT: a ByteArray containing Rich Text Format data
  • URL_FORMAT: a URL string (AIR only)

There you have it. If we were writing an AIR app, we could use Flash to copy an image to the clipboard; but a Flash movie embedded in a web page does not have those permissions available.

So until that draft is standardized and adopted, there seems to be no cross-browser way to programmatically copy an image to the clipboard in a web app.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Kris Kelly

07/27/12: ActiveRecord.count changes your select

Kris Kelly
Friday, July 27, 2012

Interestings

  • Chrome slow after click on body

While investigating memory leaks in a single page JS app, we found that rendering times increased by ~2 seconds after clicking on the body of the document.

It only happens in Chrome, Webkit and Firefox don’t have the problem.

We don’t seem to have any click handlers that fire when clicking on the body.

  • Putting .count on the end of an ActiveRecord query blows away your select

Here’s a scope for customers who have at least one subscription:

Customer.select(’DISTINCT customers.*’).joins(:subscriptions).where(”subscriptions.customer_id IS NOT NULL”)

This produces the following SQL:

SELECT DISTINCT customers.* FROM “customers” INNER JOIN “subscriptions” ON “subscriptions”.”customer_id” = “customers”.”id” WHERE (subscriptions.customer_id IS NOT NULL)

Say you want to know how many of these there are. If you put .count on the end of the scope, it converts the SQL to this:

SELECT COUNT(*) FROM “customers” INNER JOIN “subscriptions” ON “subscriptions”.”customer_id” = “customers”.”id” WHERE (subscriptions.customer_id IS NOT NULL)

It loses the distinct, so the query returns a customer object for each subscription. This means that if a customer has 2 subscriptions, they appear twice in the result set.

Workaround:

Using length instead of count works. It executes the query and then counts the number of results. There seems to be no easy way to do a count query that is not count(*).

This is a known bug in rails that has been patched, but not yet released:

https://github.com/rails/rails/issues/5554

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Dan Podsedly

Pivotal Tracker maintenance this Friday, July 27 at 8pm PDT

Dan Podsedly
Thursday, July 26, 2012

We’re planning to make a number of server upgrades tomorrow that require a bit of downtime. To minimize disruption, this update will happen after hours tomorrow, Friday, July 27, at 8pm US Pacific (PDT) time, and we anticipate it taking approximately one hour.

Please accept our apologies in advance for any inconvenience. To get the latest updates, and real time status of this maintenance, please follow @pivotaltracker on Twitter.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
John Barker

NYC Standup 7/25/2012 – Phone Gap

John Barker
Wednesday, July 25, 2012

Interestings

  • PhoneGap 2.0 released – supposed to be easier for devs?
  • Mountain Lion’s out today
  • Chrome 21 supports drag & dropping of FOLDERS onto a web page
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Ronan Dunlop

Zapier – A nifty Matchmaker for Apps

Ronan Dunlop
Wednesday, July 25, 2012

When it comes to app match ups no-one does it cleaner than Zapier. The way I see it, they’re the bread that surrounds a PB&J sandwich. Sure the good stuff is in the middle, but you wouldn’t be able to enjoy it without getting your fingers dirty if it weren’t for the bread.

As Zapier puts it, they make it easy to sync data between web apps; what’s more they can do this now with over 50 apps including Pivotal Tracker, Zendesk, Github, Wufoo, Mailchimp and Google this that and the other to name drop a few. Read more about their Pivotal Tracker integration.

The entire experience is drag and drop. The functionality is straightforward “if this then that”, or as Zapier calls it, Triggers leading to Actions. Plans range from Free to I need to think about this.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Michael Freedman

Unicycle Butter sandwich

Michael Freedman
Tuesday, July 24, 2012

Helps

  • jasmine:ci not closing chrome windows?
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

  • agile (778)
  • rails (113)
  • testing (86)
  • ruby (83)
  • ruby on rails (70)
  • jobs (62)
  • javascript (53)
  • techtalk (44)
  • rspec (38)
  • activerecord (29)
  • productivity (29)
  • gogaruco (29)
  • ironblogger (29)
  • git (28)
  • nyc (27)
  • rubymine (25)
  • mobile (21)
  • cucumber (20)
  • bloggerdome (19)
  • process (19)
  • pivotal tracker (19)
  • design (18)
  • jasmine (18)
  • ios (18)
  • webos (17)
  • objective-c (17)
  • android (16)
  • palm (16)
  • "soft" ware (16)
  • fun (15)
  • tracker ecosystem (15)
  • ci (15)
  • cedar (15)
  • rails3 (14)
  • performance (14)
  • gem (13)
  • bdd (13)
  • selenium (12)
  • css (12)
  • goruco (12)
  • bundler (12)
  • tdd (12)
  • meetup (11)
  • railsconf (11)
  • nyc-standup (11)
  • capybara (10)
  • mac (10)
  • mojo (10)
  • chef (10)
  • rubygems (9)
Subscribe to Community Feed
  1. 1
  2. 2
  3. 3
  4. 4
  5. →
  • 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 >