README.md in elegant-0.0.0 vs README.md in elegant-1.0.0

- old
+ new

@@ -1,41 +1,73 @@ -# Elegant +Elegant +======= -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/elegant`. To experiment with that code, run `bin/console` for an interactive prompt. +Elegant provides a nice layout for PDF reports generated in Ruby. -TODO: Delete this and the text above, and describe your gem +The **source code** is available on [GitHub](https://github.com/Fullscreen/elegant) and the **documentation** on [RubyDoc](http://www.rubydoc.info/github/Fullscreen/elegant/master/Elegant/Interface). -## Installation +[![Build Status](http://img.shields.io/travis/Fullscreen/elegant/master.svg)](https://travis-ci.org/Fullscreen/elegant) +[![Coverage Status](http://img.shields.io/coveralls/Fullscreen/elegant/master.svg)](https://coveralls.io/r/Fullscreen/elegant) +[![Dependency Status](http://img.shields.io/gemnasium/Fullscreen/elegant.svg)](https://gemnasium.com/Fullscreen/elegant) +[![Code Climate](http://img.shields.io/codeclimate/github/Fullscreen/elegant.svg)](https://codeclimate.com/github/Fullscreen/elegant) +[![Online docs](http://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/Fullscreen/elegant/master/Elegant) +[![Gem Version](http://img.shields.io/gem/v/elegant.svg)](http://rubygems.org/gems/elegant) -Add this line to your application's Gemfile: +Elegant is a library built on top of [Prawn](http://prawnpdf.org) to generate PDF files in Ruby. -```ruby -gem 'elegant' -``` +Whereas Prawn creates PDF pages that are completely blank (letting users customize them at will), +Elegant comes with a nice layout that makes each page look… elegant! :wink: -And then execute: +How to use +========== - $ bundle +If you have never used [Prawn](http://prawnpdf.org/) to generate PDF files, you should first read [its manual](http://prawnpdf.org/manual.pdf). -Or install it yourself as: +Using Elegant is as simple as replacing any instance of `Prawn::Document` with `Elegant::Document`: - $ gem install elegant +```ruby +# with Prawn +Prawn::Document.new do + text 'Hello, World!' +end -## Usage +# with Elegant +Elegant::Document.new do + text 'Hello, World!' +end -TODO: Write usage instructions here +# with Elegant and extra options +header = {text: 'A report', logo: {url: 'http://lorempixel.com/500/500'}} +footer = {text: 'A link', url: 'http://www.example.com'} +Elegant::Document.new(header: header, footer: footer) do + title 'Welcome' + text 'Hello, world!' +end +``` -## Development +![Prawn vs. Elegant](https://cloud.githubusercontent.com/assets/7408595/10898333/433a6072-817e-11e5-8c95-999c5629e84c.jpg) -After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. +`Elegant::Document` accepts some options [... TODO ...] -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +How to install +============== -## Contributing +Elegant requires **Ruby 2.1 or higher**. -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/elegant. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. +To include in your project, add `gem 'elegant', ~> '1.0'` to the `Gemfile` file of your Ruby project. +How to generate the manual +========================== -## License +`rake manual` -The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). +How to contribute +================= +If you’ve made it this far in the README… thanks! :v: +Feel free to try it the gem, explore the code, and send issues or pull requests. + +All pull requests will have to make Travis and Code Climate happy in order to be accepted. :kissing_smiling_eyes: + +You can also run the tests locally with `bundle exec rspec`. + +Happy hacking!