apachecrunch 0.1 → 0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/apachecrunch.rb +6 -2
  2. metadata +4 -4
data/lib/apachecrunch.rb CHANGED
@@ -134,6 +134,10 @@ class LogFormatFactory
134
134
  elsif f_string =~ /^(%[A-Za-z])(.*)/
135
135
  # Simple element (e.g. "%h", "%u")
136
136
  return [@element_factory.from_abbrev($1), $2]
137
+ elsif f_string =~ /^%[<>]([A-Za-z])(.*)/
138
+ # No idea how to handle mod_log_config's "which request" system yet, so we
139
+ # ignore it.
140
+ return [@element_factory.from_abbrev("%" + $1), $2]
137
141
  elsif f_string =~ /^(%\{.+?\}[Ceinor])(.*)/
138
142
  # "Contents of" element (e.g. "%{Accept}i")
139
143
  return [@element_factory.from_abbrev($1), $2]
@@ -282,8 +286,8 @@ end
282
286
  class FormatStringFinder
283
287
  @@FILE_NAME = "log_formats.rb"
284
288
  @@DEFAULT_FORMATS = {
285
- :ncsa => %q!%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"!,
286
- :ubuntu => %q!%h %l %u %t \"%r\" %s %O \"%{Referer}i\" \"%{User-Agent}i\"!
289
+ :ncsa => %q!%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"!,
290
+ :ubuntu => %q!%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"!
287
291
  }
288
292
 
289
293
  # Finds the given format string in the configuration file(s)
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apachecrunch
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dan Slimmon
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-07-09 00:00:00 -04:00
17
+ date: 2011-07-10 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies: []
20
20