README.md in receipt-0.1.0 vs README.md in receipt-0.1.1

- old
+ new

@@ -1,9 +1,14 @@ # Receipt PDF Receipts generator for any ruby application. +## Code Status + +[![Build Status](https://travis-ci.org/fernandoalmeida/receipt.svg)](https://travis-ci.org/fernandoalmeida/receipt) +[![Code Climate](https://codeclimate.com/github/fernandoalmeida/receipt/badges/gpa.svg)](https://codeclimate.com/github/fernandoalmeida/receipt) + ## Installation Add this line to your application's Gemfile: ```ruby @@ -21,23 +26,24 @@ ## Usage ```ruby receipt = Receipt::Pdf.new( id: 1, - date: Time.now.strftime('%d/%m/%Y'), + date: Time.now.to_date, amount: 100.0, currency: '$', payer: 'Chucky Norris', receiver: 'Fernando Almeida', - description: 'Transaction #123', - logo: 'logo.png' -).generate + description: 'transaction #123', + filepath: '/my/receipts/path/file1234.pdf', + locale: :en # or 'pt-BR' +) -# send to email -receipt.send_to('payer@email.com') +# generates file +File.open(receipt.file) # send to download -send_data(receipt.data, filename: receipt.filename, type: receipt.type) +send_data(receipt.data, filename: receipt.filename, type: receipt.mimetype) ``` ## Development After checking out the repo, run `bin/setup` to install dependencies.