Bendyworks

What's happening in

Never trust developers who don't embrace their inner geek. We're actively engaged in the pro­gram­ming world, and have plenty to say and share on the subjects that ex­cite us. Consider this our simul­taneous soapbox, corkboard, and scrapbook for all things geeky.

Tutorial

Posted on 02.02.12 by Jaymes |

UIAutomation and Pusher

UIAutomation is Apple’s answer to integration tests. It allows you to drive and run assertions against your application using a javascript library that interacts with user interface elements. It’s great to have such a powerful tool, but what if you have an application that depends on external triggers, such as Pusher events?

Let me introduce you to UIAHost. More specifically, it’s method performTaskWithPathArgumentsTimeout. What this allows you to do is execute a script in the flow of your tests.

Say we want to execute the ruby script:

All we have to do in our UIAutomation script is this:

That’s a pretty simple ruby script, and will fail to find the pusher gem on any of our machines at Bendyworks because we use ...continue reading

Tutorial

Posted on 11.15.10 by Brad |

HTML5, AJAX, IE, and Shivs

Standard procedure for using HTML5 on IE is to use a library like html5shim, html5shiv, or Modernizr. These tools are, in general, quite great. We at Bendyworks tend to use Modernizr.

Unfortunately, something happens when you combine HTML5 elements with AJAX (more specifically, any javascript) in Internet Explorer 8 (and, I’m assuming, below): the feature that these libraries provide – namely the ability to use HTML5 elements without IE screwing up the hierarchy – vanishes.

To solve this in IE, we use the innershiv library. I’d show you how to use it here, but jdbartlett does a pretty solid job on the library’s page.

Tutorial

Posted on 10.11.10 by Brad |

Script to Use Gems Locally, but Not on Heroku

We’ve already blogged about how heroku and bundler occasionally don’t play nice. Instead of describing an elaborate checklist that doesn’t work in all cases, just do two things.

First, make your Gemfile look something like this:

Next, put this in your script directory and run it every time you update your Gemfile:

It works great for us, but be sure to test it out before using it blindly.

Tutorial

Posted on 09.13.10 by Brad |

Excluding Dev and Test Gems from Heroku

Update: Check out our newer blog article that shows a better method of excluding dev and test gems from heroku.

Heroku is awesome. Bundler is awesome. Combining the two… not always awesome. Are you getting this when pushing to Heroku?

You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
...
Heroku push rejected, failed to install gems via Bundler

Try this workflow:

  • Ensure Gemfile.lock is in .gitignore
  • Ensure your :development and :test groups in Gemfile are surrounded by: if RbConfig::CONFIG[‘host_os’] =~ /darwin/ && false
  • Run `bundle`
  • Run `git add Gemfile.lock`
  • Remove the “&& false” from the Gemfile
  • Run `git add Gemfile` ...continue reading