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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/c32.rb +7 -5
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c23007d04b55cc1a999773150ecd1b0cdd7ac8a624e7e9e44a07167856c19e2a
|
4
|
+
data.tar.gz: f8baf9313c6780674b546f45a0bfa0d027ad76a2fc98b106563929a166d78c32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3693f5cbf013f44cdcfbdede5ba10e8eb86c2e95a3ddef3656034a635360c79435a4e88879d20abebc45d8ff85e0fa317f065c6cbaf0c905c6a75abc7d3a38b7
|
7
|
+
data.tar.gz: fc7a8caede95c187fc805b128b86cdbe53e9750be80964a6300a632fdaa0d00ca7c8cc4022063060544d6663e4a339009f13196094876648f9c6b0f38f3d08ea
|
checksums.yaml.gz.sig
CHANGED
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
|
-
|
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").
|
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").
|
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.
|
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-
|
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
|