README.md in file_classify-0.0.1 vs README.md in file_classify-0.0.2
- old
+ new
@@ -1,9 +1,15 @@
# FileClassify
Binary and ASCII classification for files
+[![Gem Version](https://badge.fury.io/rb/file_classify.png)](http://badge.fury.io/rb/file_classify)
+[![Build Status](https://travis-ci.org/rcaught/file_classify.png?branch=master)](https://travis-ci.org/rcaught/file_classify)
+[![Dependency Status](https://gemnasium.com/rcaught/file_classify.png)](https://gemnasium.com/rcaught/file_classify)
+[![Coverage Status](https://coveralls.io/repos/rcaught/file_classify/badge.png)](https://coveralls.io/r/rcaught/file_classify)
+[![Code Climate](https://codeclimate.com/github/rcaught/file_classify.png)](https://codeclimate.com/github/rcaught/file_classify)
+
## Installation
Add this line to your application's Gemfile:
gem 'file_classify'
@@ -16,10 +22,33 @@
$ gem install file_classify
## Usage
-TODO: Write usage instructions here
+```ruby
+require 'file_classify'
+
+classifier = FileClassify.new(path: 'spec/resources/binary.jpg')
+ => #<FileClassify:0x007fbf04c31098 @contents=nil, @path="spec/resources/binary.jpg">
+classifier.binary?
+ => true
+classifier.ascii?
+ => false
+classifier.classify
+ => "binary"
+
+
+# Or perhaps you have file contents?
+
+classifier = FileClassify.new(contents: 'And miles to go before I sleep.')
+ => #<FileClassify:0x007fbf04cd0ff8 @contents="And miles to go before I sleep.", @path=nil>
+classifier.binary?
+ => false
+classifier.ascii?
+ => true
+classifier.classify
+ => "ascii"
+```
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)