mattmacleod/Braincube — pull request #4 by mattmacleod (2014-11-13 15:03:58+00:00)
Title: Fest32

# Altmetric Badger

> *Badger turns data into badges!*

A small gem which can generate an Altmetric badge URI from a hash of post types and a score.

## Usage

```ruby
AltmetricBadger.new(
score: 123,
data: {
'twitter' => 100,
'facebook' => 100
}
).to_donut_uri(svg: true)
# => #
```

Pretty simple. Available methods are:

```
#to_donut_uri
#to_bar_uri
#to_pie_uri
#to_helix_uri
```

## Requirements

Tested with Ruby 2.1.3+ and nothing lower. Luck may vary with other versions.

## Testing

```
bundle exec rake spec
```