[augeas-devel] [PATCH] Add indentations squid.aug and test_squid.aug

Raphael Pinson raphink at gmail.com
Wed Apr 8 09:18:51 UTC 2009


From: Raphaël Pinson <raphink at rpinson.xerus.net>

---
 lenses/squid.aug            |   12 ++++++++----
 lenses/tests/test_squid.aug |    2 +-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/lenses/squid.aug b/lenses/squid.aug
index a4cad96..0d23e37 100644
--- a/lenses/squid.aug
+++ b/lenses/squid.aug
@@ -14,6 +14,7 @@ module Squid =
 
 let eol         = Util.eol
 let spc         = Util.del_ws_spc
+let indent      = Util.indent
 
 let word        =  /[A-Za-z0-9!_.-]+(\[[0-9]+\])?/
 let sto_to_spc  = store /[^# \t\n]+/
@@ -341,14 +342,15 @@ let entry_re =    "accept_filter"
                 | "zph_option"
                 | "zph_parent"
                 | "zph_sibling"
-let entry       = Spacevars.entry entry_re
+let entry       = indent . Spacevars.entry entry_re
 
 (************************************************************************
  *                                AUTH
  *************************************************************************)
 
 let auth_re     = "auth_param"
-let auth        = [ key "auth_param"
+let auth        = indent 
+                  . [ key "auth_param"
                   . value "scheme"
                   . value "parameter"
                   . (value "setting") ?
@@ -359,7 +361,8 @@ let auth        = [ key "auth_param"
  *************************************************************************)
 
 let acl_re     = "acl"
-let acl        = [ key acl_re . spc
+let acl        = indent
+                 . [ key acl_re . spc
                  . [ key word
                    . value "type"
                    . value "setting"
@@ -373,7 +376,8 @@ let acl        = [ key acl_re . spc
 let http_access_re
                = "http_access"
 let http_access
-               = [ key http_access_re
+               = indent
+                 . [ key http_access_re
                  . spc
                  . [ key /allow|deny/
                    . spc
diff --git a/lenses/tests/test_squid.aug b/lenses/tests/test_squid.aug
index 019b3c8..0391e0a 100644
--- a/lenses/tests/test_squid.aug
+++ b/lenses/tests/test_squid.aug
@@ -6,7 +6,7 @@ auth_param negotiate children 5
 acl many_spaces rep_header Content-Disposition -i [[:space:]]{3,}
 acl CONNECT method CONNECT
 # comment in the middle
-acl local_network src 192.168.1.0/24
+  acl local_network src 192.168.1.0/24
 
 http_access allow manager localhost
 http_access allow local_network
-- 
1.5.6.3




More information about the augeas-devel mailing list