readme.md in render-0.0.4 vs readme.md in render-0.0.5

- old
+ new

@@ -1,55 +1,34 @@ # Render -Create and test API requests simply with schemas. +Render improves the way you work with APIs. -```ruby -Render.load_schemas!("spec/schemas") # JSON schema directory -Render::Graph.new(:film, { endpoint: "http://films.local/films" }).render -# or stub out schema-specific data -Render.live = false -Render::Graph.new(:film).render -``` +* [Generate type-specific, dynamic API response data for testing](spec/integration/render/schema_spec.rb) with just a schema (JSON or Ruby) +* [Make API requests](spec/integration/render/graph_spec.rb) with a URL and a schema +* Build graphs that [interpret data from one endpoint to call others](spec/integration/render/nested_graph_spec.rb) -*Use with caution* (Render is under initial development) by updating your Gemfile: +## Setup - gem "render" +Update your Gemfile: -## Caveats + gem "render" -- Render will modify ::Hash and ::Enumerable to provide symbolize/stringify keys methods. - ## Usage -*Autoload schemas* +Check out examples as part of the [integration tests](spec/integration/render). -```ruby -Render.load_schemas!("path/to/json/schemas") -Render::Graph.new(:schema_title, { endpoint: "http://films.local/films" }).render -``` +## Caveats -*Variable interpolation* +- Render is under initial development -```ruby -api_endpoint = "http://films.local/films/:id?:client_token" -env_specific_client_token = "token" - -graph = Render::Graph.new(:schema_title, { endpoint: api_endpoint, client_token: env_specific_client_token }) -graph.render({ id: "an-id" }) # makes request to "http://films.local/films/an-id?client_token=token" -``` - -Check out the examples in [integration tests](spec/integration/). - ## Roadmap -1. Custom HTTP headers (e.g. { pragma: "no-cache", host: "dont_redirect_to_www.site.com" }) -2. Enhanced Attribute metadata (e.g. minlength) -3. Parental params from root-level array -4. Deep merge in #render for faux values +1. Custom headers (e.g. { pragma: "no-cache", host: "dont_redirect_to_www.site.com" }) +2. Enhance Attribute metadata (e.g. minlength) +3. Enhance Graph to Graph relationships +4. Custom request strategy ## Contributing -1. Fork it -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 origin my-new-feature`) -5. Create new Pull Request +* Bugs and questions welcomed. If you know (or kind of know) what's going on: + * Write a failing test, kudos for solving it + * Put up a [pull request](https://help.github.com/articles/using-pull-requests)