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: August 2010

Josh Knowles

National Lab Day seeks Ruby Developer in NYC

Josh Knowles
Tuesday, August 31, 2010

At Pivotal Labs, one of the services we provide our clients is helping them interview and hire. Pivotal Labs and our clients place a strong emphasis on Agile development and its many aspects: Pair Programming, Test-Driven Development, rapid iterations, and frequent refactoring.

National Lab Day a New York, NY non-profit company, is looking for an Agile UI Developer to join their team. The full job posting follows.

National Lab Day is more than just a day; it is a nationwide initiative to build local communities of support that will foster ongoing collaborations among volunteers, students, and educators. NLD does this primarily through our online platform (www.nationallabday.org) that connects teachers with STEM professionals, community volunteers, and a variety of other resources – all there to support and help teachers strengthen their STEM programs.

We are looking for a developer with the following skills to join our team:

Job Details / Required Skills:

  • Developing and maintaining Ruby on Rails applications for a high-profile non-profit
  • Test Driven Development
  • Aggressive Refactoring
  • Working directly with management to improve the product and the message

Additional Skills:

  • JavaScript, including experience with Javascripttesting frameworks
  • SQL
  • Ability to communicate and coordinate with non-technical management

Location: Midtown, New York City

Salary Hours: Full-time

Contact: info@nationallabday.org

Please email a brief description of your work experience, including a resume and/or portfolio. Compensation is commensurate with experience

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mike Barinek

Reindexing Solr from Cucumber

Mike Barinek
Tuesday, August 31, 2010

Here’s a quick snippet that we’re using to reindex Solr from our Cucumber features.

“And I reindex assets” helps to ensure that we didn’t leave any cruft around from previous
tests and that we’ve properly indexed our Pickle model.


  Background:
    And I am logged in as an admin user
    And an asset with snowboarding tags: "snowboarding" exists with title: "Snowboarding", alt_text: "Snowboarding", summary: "A summary about snowboards"
    And I reindex assets

  Scenario:  An Editor searches for an asset by title
    When I go to the url: "/assets?q=Snowboarding"
    Then I should see "Snowboarding"

Here’s the actual step


  When /^I reindex (.+)$/ do |model_name|
    model_name.singularize.capitalize.constantize.solr_reindex
  end

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Christian Sepulveda

Free Version of Tweed no longer compatible with Twitter Authentication

Christian Sepulveda
Tuesday, August 31, 2010

Twitter has been completing the migration of third party applications, such as Tweed, to use their new authentication methods. (For more on the authentication details, please see Twitter’s developer docs.)

One result of this change is that the free version of Tweed no longer works. As we have noted in the past, we are no longer supporting the free version of Tweed, so we will not be upgrading it to work with Twitter’s new authentication scheme.

We understand this will frustrate many Tweed users. For a limited time, the paid version of Tweed will be available for $0.99, in all markets. This price change should appear in the App Catalog soon.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Glenn Jahnke

Android Mongo Meetup

Glenn Jahnke
Tuesday, August 31, 2010

There is meeting tonight at 7pm in San Francisco about using MongoDB for mobile backend servers. Will Shulman from MongoLab will be giving the talk. They will also be offering food and prizes to attendees.

More details can be found at:

http://www.sfandroid.org/calendar/14367370/?eventId=14367370&action=detail

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

Aragorn: iPad app for Pivotal Tracker

Dan Podsedly
Monday, August 30, 2010

We’re excited to add a new entry to the 3rd party tools directory: Aragorn, the first Pivotal Tracker client for the iPad.

The first version of Aragorn supports read only views of your projects and stories within them. Thanks to @elight for writing the app!

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mike Barinek

Fast user switching with Devise

Mike Barinek
Saturday, August 28, 2010

Ever wondered how to login as another user within Devise?

Recently we had a feature request that would provide Admins with the ability
to sign is as another user. You could imagine live demonstrations or even production
support calls where you would like to be signed in as another user, yet not
have to ask for or decrypt their current password. After stewing for a bit, we found a
pretty nice solution with Devise.

Here’s the Cucumber feature…


  Feature: Sign in as another user
    As an admin
    I want to sign in as another user

    Scenario: Admin can sign in as another user
      Given I am logged in as an admin user
      And a user: "bob" exists with email: "bob@example.com", password: "password", ...
      When I go to the admin users page
      And I follow the "Sign in as" link for user: "bob"
      Then I should see "Welcome Bob"

The trick was to store the admin info within the rack session.

request.env['rack.session']['devise.remember_admin_user_id']

We decided on using a Rails 3 concern to keep our actual strategy clean.


require 'devise/strategies/base'

module SignInAs
  module Concerns
    module RememberAdmin
      extend ActiveSupport::Concern

      private

      def remember_admin_id
        request.env['rack.session']['devise.remember_admin_user_id']
      end

      def remember_admin_id=(id)
        request.env['rack.session']['devise.remember_admin_user_id'] = id
      end

      def remember_admin_id?
        request.env['rack.session'] && request.env['rack.session']['devise.remember_admin_user_id'].present?
      end

      def clear_remembered_admin_id
        request.env['rack.session']['devise.remember_admin_user_id'] = nil
      end
    end
  end
end

The above really makes writing the Devise strategy fairly easy.


require 'devise/strategies/base'

