README.md in metaheader-1.0 vs README.md in metaheader-1.1

- old
+ new

@@ -1,7 +1,8 @@ # Parser for metadata header in plain-text files +[![Gem Version](https://badge.fury.io/rb/metaheader.svg)](http://badge.fury.io/rb/metaheader) [![Build Status](https://travis-ci.org/cfillion/metaheader.svg?branch=master)](https://travis-ci.org/cfillion/metaheader) [![Coverage Status](https://coveralls.io/repos/cfillion/metaheader/badge.svg?branch=master&service=github)](https://coveralls.io/github/cfillion/metaheader?branch=master) ## Syntax @@ -43,16 +44,30 @@ # mh = MetaHeader.from_file path # mark unknown keys as invalid # mh.strict = true -# set @key as optional -errors = mh.validate :key => MetaHeader::OPTIONAL +# set @key as mandatory +errors = mh.validate key: MetaHeader::REQUIRED -# or set @key as required: -# mh.validate :key => MetaHeader::REQUIRED -# -# ensure @key contains a valid value with a regex -# mh.validate :key => /^\w{2,}$/ +# other validators are available: +# mh.validate key: MetaHeader::OPTIONAL +# mh.validate key: MetaHeader::SINGLELINE +# mh.validate key: MetaHeader::HAS_VALUE +# mh.validate key: /^\w{2,}$/ +# mh.validate key: proc {|value| 'return nil or error' } value = mh[:key] ``` + +## Documentation + +MetaHeader's documentation is hosted at +[http://rubydoc.info/gems/metaheader/MetaHeader](http://rubydoc.info/gems/metaheader/MetaHeader). + +## Contributing + +1. [Fork this repository](https://github.com/cfillion/metaheader/fork) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push -u origin my-new-feature`) +5. Create a new Pull Request