puts_color 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/puts_color +1 -0
- data/lib/puts_color.rb +31 -27
- data/test/test_puts_color.rb +1 -0
- metadata +2 -2
data/bin/puts_color
CHANGED
data/lib/puts_color.rb
CHANGED
@@ -1,43 +1,47 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
module PutsColor
|
4
|
+
|
5
|
+
def puts_red(*strings)
|
6
|
+
strings.each do |string|
|
7
|
+
puts "\033[0;31m" + string + "\033[0m"
|
8
|
+
end
|
6
9
|
end
|
7
|
-
end
|
8
10
|
|
9
|
-
def puts_green(*strings)
|
10
|
-
|
11
|
-
|
11
|
+
def puts_green(*strings)
|
12
|
+
strings.each do |string|
|
13
|
+
puts "\033[0;32m" + string + "\033[0m"
|
14
|
+
end
|
12
15
|
end
|
13
|
-
end
|
14
16
|
|
15
|
-
def puts_yellow(*strings)
|
16
|
-
|
17
|
-
|
17
|
+
def puts_yellow(*strings)
|
18
|
+
strings.each do |string|
|
19
|
+
puts "\033[0;33m" + string + "\033[0m"
|
20
|
+
end
|
18
21
|
end
|
19
|
-
end
|
20
22
|
|
21
|
-
def puts_blue(*strings)
|
22
|
-
|
23
|
-
|
23
|
+
def puts_blue(*strings)
|
24
|
+
strings.each do |string|
|
25
|
+
puts "\033[0;34m" + string + "\033[0m"
|
26
|
+
end
|
24
27
|
end
|
25
|
-
end
|
26
28
|
|
27
|
-
def puts_purple(*strings)
|
28
|
-
|
29
|
-
|
29
|
+
def puts_purple(*strings)
|
30
|
+
strings.each do |string|
|
31
|
+
puts "\033[0;35m" + string + "\033[0m"
|
32
|
+
end
|
30
33
|
end
|
31
|
-
end
|
32
34
|
|
33
|
-
def puts_cyan(*strings)
|
34
|
-
|
35
|
-
|
35
|
+
def puts_cyan(*strings)
|
36
|
+
strings.each do |string|
|
37
|
+
puts "\033[0;36m" + string + "\033[0m"
|
38
|
+
end
|
36
39
|
end
|
37
|
-
end
|
38
40
|
|
39
|
-
def puts_grey(*strings)
|
40
|
-
|
41
|
-
|
41
|
+
def puts_grey(*strings)
|
42
|
+
strings.each do |string|
|
43
|
+
puts "\033[0;37m" + string + "\033[0m"
|
44
|
+
end
|
42
45
|
end
|
46
|
+
|
43
47
|
end
|
data/test/test_puts_color.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puts_color
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-12-15 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'The productive gem to put colorful string in Linux '
|
15
15
|
email: tobeg3oogle@gmail.com
|