module SignInAs
  module Devise
    module Strategies
      class FromAdmin < ::Devise::Strategies::Base
        include SignInAs::Concerns::RememberAdmin

        def valid?
          remember_admin_id?
        end

        def authenticate!
          resource = User.find(remember_admin_id)
          if resource
            clear_remembered_admin_id
            success!(resource)
          else
            pass
          end
        end
      end
    end
  end
end

Warden::Strategies.add(:sign_in_as, SignInAs::Devise::Strategies::FromAdmin)

Then we just wire in our new strategy. Last line above.

Lastly, here’s our sign-in-as controller which sets the Devise session variable.


class SignInAsController < ApplicationController
  include SignInAs::Concerns::RememberAdmin

  layout 'admin/application'

  def create
    if can?(:manage, :users)
      self.remember_admin_id = current_user.id
      sign_in :user, User.find(params[:user_id])
    end

    redirect_to '/admin'
  end

end

That’s it, pretty neat and might make for a nice Gem or Devise addition.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mike Gehard

Ruby Enumerable and string

Mike Gehard
Friday, August 27, 2010

Did you know that you can call map() and each() on a Ruby string? Do you know how they behave? I hope I’m not the only one that thought they understood it but was proven mistaken.

What would you expect the following code to do?

"hello".map{|char| "Char#{char}"  }

I thought it would return me an array with a bunch of “Char” where x is each letter in “hello”. Nope…it returns:

["Charhello"]

What would you expect the following code to do?

"hello".each{|char| puts "Char#{char}"}

Yeah I thought it would write out a bunch of puts statements “Char” where x is each letter in “hello”. Nope it prints:

Charhello

Ok so maybe my thoughts on strings being enumerable were a little off…I’ve been wrong before and will probably be wrong again.

What really threw me for a loop was that I can access the characters in a string by index:

"hello"[1]

returns

101

which is the ASCII representation of “e”.

So what is the moral of this story? Sometimes things aren’t as the seem at first glance. And sometimes you need to step back, fire up irb and see what really is happening.

Update: Thanks all for the responses below.

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
JT Archie

Standup 08/26/2010 – Rails controls too much of cache

JT Archie
Thursday, August 26, 2010

Help

“Does Postgres have an equivalent MySql Myisam high write performance?”

A Pivot was wondering what settings in Postgres can be enabled for high performance INSERTs (willing to sacrafice SELECT performance on said table).

“Why is Paperclip giving a Stream close error when in development?”

When using Paperclip in development, any file upload results in a Stream IOError. Trying to replicate the problem with Paperclip on its own causes no problems, so it appears to be a conflicting library.

Interesting Things

  • An update to yesterday’s Rubymine font size issue. The file drawer can not be specifically updated, but the overall system font can be under Preferences > Appearance > Fontsize. Make sure to restart Rubymine.
  • Google Voice has been added as a service on to GMail. Make phone calls for free to anywhere in the US from your browser.
  • An update to yesterday’s Safari ‘Back’ button issue. Safari caches the previous ajax call (dubbed ajax zombie) when going back to a previous page. The fix had to do with changing Rails default “Cache-control” header to be “no-store”.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter
Mike Barinek

Managing your ey-cloud-recipes

Mike Barinek
Thursday, August 26, 2010

If you’ve recently forked the ey-cloud-recipes on GitHub and then had issues
managing and deploying multiple projects with disparate dependencies using the
single forked gem, then we have a solution that has worked well on a recent project.

We’ve tucked the cookbooks directory underneath our Rails project. To apply Chef
changes, we installed the ‘engineyard’ gem and us ‘ey recipes upload’ and
‘ey recipes apply’ from within our Rails project.

Upside, everything you need to know about the project is local to the project.


.
├── Gemfile
├── Gemfile.lock
├── README.md
├── Rakefile
├── app
├── cookbooks
│   ├── main
│   │   ├── attributes
│   │   │   └── recipe.rb
│   │   ├── definitions
│   │   │   └── ey_cloud_report.rb
│   │   ├── libraries
│   │   │   ├── ruby_block.rb
│   │   │   └── run_for_app.rb
│   │   └── recipes
│   │       └── default.rb
│   ├── redis
│   │   ├── README.rdoc
│   │   ├── recipes
│   │   │   └── default.rb
│   │   └── templates
│   │       └── default
│   │           ├── redis.conf.erb
│   │           └── redis.monitrc.erb
│   └── sunspot
│       ├── recipes
│       │   └── default.rb
│       └── templates
│           └── default
│               ├── solr.erb
│               └── solr.monitrc.erb

  • 0 Shares
  • Share on Facebook
  • Share on Twitter
JT Archie

Standup 08/25/2010 – Rails RC2

JT Archie
Wednesday, August 25, 2010

Help

“How does Mobile Safari handle the back button?”

When pressing the back button in Mobile Safari can cause the access to the DOM to be lost. It appears to happen because of resources of “forward” facing pages taking over the cache.

“How to set the font size on RubyMine project (file) drawer?”

With the increasing size of resolution on monitors, some of are experiencing the small font issue. Is there a setting to control the RubyMine project browser?

Interesting Things

  • Updating ImageMagick from 6.6.1 to 6.6.3 fixes a bug with color palette when trying to resize images using Paperclip.
  • Rails 3 RC2 has dropped fixing many bugs and this much closer to the final release. The Rails team would like to find any blockers specifically in Bundler and ARel.
  • 0 Shares
  • Share on Facebook
  • Share on Twitter

Topics

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