toolman 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/toolman/color.rb +39 -0
- data/lib/toolman/toolobject.rb +8 -0
- data/lib/toolman/version.rb +1 -1
- data/toolman.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 568de076e194aab20dcbc8995660c6d409591af0
|
4
|
+
data.tar.gz: e40521008aa514903fbdfc562f855954fbb43e7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d016048a1a0de5d17831d93ac5d1e5fd1c29142b4ef683693f9f6994a09d80daf47cc6b98ec9e4a0577757b340c8bb8d168ab2111bc9da307925fa4b94c7b861
|
7
|
+
data.tar.gz: 15b8b38ccd37b30bbfe7a32f7e85a30d434be8adf6889c4661c4ee4f949596404bb72da2729545a80140d5cd4393b2ba8cac1e34f9ed63605994ae2a17d467e8
|
data/README.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# Toolman
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
Toolman is created by some tools that I often use when I coding.
|
4
|
+
Following is what can toolman do.
|
5
|
+
|
6
|
+
1. Easy print string with color.
|
7
|
+
2. A cute and simple loading bar on command line.
|
8
|
+
3. Print message with a spacial format that you can debug easily.
|
9
|
+
|
10
|
+
|
5
11
|
## Installation
|
6
12
|
|
7
13
|
### RubyGem
|
data/lib/toolman/color.rb
CHANGED
@@ -3,21 +3,46 @@ class Color
|
|
3
3
|
puts colorize1(string, 31)
|
4
4
|
end
|
5
5
|
|
6
|
+
def red!(string)
|
7
|
+
puts colorize2(string, 31)
|
8
|
+
end
|
9
|
+
|
6
10
|
def green(string)
|
7
11
|
puts colorize1(string, 32)
|
8
12
|
end
|
13
|
+
|
14
|
+
def green!(string)
|
15
|
+
puts colorize2(string, 32)
|
16
|
+
end
|
17
|
+
|
9
18
|
def yellow(string)
|
10
19
|
puts colorize1(string, 33)
|
11
20
|
end
|
12
21
|
|
22
|
+
def yellow!(string)
|
23
|
+
puts colorize2(string, 33)
|
24
|
+
end
|
25
|
+
|
13
26
|
def blue(string)
|
14
27
|
puts colorize1(string, 34)
|
15
28
|
end
|
16
29
|
|
30
|
+
def blue!(string)
|
31
|
+
puts colorize2(string, 34)
|
32
|
+
end
|
33
|
+
|
17
34
|
def cyan(string)
|
18
35
|
puts colorize1(string, 36)
|
19
36
|
end
|
20
37
|
|
38
|
+
def cyan!(string)
|
39
|
+
puts colorize2(string, 36)
|
40
|
+
end
|
41
|
+
|
42
|
+
def white(string)
|
43
|
+
puts colorize2(string, 37)
|
44
|
+
end
|
45
|
+
|
21
46
|
|
22
47
|
def colorize2(text, color_code)
|
23
48
|
"\e[1;#{color_code}m#{text}\e[0m"
|
@@ -25,4 +50,18 @@ class Color
|
|
25
50
|
def colorize1(text, color_code)
|
26
51
|
"\e[#{color_code}m#{text}\e[0m"
|
27
52
|
end
|
53
|
+
|
54
|
+
def color_list
|
55
|
+
print "puts.red \"string\" => ";red("string");
|
56
|
+
print "puts.red! \"string\" => ";red!("string");
|
57
|
+
print "puts.green \"string\" => ";green("string");
|
58
|
+
print "puts.green! \"string\" => ";green!("string");
|
59
|
+
print "puts.yellow \"string\" => ";yellow("string");
|
60
|
+
print "puts.yellow! \"string\" => ";yellow!("string");
|
61
|
+
print "puts.blue \"string\" => ";blue("string");
|
62
|
+
print "puts.blue! \"string\" => ";blue!("string");
|
63
|
+
print "puts.cyan \"string\" => ";cyan("string");
|
64
|
+
print "puts.cyan! \"string\" => ";cyan!("string");
|
65
|
+
print "puts.white \"string\" => ";white("string");
|
66
|
+
end
|
28
67
|
end
|
data/lib/toolman/toolobject.rb
CHANGED
@@ -26,4 +26,12 @@ class ToolObject
|
|
26
26
|
def puts
|
27
27
|
@colorMechine
|
28
28
|
end
|
29
|
+
|
30
|
+
def done
|
31
|
+
self.puts.green! "\n=============================\n Done!\n Every thing is good!\n=============================\n"
|
32
|
+
end
|
33
|
+
|
34
|
+
def color_list
|
35
|
+
@colorMechine.color_list
|
36
|
+
end
|
29
37
|
end
|
data/lib/toolman/version.rb
CHANGED
data/toolman.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Mikeva"]
|
10
10
|
spec.email = ["eva091960601@gmail.com"]
|
11
11
|
spec.summary = "Debugman!"
|
12
|
-
spec.description = "
|
12
|
+
spec.description = "Some nice tools when coding"
|
13
13
|
spec.homepage = "https://github.com/eva0919/debugman"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toolman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikeva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description:
|
41
|
+
description: Some nice tools when coding
|
42
42
|
email:
|
43
43
|
- eva091960601@gmail.com
|
44
44
|
executables: []
|