shog 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/lib/shog/formatters/requests.rb +10 -7
- data/lib/shog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f373b0084d189e8c0b81470a50ab2d4023b67b0f
|
4
|
+
data.tar.gz: 3d2d61fca09bb618f2f5d7db0e62bd1b7bb5b364
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5ed2cfe4d14783b65fd8b31b2eb4e770e107bec7f440e117cca55562210c006ca96999dcaf16e0134df0986c96f0064263333a4c632cafe68ccdd3ca48934ae
|
7
|
+
data.tar.gz: 3e523bb7764ab37ea6225201a881332c32a066bf40a0219653958158da02240f147407cb6ca2bf4bfd786ac98d641ad163f5f67df113eefb965b297fce1a5767
|
@@ -17,21 +17,24 @@ module Shog
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Dim detailed info about rendering views
|
20
|
-
match /\s*Rendered\s+(?<view>[^\s]+)\
|
20
|
+
match /\s*Rendered\s+(?<view>[^\s]+)\s(within\s(?<layout>[^\s]+)\s)?\((?<time>.*)\)/ do |msg,match|
|
21
21
|
# http://refiddle.com/18qr
|
22
|
-
" Rendered #{ match["view"].bold }".black
|
22
|
+
parts = [" Rendered #{ match["view"].bold }".black]
|
23
|
+
parts << "within ".black + match["layout"].black.bold if match['layout']
|
24
|
+
parts << format_time( match['time'].black, 50 )
|
25
|
+
parts.join " "
|
23
26
|
end
|
24
27
|
|
25
28
|
# Highlight the final rendered response
|
26
29
|
match /\s*Completed\s(?<code>\d+)\s(?<friendly>.*)\sin\s(?<time>\d+[^\s]*)\s(?<details>.*)/ do |msg,match|
|
27
30
|
# http://refiddle.com/18qq
|
28
31
|
parts = [ "Completed" ]
|
32
|
+
status = "#{match['code']} #{match['friendly']}"
|
29
33
|
parts << case match['code'].to_i
|
30
|
-
when 200..399 then
|
31
|
-
when 400..499 then
|
32
|
-
else
|
34
|
+
when 200..399 then status.green
|
35
|
+
when 400..499 then status.yellow
|
36
|
+
else status.red
|
33
37
|
end
|
34
|
-
parts << match['friendly'].yellow
|
35
38
|
parts << 'in'
|
36
39
|
parts << format_time( match['time'], 250 )
|
37
40
|
parts << match['details'].black
|
@@ -42,7 +45,7 @@ module Shog
|
|
42
45
|
# Highlight the controller and action responding to the request
|
43
46
|
match /Processing by (?<controller>[^\s]*) as (?<format>.*)/ do |msg,match|
|
44
47
|
# http://refiddle.com/18qs
|
45
|
-
"Processing by #{match['controller'].magenta
|
48
|
+
"===".magenta + " Processing by #{match['controller'].magenta} as #{match['format'].yellow}"
|
46
49
|
end
|
47
50
|
|
48
51
|
end
|
data/lib/shog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Alexander
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|