<commit_before># rack-esi

Nokogiri based ESI middleware implementation for Rack with (limited) support
for include, remove and comment.

## Features

 * path blacklisting (:skip => nil, expects Regexp)
 * type whitelisting (:only => /^text\/(?:x|ht)ml/)
 * recursion limit (:depth => 5)
 * include limits (:includes => 32)
 * support for &lt;include&gt; alt and noerror attributes

_It's for development purpose..._

## Installation

    gem install rack-esi

## Rails Setup (environment.rb)

    config.gem 'rack-esi'
    require 'rack-esi'
    config.middleware.insert_before config.middleware.first, Rack::ESI

## TODO

 * write documentation
 * write more tests
 * support more ESI elements
 * switch to Nokogiri::XML::SAX::Document?

## Dependencies

 * Nokogiri
 * Rack

## Note on Patches/Pull Requests
 <commit_msg>Added node about namespace declaration.<commit_after># rack-esi

Nokogiri based ESI middleware implementation for Rack with (limited) support
for include, remove and comment.

## Features

 * path blacklisting (:skip => nil, expects Regexp)
 * type whitelisting (:only => /^text\/(?:x|ht)ml/)
 * recursion limit (:depth => 5)
 * include limits (:includes => 32)
 * support for &lt;include&gt; alt and noerror attributes

_It's for development purpose..._

## Installation

    gem install rack-esi

## Rails Setup (environment.rb)

    config.gem 'rack-esi'
    require 'rack-esi'
    config.middleware.insert_before config.middleware.first, Rack::ESI

## TODO

 * write documentation
 * write more tests
 * support more ESI elements

## Dependencies

 * Rack
 * Nokogiri
 ... **and a xmlns:esi="http://www.edge-delivery.org/esi/1.0" declaration around your esi nodes.**

## Note on Patches/Pull Requests
 
{'fraction_non_alphanumeric': 0.12023121387283237, 'fraction_numerical': 0.004624277456647399, 'mean_word_length': 3.988472622478386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1404190', 'n_tokens_mistral': 562, 'n_tokens_neox': 519, 'n_words': 171}