zipmark/rspec_api_documentation — pull request #108 by jandillmann (2014-01-20 14:32:29+00:00)
Title: Decode HTTP basic auth header and generate cURL command with user and pasword

Currently, the generated cURL command for examples that include basic HTTP authentication contains the raw authentication header.

```
curl "http://api.example.org/" -d '' -X GET \
-H "Authorization: Basic dXNlckBleGFtcGxlLm9yZzpwYXNzd29yZA=="
```

In my opinion, the command is more helpful the way a user would enter it into the terminal, e.g. using cURL's `-u` or `--user` option.

This pull request detects a HTTP basic auth header, decodes it, and generates a corresponding cURL command.

```
curl "http://api.example.org/" -d '' -X GET \
-u user@example.org:password
```