color_echo 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.ja.md +395 -0
- data/README.md +38 -6
- data/bin/color_echo +142 -48
- data/bin/colorecho +142 -48
- data/bin/lib/display.rb +125 -104
- data/lib/color_echo/const.rb +1 -1
- data/lib/color_echo/functions.rb +55 -0
- data/lib/color_echo/internal.rb +42 -6
- data/lib/color_echo/variables.rb +20 -11
- metadata +3 -2
data/lib/color_echo/variables.rb
CHANGED
@@ -1,19 +1,25 @@
|
|
1
1
|
module CE
|
2
|
-
@@enable
|
3
|
-
@@isset
|
4
|
-
@@
|
5
|
-
@@
|
6
|
-
@@
|
7
|
-
@@
|
8
|
-
@@
|
9
|
-
@@
|
10
|
-
@@
|
11
|
-
@@
|
2
|
+
@@enable = true
|
3
|
+
@@isset = false
|
4
|
+
@@rainbow = false
|
5
|
+
@@allow_output = false
|
6
|
+
@@refresh = false
|
7
|
+
@@refresh_pre_match = false
|
8
|
+
@@code_bg_color = ""
|
9
|
+
@@code_fg_color = ""
|
10
|
+
@@code_text_attr = ""
|
11
|
+
@@code_hitline_bg_color = ""
|
12
|
+
@@code_hitline_fg_color = ""
|
13
|
+
@@code_hitline_text_attr = ""
|
14
|
+
@@code_rainbow = ""
|
15
|
+
@@cnt_limit = 0
|
16
|
+
@@pickup_list = {}
|
12
17
|
|
13
18
|
@@print = method :print
|
14
19
|
@@p = method :p
|
15
20
|
@@puts = method :puts
|
16
|
-
|
21
|
+
|
22
|
+
@@get = lambda do |text|
|
17
23
|
print text
|
18
24
|
end
|
19
25
|
|
@@ -37,6 +43,9 @@ module CE
|
|
37
43
|
else
|
38
44
|
output = strio.string
|
39
45
|
|
46
|
+
# try to remove escape sequence code
|
47
|
+
output = cleanup_text(output) if @@refresh
|
48
|
+
|
40
49
|
# decorate pickup
|
41
50
|
if @@pickup_list.size > 0
|
42
51
|
#before_output = String.new(output)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: color_echo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- khotta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Decorate the command line output with ANSI escape sequence.
|
@@ -22,6 +22,7 @@ extensions: []
|
|
22
22
|
extra_rdoc_files: []
|
23
23
|
files:
|
24
24
|
- LICENSE.txt
|
25
|
+
- README.ja.md
|
25
26
|
- README.md
|
26
27
|
- bin/color_echo
|
27
28
|
- bin/colorecho
|