rdo 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.
@@ -12,6 +12,7 @@ module RDO
12
12
  class ColoredLogger < Logger
13
13
  def initialize(*args)
14
14
  super
15
+ @colors = [35, 36]
15
16
  self.formatter = color_formatter
16
17
  end
17
18
 
@@ -31,7 +32,8 @@ module RDO
31
32
  end
32
33
 
33
34
  def format_sql(sql)
34
- "\033[35mSQL\033[0m \033[36m~\033[0m %s" % sql
35
+ a, b = @colors.reverse!
36
+ "\033[#{a}mSQL\033[0m %s" % sql.sub(/\A(\(\d+\.\d+\))(.*)\Z/, "\\1 \033[#{b}m~\033[0m \\2")
35
37
  end
36
38
 
37
39
  def format_err(msg)
@@ -6,5 +6,5 @@
6
6
  ##
7
7
 
8
8
  module RDO
9
- VERSION = "0.1.2"
9
+ VERSION = "0.1.3"
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: