Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabrik42/cat_facts
Rack middleware that to add cat facts in headers of HTTP responses.
https://github.com/fabrik42/cat_facts
Last synced: 3 days ago
JSON representation
Rack middleware that to add cat facts in headers of HTTP responses.
- Host: GitHub
- URL: https://github.com/fabrik42/cat_facts
- Owner: fabrik42
- License: mit
- Created: 2012-06-26T19:35:19.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2018-04-17T10:36:12.000Z (over 6 years ago)
- Last Synced: 2024-11-08T02:12:18.325Z (9 days ago)
- Language: Ruby
- Size: 5.86 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dev-fun - Cat Facts - Adds random cat facts to HTTP response headers. 🐈 (Ruby)
- stars - fabrik42/cat_facts - Rack middleware that to add cat facts in headers of HTTP responses. \[*MIT License*\] (⭐️12) (Ruby)
- stars - fabrik42/cat_facts - Rack middleware that to add cat facts in headers of HTTP responses. \[*MIT License*\] (⭐️12) (Ruby)
README
# Cat Facts
Rack middleware that adds cat facts in headers of HTTP responses.
```
Response Headers:
X-Cat-Facts: The cats of this lib's developer are called Elvis and Mira.
```## Enhance your web platform by adding high quality cat facts!
![Chemistry Cat Approves!](http://i.imgur.com/HpAxF.jpg)
## Installation
Add this line to your application's Gemfile:
```
gem 'cat_facts'
```And then execute:
```
$ bundle
```Or install it yourself as:
```
$ gem install cat_facts
```Add it to your Rails middleware stack in `config/application.rb` (in the config block)
```
config.middleware.use CatFacts::Middleware
```## Usage
Any URL will have a `X-Cat-Fact` header in the response, that will contain a random cat fact for your amusement.