• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pengwynn / octokit / 491
90%

Build:
DEFAULT BRANCH: master
Ran 20 May 2013 09:28AM UTC
Jobs 5
Files 68
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
491

Pull #245

travis-ci

damian
Ensure file content is properly Base64 encoded

When making a call to the `create_contents` method, the Base64-encoding is causing
Octokit to throw an `UnprocessableEntity` exception, complaining that the content
is not valid Base64.

See the error below:

```ruby
Octokit::UnprocessableEntity: PUT https://api.github.com/repos/Sage/sageone_help_uk/contents/_help/bbb.textile: 422: content is not valid Base64
from /usr/local/opt/rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/bundler/gems/octokit-50c53ea2579f/lib/faraday/response/raise_octokit_error.rb:22:in `on_complete'
```

It's because of this issue documented here:

http://stackoverflow.com/questions/2620975/strange-n-in-base64-encoded-string-in-ruby

Where the call to Base64 encoding is happening, I've added a small piece of logic
to mimic Ruby 1.9s `strict_encode64` functionality, ensuring we're backward compatible
to Ruby 1.8.7.
Pull Request #245: Ensure file content is properly Base64 encoded

3505 of 3523 relevant lines covered (99.49%)

40.04 hits per line

Jobs
ID Job ID Ran Files Coverage
2 491.2 (jruby-19mode) 20 May 2013 09:29AM UTC 0
99.07
Travis Job 491.2
4 491.4 (rbx-19mode) 20 May 2013 09:28AM UTC 0
99.49
Travis Job 491.4
6 491.6 (1.9.2) 20 May 2013 09:29AM UTC 0
99.82
Travis Job 491.6
7 491.7 (1.9.3) 20 May 2013 09:29AM UTC 0
99.82
Travis Job 491.7
8 491.8 (2.0.0) 20 May 2013 09:30AM UTC 0
99.82
Travis Job 491.8
Source Files on build 491
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #491
  • Pull Request #245
  • PR Base - master (#486)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc