c32 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: f4b94f0bd71caba2b78e45120a5f14f9379c7440bc8b724c24f655f4135aa4d2
4
- data.tar.gz: 85a58de545fbcbd55c0e1396b588a0be9e37047a8eea1a1abc07027f36421b34
3
+ metadata.gz: c23007d04b55cc1a999773150ecd1b0cdd7ac8a624e7e9e44a07167856c19e2a
4
+ data.tar.gz: f8baf9313c6780674b546f45a0bfa0d027ad76a2fc98b106563929a166d78c32
5
5
  SHA512:
6
- metadata.gz: 53b6b726d127e29f5eccf3168c6c60ed6850ac354361ea7cd7472995bfe4a8cb31ba4448667b02f8e3978debfa4a0deb368eebb1799f66a53cfade43490d5fec
7
- data.tar.gz: 76ca2e3f8c2db4f94114dfb192400d9ccdc63a91ca04f8802483c98dfb57f00ce5d984c9141411514986d09d6a43d52c0448e6db14830ef6fdb2ed34af3e63fa
6
+ metadata.gz: 3693f5cbf013f44cdcfbdede5ba10e8eb86c2e95a3ddef3656034a635360c79435a4e88879d20abebc45d8ff85e0fa317f065c6cbaf0c905c6a75abc7d3a38b7
7
+ data.tar.gz: fc7a8caede95c187fc805b128b86cdbe53e9750be80964a6300a632fdaa0d00ca7c8cc4022063060544d6663e4a339009f13196094876648f9c6b0f38f3d08ea
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/c32.rb CHANGED
@@ -8,21 +8,23 @@ module ColouredText
8
8
 
9
9
  colours = %i(black red green brown blue magenta cyan gray)
10
10
  colours.each.with_index {|c,i| define_method(c){ colorize(30+i)}}
11
- bg_colours = colours.map {|c| ('bg_' + c.to_s).to_sym}
12
- bg_colours.each.with_index {|c,i| define_method(c){ colorize(40+i)}}
11
+ bg_colours = colours.map {|c| ('bg_' + c.to_s).to_sym}\
12
+ .each.with_index {|c,i| define_method(c){ colorize(40+i)}}
13
13
 
14
14
  def debug()
15
- "debug: ".green + self
15
+ "debug: ".green + self.gsub(/.(?=\w+\:)/,"\n ")\
16
+ .gsub(/(?<=\: )\w+/) {|x| x.green.bold }\
17
+ .gsub(/\w+\:/) {|x| ("%s" % x).cyan.bold} + "\n\n"
16
18
  end
17
19
 
18
20
  def warn()
19
- "warning: ".brown + Time.now.strftime("%H:%M:%S").gray + ' ' + self
21
+ "warning: ".brown + Time.now.strftime("%H:%M:%S").cyan + ' ' + self
20
22
  end
21
23
 
22
24
  alias warning warn
23
25
 
24
26
  def error()
25
- "error: ".red + Time.now.strftime("%Y-%b-%d %H:%M").gray + ' ' + self
27
+ "error: ".red.bold + Time.now.strftime("%Y-%b-%d %H:%M").cyan + ' ' + self
26
28
  end
27
29
 
28
30
  alias err error
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c32
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  lxOOmIngL7E/QH/hAd3I35TI6ddGk9WuqQjXr6Wd8nA/9WqCCF/5F3FyKfJVvF2b
36
36
  nwOv+LDi2NDDbJyXte8gtAi6
37
37
  -----END CERTIFICATE-----
38
- date: 2018-11-03 00:00:00.000000000 Z
38
+ date: 2018-11-04 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
metadata.gz.sig CHANGED
Binary file