github/hubot — pull request #649 by balbeko (2014-02-14 20:28:57+00:00)
Title: Custom messages methods for Response and Adapter implemented

I was thinking about this PR in slack adapter repository tinyspeck/hubot-slack#24 and realised that currently we have no ability to send something more complex to the chatroom rather then plain text.

My PR implements Adapter#custom raw method and Response#custom method.
Adapter#custom should be extended by adapters that require some additional message types to be sent.

According to usecase of slack described in related PR it might look something like this:

```coffee-script
robot.respond /foo$/i, (msg) ->
data =
type: 'slack-attachment'
content:
text: "Optional text that should appear within the attachment"
color: "#36a64f"
msg.custom data
```

in this case adapter should handle itself how to parse objects received and send them back to a chat in appropriate way.

This change should not break anything, but should give extra abilities for adapter developers.