Fork me on GitHub

Build Status Dependency Status Coverage Status Code Climate License Badges

Mutilator

Astonishingly Pointless Bullshit as a Service

v.0.1.0

Introduction

Ever see one of these things on Facebook or somewhere?

I cnduo't bvleiee taht I culod aulaclty uesdtannrd waht I was rdnaieg. Unisg the icndeblire pweor of the hmuan mnid, aocdcrnig to rseecrah at Cmabrigde Uinervtisy, it dseno't mttaer in waht oderr the lterets in a wrod are, the olny irpoamtnt tihng is taht the frsit and lsat ltteer be in the rhgit pclae. The rset can be a taotl mses and you can sitll raed it whoutit a pboerlm. Tihs is bucseae the huamn mnid deos not raed ervey ltteer by istlef, but the wrod as a wlohe. Aaznmig, huh? Yaeh and I awlyas tghhuot slelinpg was ipmorantt! See if yuor fdreins can raed tihs too.

Well, I built it as a webservice. Actually, I built a gem for it first with the intention of creating some sort of annoying Twitter bot, but it seemed it would work like this too.

Content negotiation

Mutilator will respond to the following Accept values with appropriate content:

text/csv

Content will be returned as comma-separated values thus:

source,mutilated
This sentence is just a test,Tihs secnntee is just a tset

text/html

Content will be returned as an HTML page with a Twitter Bootstrap Jumbotron containing the mutilated text (example).

application/json

Content will be returned as a JSON object thus:

{
  "source": "This sentence is just a test",
  "mutilated": "Tihs secnntee is just a tset"
}

text/plain

Content will be returned as plain text thus:

This snctneee is just a test  

application/xml

Content will be returned as an XML document thus (this may be completely bogus, what I understand about XML would fit on the back of a fag packet):

  <?xml version="1.0" encoding="UTF-8"?>
  <mutilation>
    <source>This sentence is just a test</source>
    <mutilated>Tihs secnntee is just a tset</mutilated>
  </mutilation>

API

/:text

Will return mutilated text.

Notes

I regret nothing.