logtool 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,6 +23,11 @@ module LogTool
23
23
  /^Started (GET|POST|PUT|DELETE) ".+?" for (\d\d?\d?.\d\d?\d?.\d\d?\d?.\d\d?\d?) at .*$/
24
24
  end
25
25
 
26
+ def self.head_2_3 # old rails head
27
+ #$1 = IP, $2 = method
28
+ /^Processing .+? \(for (\d\d?\d?.\d\d?\d?.\d\d?\d?.\d\d?\d?) at .*?(GET|POST|PUT|DELETE).*$/
29
+ end
30
+
26
31
  def self.tail
27
32
  # $1 = response
28
33
  time = /\d+(ms|s)/
@@ -24,6 +24,12 @@ module LogTool
24
24
  block.method = $1
25
25
  block.ip = $2
26
26
  block.text = line + "\n"
27
+ elsif line =~ Block.head_2_3
28
+ blocks << block if block
29
+ block = Block.new
30
+ block.method = $2
31
+ block.ip = $1
32
+ block.text = line + "\n"
27
33
  elsif block and line =~ Block.tail
28
34
  block.response = $1
29
35
  block.time = $2
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "logtool"
5
- s.version = "0.0.1"
5
+ s.version = "0.0.2"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Felipe Tanus"]
8
8
  s.email = ["fotanus@jgmail.com"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logtool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Felipe Tanus