abril / tokamak

template engine for hypermedia resources that provides a single DSL to generate several media types representations
Other
39 stars 11 forks source link

Removing global vars #15

Closed guilhermesilveira closed 13 years ago

guilhermesilveira commented 13 years ago

This patch removes all global mutable variables and enhances control on the scope of what is accessed.

  1. Sinatra is the simplest to support as it is already based in a application scope concept.
  2. Tilt came right along.
  3. Rails ActionView (where the template is rendered) had the controller in common between all requests so I've used it to register Tokamak. It can be improved if Rails offers an app object accessable from the ActionView object, anyone?
lfcipriani commented 13 years ago

This pull request do a lot of changes on the lib API: change the way you create a builder, register a media type, use the hooks, set a recipe to be built, it's almost a full reimplementation. I'm not confortable in merging a pull request like this, sorry.

guilhermesilveira commented 13 years ago

I believe its compatible with end users, isn't it?

lfcipriani commented 13 years ago

if it's compatible with end users, so there is no reason to change at all