Simplify how content gets mangled. last-mangle-in-paris
authorDan Brook <broq@cpan.org>
Sun, 6 Nov 2011 22:37:44 +0000 (22:37 +0000)
committerDan Brook <broq@cpan.org>
Sun, 6 Nov 2011 22:37:44 +0000 (22:37 +0000)
commit701c72d262063b1558ab9f1e9c2c28b3ead71160
tree70bd9afd5ab42c816fbf46fdca31e20bd892194e
parent1ff94f744944764df3f541f7caf739180e90e17b
Simplify how content gets mangled.

The many layers of abstraction were unnecessary at this point so I've
pared the code down to the bare minimum based on this POC code:

https://gist.github.com/1343603

Now how we mangle content is based on a wee hash that only takes into
account the current action and the cm (i.e content mangler)
parameter. We decide what to pass into the mangler basde on a wee hash
in ContentMangler which defines the relevant parts of the stash to
pass in. A ContentMangler::Transformer now simply returns a hash that
will be reintegrated into the stash, none of this
action-at-a-distance.

The things that used to work before (diffs & perl code) should
continue to work. I've also added a POC that will PODify blobs
accessible by setting the cm query parameter to doc e.g

http://localhost:3000/Gitalist/master/blob/lib%2FGitalist.pm?cm=doc
12 files changed:
gitalist.conf
lib/Gitalist/ContentMangler/Resolver.pm [deleted file]
lib/Gitalist/ContentMangler/Resolver/Default.pm [deleted file]
lib/Gitalist/ContentMangler/Transformer/EnPodulate.pm [new file with mode: 0644]
lib/Gitalist/ContentMangler/Transformer/SyntaxHighlight.pm [deleted file]
lib/Gitalist/ContentMangler/Transformer/SyntaxHighlightBlob.pm [new file with mode: 0644]
lib/Gitalist/ContentMangler/Transformer/SyntaxHighlightDiff.pm [new file with mode: 0644]
lib/Gitalist/ContentMangler/Transformer/SyntaxHighlightRole.pm [new file with mode: 0644]
lib/Gitalist/Controller/Fragment/Ref.pm
lib/Gitalist/Model/ContentMangler.pm
root/inc/syntax_highlight_css.tt2
root/ref/blob.tt2