the little toolbar that could
Rack::Reshow adds a toolbar to rendered views that stores different versions of the page. Afterwards, reviewing and comparing outputted changes is a single click away.
gem install rack-reshow
config.gem “rack-reshow”, :lib => “rack/reshow”
In your rackup file:
Development of a view is a trial and error process by far: change code, reload the browser, change to previous version, reload the browser, compare the two versions, repeat until satisfied.
By storing the rendered views each time they change,
Rack::Reshow tightens the review loop, effectively creating a history for each page that can be clicked through.
PStore to store different versions of a page.
Each time a request is received,
Rack::Reshow checks if the
<body> of the response differs from what it last was. If so, it adds it to the store. Afterwards, it injects all previous versions into the response, and makes them transversable via a small, elegant bar.
Rack::Reshow only works on responses that have a
<body>, namely the type of page one works with when dealing with a layout’s look and feel.
Finally, the same page may have different content depending on session variables (i.e. after one logs in), or simply dynamic variables (i.e. displaying the date/time).
Rack::Reshow will store both versions separately, even though there’s no code modification going on behind the scenes.
Copyright © 2010 copypastel. See LICENSE for details.