peephole 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a34f72540f6b5184fa0ec850fcfd1ec47d90b77
4
- data.tar.gz: 55023f73ab7cf00d01185d3aeb96d90d7f2c709d
3
+ metadata.gz: 59238e307ff2f5d457ef2642772ec473ecaa15cc
4
+ data.tar.gz: 1da71645571ad4db593096adb01c2144651c378f
5
5
  SHA512:
6
- metadata.gz: 44c363edac21c2f548ed02a6999cba6d7910632ad7575df390193411f1fdf0d1108953ad7410725686e05049a14898050d52000345412c679a6efaaf2d99e885
7
- data.tar.gz: 175525369f8ed41650f645d37e9ca6376f08d179d003e0936251f5287ea1ebd5901f493a105dc8a1b970a4c6c148d32344c74ddf677892d5c22066dc54f2af2b
6
+ metadata.gz: 0841a5fcd03f38d79fe9a69fdaf60389ed4c6933af9205dd6e5db775536fae46fbe0a8fbf96c88c2a5f694d5599b334aa1296e872661a92a3b91bf3ab43106a7
7
+ data.tar.gz: 7540491bfd354a5396588544b63b690c742905be542b4b5b9f366fcf4e18b1b5945536427c79d83da4cb3ee6eff3f59b353d806b2fc6d1304ed1039ac1b98911
data/README.md CHANGED
@@ -37,6 +37,8 @@ Peephole.configure do |config|
37
37
  config.lines_per = 200
38
38
  config.bytes_per = 5000
39
39
  config.peeper? do
40
+ # !Rails.env.production?
41
+
40
42
  # current_user.role.admin?
41
43
 
42
44
  # admin_user_signed_in?
@@ -3,7 +3,7 @@ module Peephole
3
3
  attr_accessor :uuid, :type, :num
4
4
  attr_accessor :method, :target, :started_at
5
5
  attr_accessor :params
6
- attr_accessor :status
6
+ attr_accessor :status, :duration
7
7
 
8
8
  module TYPE
9
9
  STARTED = 1
@@ -71,6 +71,7 @@ module Peephole
71
71
  parse_params(logline, loglines, logmap)
72
72
  when TYPE::COMPLETED
73
73
  logmap[logline.uuid].try(:status=, logline.status)
74
+ logmap[logline.uuid].try(:duration=, logline.duration)
74
75
  end
75
76
  end
76
77
 
@@ -139,8 +140,9 @@ module Peephole
139
140
  end
140
141
  self.params = params
141
142
  self.type = TYPE::PARAMS
142
- when / Completed (\d+)/
143
+ when / Completed (\d+) .+ in (.+ms) \(/
143
144
  self.status = $1
145
+ self.duration = $2
144
146
  self.type = TYPE::COMPLETED
145
147
  end
146
148
  if line =~ /\[(\w+\-\w+\-\w+\-\w+\-\w+)\] /
@@ -25,11 +25,13 @@
25
25
  </div>
26
26
  <div class="col-sm-2">
27
27
  <form action="<%= url_for(params) %>">
28
- <div class="input-group">
29
- <input type="number" name="page" value="<%= @page %>" class="form-control" placeholder="Page">
30
- <span class="input-group-btn">
31
- <input type="submit" class="btn btn-default" value="Go">
32
- </span>
28
+ <div class="form-group">
29
+ <div class="input-group">
30
+ <input type="number" name="page" value="<%= @page %>" class="form-control" placeholder="Page">
31
+ <span class="input-group-btn">
32
+ <input type="submit" class="btn btn-default" value="Go">
33
+ </span>
34
+ </div>
33
35
  </div>
34
36
  </form>
35
37
  </div>
@@ -14,6 +14,7 @@
14
14
  method <code>target</code>
15
15
  </td>
16
16
  <td>status</td>
17
+ <td>duration</td>
17
18
  <td colspan="2">params</td>
18
19
  </tr>
19
20
  </thead>
@@ -34,6 +35,7 @@
34
35
  <code><%= logline.target %></code>
35
36
  </td>
36
37
  <td rowspan="<%= rowspan %>"><%= status_label(logline.status) %></td>
38
+ <td rowspan="<%= rowspan %>"><%= logline.duration %></td>
37
39
  <% end %>
38
40
  <td><%= key %></td>
39
41
  <td>
@@ -1,3 +1,3 @@
1
1
  module Peephole
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peephole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - tnantoka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-18 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails