README.md in kanzen-0.1.0 vs README.md in kanzen-0.2.0

- old
+ new

@@ -1,7 +1,12 @@ # Kanzen - A Completeness Check Gem +[![Maintainability](https://api.codeclimate.com/v1/badges/4acb9bf12efa620f46dd/maintainability)](https://codeclimate.com/github/caws/kanzen/maintainability) +[![Build Status](https://travis-ci.org/caws/kanzen.svg?branch=master)](https://travis-ci.org/caws/kanzen) +[![Test Coverage](https://api.codeclimate.com/v1/badges/4acb9bf12efa620f46dd/test_coverage)](https://codeclimate.com/github/caws/kanzen/test_coverage) +[![Gem Version](https://badge.fury.io/rb/kanzen.svg)](https://badge.fury.io/rb/kanzen) + ### What is this? This is a gem that gives you a sense of how complete a given model is. It checks a given model attributes, its relationships and its relationships' attributes and so on and so @@ -29,30 +34,32 @@ - check if a given model (and its associations) are completely filled - return percentage values for present/missing attributes - return number of present/missing attributes - return a list of present/missing attributes (as hashes) +PS: This doesn't take the attributes :id, :created_at and :updated_at into consideration when calculating the completeness. + ## Installation ### Instalation Add the following to your Gemfile ``` ruby -gem 'kanzen' +gem 'kanzen', '~> 0.2.0' ``` Then run: ``` shell bundle install ``` -Prepend Kanzen to your model: +Include Kanzen in your model: ``` ruby class Address < ApplicationRecord - prepend Kanzen + include Kanzen ... end ``` ## Usage @@ -98,10 +105,10 @@ # prints true, as all attributes are present puts random_address.completed? # prints false, because street.to_s equals "" and is evaluated as invalid according -to the custom_proc passed +# to the custom_proc passed puts random_address.completed?(proc: custom_proc) ``` ### TO DO