c32 0.1.2 → 0.2.0

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: d3707b676bc9e317271013d8b87599fe03557f2cafb80043877cc090ea479a48
4
- data.tar.gz: 77e20d3ddae9883e03679b1ae592b4ba2192bb124005138b9426f5ec7d3ba550
3
+ metadata.gz: ccd14d9e64655378d10140f656797a3e1b953a4ff0eab3e12d4582bd3eacb705
4
+ data.tar.gz: d80aa7b543ac68194871e19a3dc571399e737d1666cf32343306c37802434bea
5
5
  SHA512:
6
- metadata.gz: 1a30818e2ee9d8a214f57dccca05e6b1ec70ab369023515adef28ea002232df47ffa8326c833829f4bc586f84da5fd1dc748328f9638eb9f08611ede8b21cf62
7
- data.tar.gz: 1ac77dfb5d5427985970a2b6ba3ebb15b67284f2cb74d8c1bd2861c762a49be03dc787df41b7fd88155be8ab0b73ed592b44f01c8ae7d57426466c17d46fdb2d
6
+ metadata.gz: f263e5b5bbf15f3f4b5822a9134ef16bff3799570ca65dbdbfdafc66dd32f9039bb61cd939ecf8f6067fc780f12a5acdec9fd1d6efebb88c69bf511509b552f8
7
+ data.tar.gz: 2cdaced33a80a76c4220f9ddb15cd4bf4dbb8c39d48788c06dbe44eb068c6dbbbcc9c964abd08816be53b8179dd640326233401bc12f46b27fce72cf27a15d22
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/c32.rb CHANGED
@@ -8,13 +8,18 @@ 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
+
12
+ colours.each.with_index do |c,i|
13
+ define_method(('light_' + c.to_s).to_sym){ colorize(90+i)}
14
+ end
15
+
11
16
  bg_colours = colours.map {|c| ('bg_' + c.to_s).to_sym}\
12
17
  .each.with_index {|c,i| define_method(c){ colorize(40+i)}}
13
18
 
14
19
  def debug()
15
- "debug: ".green + self.gsub(/(?=\b\w+\: )/,"\n ")\
16
- .gsub(/(?<=\: )\w+/) {|x| x.green.bold }\
17
- .gsub(/\w+\:(?= )/) {|x| ("%s" % x).cyan.bold} + "\n\n"
20
+ "debug: ".green + self.sub(/(?=\b[\S]+\: )/,"\n ")\
21
+ .sub(/(?<=\: )\S+/) {|x| x.green.bold }\
22
+ .sub(/\S+\:(?= )/) {|x| ("%s" % x).cyan.bold} + "\n\n"
18
23
  end
19
24
 
20
25
  def warn()
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.2
4
+ version: 0.2.0
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-04 00:00:00.000000000 Z
38
+ date: 2019-05-05 00:00:00.000000000 Z
39
39
  dependencies: []
40
40
  description:
41
41
  email: james@jamesrobertson.eu
@@ -63,8 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  - !ruby/object:Gem::Version
64
64
  version: '0'
65
65
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.7.6
66
+ rubygems_version: 3.0.1
68
67
  signing_key:
69
68
  specification_version: 4
70
69
  summary: Makes it easier to read debug messages using coloured text.
metadata.gz.sig CHANGED
Binary file