The username and password are actually base 64 encoded:

``` ruby
%(Basic #{Base64.encode64("#{username}:#{password}")})
```