halfdan / piwik-ruby-tracking

A Ruby Gem that allows you to add the Piwik Tracking Code to Sinatra, Padrinorb and Rails
MIT License
52 stars 33 forks source link

Move js to ERB template files #6

Closed berkes closed 11 years ago

berkes commented 11 years ago

This allows implementers to override in their application when wanted. It makes the code a little cleaner, no HEREDOC and no inline HTML/JS.

It requires a Rails::Engine instead of Railtie, so that the path discovery for templates works more predictable. This requires a small change to the includer and a rename of the railtie to engine. This makes the plugin an engine, not a railtie; a rather large change IMHO.

halfdan commented 11 years ago

Very nice! I will release it within a week, together with a new Tracker DSL so people can use the JS Tracker API.