README.md in materialist-3.5.0 vs README.md in materialist-3.6.0

- old
+ new

@@ -23,10 +23,24 @@ ```bash bundle ``` +### Release + +After merging all of your PRs: + +1. Bump the version in `lib/materialist/version.rb` -- let's say `x.y.z` +1. Build the gem: `gem build materialist.gemspec` +1. Push the gem: `gem push materialist-x.y.z.gem` +1. Commit changes: `git commit -am "Bump version"` +1. Create a tag: `git tag -a vx.y.z` +1. Push changes: `git push origin master` +1. Push the new: `git push origin --tags` + +## Usage + ### Entity Your materialised entity need to have a **unique** `source_url` column, alongside any other field you wish to materialise. ```ruby @@ -180,9 +194,15 @@ By default the column used is `:source_url` and the original `url` is used as the identifier. Passing an optional block allows you to extract an identifier from the URL. #### `capture <key>, as: <column> (default: key)` describes mapping a resource key to a database column. + +You can optionally provide a block for parsing the value: + +```ruby +capture(:location, as: :latitude) { |location| location[:latitude] } +``` #### `capture_link_href <key>, as: <column>` describes mapping a link href (as it appears on the hateous response) to a database column. You can optionally provide a block for parsing the url: