minimal_logging 0.0.6 → 0.0.7

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: a0a1f4aa43339b09936779f475d6f20f6bf04a43
4
- data.tar.gz: d433a85e1ae4343e043de53eb796bb33831864c4
3
+ metadata.gz: 468ab324cf66e805a52bbfa5f878c10cb2a8c14f
4
+ data.tar.gz: 343d19053270aaf31236754f99ac283f3aac03d4
5
5
  SHA512:
6
- metadata.gz: c31693023128a6e6ab5fe1eeedc0bd14c0b5bd99a41a61b702d4551ae689394a867aecb1b1a97158dae4d33bd089963db00bdab04adab205ca9028076566405f
7
- data.tar.gz: b7b745c41551aac23bbe12989ed352e46960c13455ecb2fb1e32bdd7770c13d625bb4d29734c9c9012188ca35a11d89117b2a9dd6afa308cb1fd4be6fc046ca1
6
+ metadata.gz: c4fbbc9a8cee3e41ac5769029ed166bdc3e0e03c9f41b4bf21b6c28bcab5e62193ce271ecad63a60881b25c5e2fcdf56df63b29d2e00b0414820499de5791a0f
7
+ data.tar.gz: 8b88565d5d9e123c11c6845a3414c586407893d599249102a62c5b52483d8b5de2164ede8e89ebb0188efb729c255e38908155082cc6da565d0ffd4acbddd650
@@ -37,15 +37,19 @@ class ActionController::LogSubscriber
37
37
 
38
38
  def format_message(status)
39
39
  if status < 300
40
- status.to_s.colorize(:green)
40
+ color_status(status, :green)
41
41
  elsif status < 400
42
- status.to_s.colorize(:yellow)
42
+ color_status(status, :yellow)
43
43
  elsif status < 500
44
- status.to_s.colorize(:red)
44
+ color_status(status, :red)
45
45
  elsif status < 600
46
- status.to_s.colorize(:light_red)
46
+ color_status(status, :light_red)
47
47
  else
48
- status
48
+ status.to_s
49
49
  end
50
50
  end
51
+
52
+ def color_status(status, color)
53
+ status.to_s.colorize(color)
54
+ end
51
55
  end
@@ -1,3 +1,3 @@
1
1
  module MinimalLogging
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Nelson