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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e10f5ef853af5fcbf4cb08c8ad1c9ea3bd2e052b
4
- data.tar.gz: 7959b91a38b1127f3d3334f57c9a60b02588c48a
3
+ metadata.gz: f373b0084d189e8c0b81470a50ab2d4023b67b0f
4
+ data.tar.gz: 3d2d61fca09bb618f2f5d7db0e62bd1b7bb5b364
5
5
  SHA512:
6
- metadata.gz: fdfb3ad47f314de243ab410374ff173556693e7d1a1c5f393892ec54b2c5826897d61a839392ea74e4f334be4bbc25974bee7c8f58bd279f0f4da33875d2bbe9
7
- data.tar.gz: d8f5eb102d0cc7b74b7238b092543a6c6611e80ca65a91cc262fadcc5140dce9a748955572b290af81ccf7a824628c7e8ae3e70a4fda4606c31a33e28967d824
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]+)\swithin\s(?<layout>[^\s]+)\s\((?<time>.*)\)/ do |msg,match|
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 + " within ".black + match["layout"].black.bold + " " + format_time( match['time'].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 match['code'].green
31
- when 400..499 then match['code'].yellow
32
- else match['code'].red
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.bold} as #{match['format'].yellow}"
48
+ "===".magenta + " Processing by #{match['controller'].magenta} as #{match['format'].yellow}"
46
49
  end
47
50
 
48
51
  end
@@ -1,5 +1,5 @@
1
1
  module Shog
2
- VERSION_NUMBER = "0.1.2"
2
+ VERSION_NUMBER = "0.1.3"
3
3
  VERSION_SUFFIX = ""
4
4
  VERSION = "#{VERSION_NUMBER}#{VERSION_SUFFIX}"
5
5
  end
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.2
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-19 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails