README.md in redd-0.8.0 vs README.md in redd-0.8.1
- old
+ new
@@ -1,14 +1,29 @@
<div align="center">
- <!-- Redd -->
- <img src="logo.png" width="500"><br>
+ <p>
+ <!-- Redd -->
+ <img src="logo.png" width="500"><br>
+ <!-- Badges -->
+ <a href="https://rubygems.org/gems/redd">
+ <img src="http://img.shields.io/gem/v/redd.svg?style=flat-square" alt="Gem Version">
+ </a>
+ <a href="https://travis-ci.org/avinashbot/redd">
+ <img src="http://img.shields.io/travis/avinashbot/redd.svg?style=flat-square" alt="Build Status">
+ </a>
+ <a href="https://rubygems.org/gems/redd">
+ <img src="http://img.shields.io/gem/dt/redd.svg?style=flat-square" alt="Gem Downloads">
+ </a>
+ </p>
+
<!-- Intro Text -->
- <strong>Redd</strong> is an API wrapper
- for <a href="https://www.reddit.com/dev/api">reddit</a>
- that is all about being <strong>simple</strong>
- and <strong>intuitive</strong>.
+ <p>
+ <strong>Redd</strong> is an API wrapper
+ for <a href="https://www.reddit.com/dev/api">reddit</a>
+ that is all about being <strong>simple</strong>
+ and <strong>intuitive</strong>.
+ </p>
</div>
---
```ruby
@@ -23,13 +38,12 @@
)
session.subreddit('all').comment_stream do |comment|
if comment.body.include?('roll a dice')
comment.reply("I just rolled a dice! It's a #{rand(1..6)}!")
- elsif comment.body.include?('flip a coin') || comment.body.include?('coin flip')
- coin_face = (rand(0..1) == 1 ? 'heads' : 'tails')
- comment.reply("I just flipped a coin! It's #{coin_face}!")
+ elsif comment.body.include?('flip a coin')
+ comment.reply("I just flipped a coin! It's a #{%w(heads tails).sample}!")
end
end
```
---
@@ -40,10 +54,10 @@
**Yes**, that's all there is to it! You don't need to handle rate-limiting, refresh access tokens
or protect against issues on reddit's end (like 5xx errors).
#### Where can I find the documentation?
-[**Latest**](www.rubydoc.info/gems/redd) / [**GitHub**](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session)
+[**Gem**](http://www.rubydoc.info/gems/redd/Redd/Models/Session) / [**GitHub**](http://www.rubydoc.info/github/avinashbot/redd/master/Redd/Models/Session)
#### How can I contact you?
[Reddit](https://www.reddit.com/message/compose/?to=Mustermind) /
[GitHub](https://github.com/avinashbot/redd/issues/new) /
[Email](mailto:avinash@dwarapu.me)