ansi 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,25 @@
1
- = RELEASE HISTORY
1
+ # RELEASE HISTORY
2
2
 
3
- == 1.4.3 | 2012-06-26
3
+ ## 1.5.0 | 2015-01-16
4
+
5
+ ANSI 1.5 introduces one change that is not backward compatiable. The
6
+ `:clear_line` code no longer clears to the end of the line. Instead it
7
+ clears the entire line. If you have used this in the past you
8
+ will need to update your code to use `:clear_eol` or `:clear_right`
9
+ instead. In addition this release finally fixes some long time issues
10
+ with Windows compatability, and a few other bugs. Yeah!
11
+
12
+ Changes:
13
+
14
+ * Alias `:right` and `:left` as `:forward` and `:back` respectively.
15
+ * Change `:clear_line` to clear whole line, not just to the end of line.
16
+ * Add `:cursor_hide` and `:cursor_show` codes.
17
+ * Fix and adjust #rgb method to work as one would expect.
18
+ * Fix Windows compatability (old code was alwasy using stty).
19
+ * Fix duplicated hash key in chart.rb.
20
+
21
+
22
+ ## 1.4.3 | 2012-06-26
4
23
 
5
24
  This release bring two small changes. The first improves support
6
25
  for Windows by only rescuing LoadError when 'win32console' fails
@@ -13,7 +32,7 @@ Changes:
13
32
  * Improvements for getting proper screen width.
14
33
 
15
34
 
16
- == 1.4.2 | 2012-01-29
35
+ ## 1.4.2 | 2012-01-29
17
36
 
18
37
  ANSI chains are a new feature inspired by Kazuyoshi Tlacaelel's Isna project.
19
38
  It is a fluid notation for the String#ansi method, e.g. `"foo".red.on_white`.
@@ -34,7 +53,7 @@ Changes:
34
53
  * Support custom padding for Columns.
35
54
 
36
55
 
37
- == 1.4.1 | 2011-11-09
56
+ ## 1.4.1 | 2011-11-09
38
57
 
39
58
  This release simply fixes a documentation issue, to make sure
40
59
  QED.rdoc appears in the YARD docs. And a shout-out to Chad Perrin
@@ -47,7 +66,7 @@ Changes:
47
66
  * Documentation fixes.
48
67
 
49
68
 
50
- == 1.4.0 | 2011-11-05
69
+ ## 1.4.0 | 2011-11-05
51
70
 
52
71
  New release adds a HexDump class for colorized byte string dumps
53
72
  and fixes some minor cell size issues with the Table class.
@@ -63,7 +82,7 @@ Changes:
63
82
  * Switch to BSD-2-Clause license.
64
83
 
65
84
 
66
- == 1.3.0 | 2011-06-30
85
+ ## 1.3.0 | 2011-06-30
67
86
 
68
87
  This release cleans up the Code module. It adds support for x-term
69
88
  256 color codes. Also, the Diff class is now awesome, making use of
@@ -81,7 +100,7 @@ Changes:
81
100
  * Improved Diff class with LCS algorithm.
82
101
 
83
102
 
84
- == 1.2.5 | 2011-05-03
103
+ ## 1.2.5 | 2011-05-03
85
104
 
86
105
  This release introduces a preliminary rendition of a Diff class
87
106
  for getting colorized comparisons of strings and other objects.
@@ -93,7 +112,7 @@ Changes:
93
112
  * Fixed minor issue with Columns format block; col comes before row.
94
113
 
95
114
 
96
- == 1.2.4 | 2011-04-29
115
+ ## 1.2.4 | 2011-04-29
97
116
 
98
117
  This release improves to the ANSI::Columns class. In particular the
99
118
  layout is more consistent with intended functionality.
@@ -105,7 +124,7 @@ Changes:
105
124
  * ANSI::Columns can take a String or Array list.
106
125
 
107
126
 
108
- == 1.2.3 | 2011-04-08
127
+ ## 1.2.3 | 2011-04-08
109
128
 
110
129
  Minor release to add #clear method to ProgressBar and provide bug
111
130
  fix to BBCode.ansi_to_bbcode. Big thanks goes to Junegunn Choi
@@ -117,7 +136,7 @@ Changes:
117
136
  * Fixed ANSI::BBCode.ansi_to_bbcode and ansi_to_html from omitting lines
118
137
  without any ansi code (Junegunn Choi).
119
138
 
120
- == 1.2.2 | 2010-06-12
139
+ ## 1.2.2 | 2010-06-12
121
140
 
122
141
  This release removes warnings about string arguments for certain
123
142
  ANSI::Code methods. While the string form is considered deprecated,
@@ -133,13 +152,13 @@ Changes:
133
152
  * Add ANSI::Mixin#display.
134
153
 
135
154
 
136
- == 1.2.1 | 2010-05-10
155
+ ## 1.2.1 | 2010-05-10
137
156
 
138
157
  This release was simply a quick fix to remove the incorrect embedded
139
158
  version number, until it gets fixed.
140
159
 
141
160
 
142
- == 1.2.0 | 2010-05-10
161
+ ## 1.2.0 | 2010-05-10
143
162
 
144
163
  This release entails numerous improvements. First and foremost
145
164
  the Code module is transitioning to a block interface only
@@ -165,7 +184,7 @@ Changes:
165
184
  * Many new tests and QED documents.
166
185
 
167
186
 
168
- == 1.1.0 | 2009-10-04
187
+ ## 1.1.0 | 2009-10-04
169
188
 
170
189
  This release is the first toward making the ANSI library
171
190
  more widely usable.
@@ -177,7 +196,7 @@ Changes:
177
196
  * Other minor underthehood improvements.
178
197
 
179
198
 
180
- == 1.0.1 | 2009-08-15
199
+ ## 1.0.1 | 2009-08-15
181
200
 
182
201
  The release fixes a single bug that should allow Ruby 1.9
183
202
  to use the ANSI library.
@@ -187,7 +206,7 @@ Changes:
187
206
  * Renamed PLATFORM to RUBY_PLATFORM
188
207
 
189
208
 
190
- == 1.0.0 | 2009-08-15
209
+ ## 1.0.0 | 2009-08-15
191
210
 
192
211
  This is the initial stand-alone release of ANSI, a collection
193
212
  of ANSI based classes spun-off from Ruby Facets.
@@ -195,3 +214,4 @@ of ANSI based classes spun-off from Ruby Facets.
195
214
  Changes:
196
215
 
197
216
  * Happy Birthday!
217
+
@@ -0,0 +1,23 @@
1
+ BSD-2-Clause License (http://spdx.org/licenses/BSD-2-Clause)
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are
4
+ permitted provided that the following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of
7
+ conditions and the following disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
10
+ of conditions and the following disclaimer in the documentation and/or other materials
11
+ provided with the distribution.
12
+
13
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESS OR IMPLIED
14
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
15
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
16
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
17
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
19
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
20
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
21
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
+
23
+
@@ -0,0 +1,170 @@
1
+ # COPYRIGHT NOTICES
2
+
3
+ ## ANSI
4
+
5
+ Copyright © 2009 [Rubyworks](http://rubyworks.github.com) ·
6
+ License [BSD-2-Clause](http://spdx.org/licenses/BSD-2-Clause) ·
7
+ Website http://rubyworks.github.com/ansi
8
+
9
+ Copyright 2009 Rubyworks.
10
+
11
+ All rights reserved.
12
+
13
+ Redistribution and use in source and binary forms, with or without modification, are
14
+ permitted provided that the following conditions are met:
15
+
16
+ 1. Redistributions of source code must retain the above copyright notice, this list of
17
+ conditions and the following disclaimer.
18
+
19
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
20
+ of conditions and the following disclaimer in the documentation and/or other materials
21
+ provided with the distribution.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESS OR IMPLIED
24
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
25
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS
26
+ OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
29
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
+
33
+ (https://raw.github.com/rubyworks/ansi/master/LICENSE.txt)
34
+
35
+
36
+ ## ProgressBar
37
+
38
+ Copyright © 2001 *Satoru Takabayashi* ·
39
+ License [Ruby](http://spdx.org/licenses/Ruby) ·
40
+ Website http://0xcc.net/ruby-progressbar
41
+
42
+ ProgressBar class is based on the original ProgressBar by Satoru Takabayashi.
43
+
44
+ Ruby/ProgressBar - a text progress bar library
45
+
46
+ Copyright (C) 2001-2005 Satoru Takabayashi <satoru@namazu.org>
47
+ All rights reserved.
48
+ This is free software with ABSOLUTELY NO WARRANTY.
49
+
50
+ You can redistribute it and/or modify it under the terms
51
+ of Ruby's license.
52
+
53
+
54
+ ## HighLine (Terminal Extensions)
55
+
56
+ Copyright &copy; 2006 *Gray Productions* &middot;
57
+ License [Ruby](http://spdx.org/licenses/Ruby) &middot;
58
+ Website http://highline.rubyforge.org
59
+
60
+ The terminal extensions are based on HighLine's SystemExtensions
61
+ by James Edward Gray II.
62
+
63
+ Copyright 2006 Gray Productions
64
+
65
+ Distributed under the user's choice of the {GPL Version 2}[http://www.gnu.org/licenses/old-licenses/gpl-2.0.html]
66
+ (see GPL-2.0.txt for details) or the {Ruby software license}[http://www.ruby-lang.org/en/LICENSE.txt]
67
+ by James Edward Gray II and Greg Brown.
68
+
69
+ Please email James[mailto:james@grayproductions.net] with any questions.
70
+
71
+ (https://github.com/JEG2/highline/blob/master/LICENSE)
72
+
73
+
74
+ ## BBCode
75
+
76
+ Copyright &copy; 2002 *Thomas-Ivo Heinen* &middot;
77
+ License [Ruby](http://spdx.org/licenses/Ruby)
78
+
79
+ BBCode module is a derivative of BBCode by Thomas-Ivo Heinen.
80
+
81
+ Copyright (c) 2002 Thomas-Ivo Heinen
82
+
83
+ This module is free software. You may use, modify, and/or redistribute this
84
+ software under the same terms as Ruby.
85
+
86
+ This program is distributed in the hope that it will be useful, but WITHOUT
87
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
88
+ FOR A PARTICULAR PURPOSE.
89
+
90
+
91
+ ## Rainbow (XTerm Color Support)
92
+
93
+ Copyright &copy; *Marcin Kulik* &middot;
94
+ License [MIT](http://spdx.org/licenses/MIT) &middot;
95
+ Website http://github.com/sickill/rainbow
96
+
97
+ Rainbox provided the bases for building the XTerm 256 color code
98
+ support into the ANSI::Code module.
99
+
100
+ Copyright (c) Marcin Kulik
101
+
102
+ Permission is hereby granted, free of charge, to any person obtaining
103
+ a copy of this software and associated documentation files (the
104
+ "Software"), to deal in the Software without restriction, including
105
+ without limitation the rights to use, copy, modify, merge, publish,
106
+ distribute, sublicense, and/or sell copies of the Software, and to
107
+ permit persons to whom the Software is furnished to do so, subject to
108
+ the following conditions:
109
+
110
+ The above copyright notice and this permission notice shall be
111
+ included in all copies or substantial portions of the Software.
112
+
113
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
114
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
115
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
116
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
117
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
118
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
119
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
120
+
121
+ (https://raw.github.com/sickill/rainbow/master/LICENSE)
122
+
123
+
124
+ ## Paint (ANSI Code Names)
125
+
126
+ Copyright &copy; 2011 *Jan Lelis* &middot;
127
+ License [MIT](http://spdx.org/licenses/MIT) &middot;
128
+ Website https://github.com/janlelis/paint
129
+
130
+ Some of the latest ANSI code names, and inspiration to check out Rainbow
131
+ and include XTerm 256 color codes, came from Paint.
132
+
133
+ Copyright (c) 2011 Jan Lelis
134
+
135
+ Permission is hereby granted, free of charge, to any person obtaining
136
+ a copy of this software and associated documentation files (the
137
+ "Software"), to deal in the Software without restriction, including
138
+ without limitation the rights to use, copy, modify, merge, publish,
139
+ distribute, sublicense, and/or sell copies of the Software, and to
140
+ permit persons to whom the Software is furnished to do so, subject to
141
+ the following conditions:
142
+
143
+ The above copyright notice and this permission notice shall be
144
+ included in all copies or substantial portions of the Software.
145
+
146
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
147
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
148
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
149
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
150
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
151
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
152
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
153
+
154
+ (https://raw.github.com/janlelis/paint/master/LICENSE.txt)
155
+
156
+
157
+ ## ANSIColor
158
+
159
+ _Acknowlegement_
160
+
161
+ Copyright &copy; 2002 *Florian Frank* &middot;
162
+ Website http://flori.github.com/term-ansicolor
163
+
164
+ Albeit the code no long bares much, if any, resemblance to it, the ANSI Code
165
+ module (and subsequently the Constants module) originated with the
166
+ ANSIColor library by Florian Frank.
167
+
168
+ Copyright (c) 2002 Florian Frank
169
+
170
+
@@ -1,14 +1,14 @@
1
- = ANSI
1
+ # ANSI
2
2
 
3
- {Home}[http://rubyworks.github.com/ansi] /
4
- {API}[http://rubydoc.info/gems/ansi/frames] /
5
- {Code}[http://github.com/rubyworks/ansi] /
6
- {Mail}[http://googlegroups.com/group/rubyworks-mailinglist]
3
+ [HOME](http://rubyworks.github.com/ansi) &middot;
4
+ [API](http://rubydoc.info/gems/ansi/frames) &middot;
5
+ [MAIL](http://googlegroups.com/group/rubyworks-mailinglist) &middot;
6
+ [ISSUES](http://github.com/rubyworks/ansi/issues) &middot;
7
+ [SOURCE](http://github.com/rubyworks/ansi)
7
8
 
8
- {<img src="http://travis-ci.org/rubyworks/ansi.png" />}[http://travis-ci.org/rubyworks/ansi]
9
+ [![Build Status](https://secure.travis-ci.org/rubyworks/ansi.png)](http://travis-ci.org/rubyworks/ansi)
9
10
 
10
-
11
- == DESCRIPTION
11
+ <br/>
12
12
 
13
13
  The ANSI project is a collection of ANSI escape code related libraries
14
14
  enabling ANSI code based colorization and stylization of output.
@@ -21,7 +21,7 @@ Terminal which provides information about the current output
21
21
  device.
22
22
 
23
23
 
24
- == FEATURES
24
+ ## Features
25
25
 
26
26
  * ANSI::Code provides ANSI codes as module functions.
27
27
  * String#ansi makes common usage very easy and elegant.
@@ -30,52 +30,56 @@ device.
30
30
  * Additional clases for colorized columns, tables, loggers and more.
31
31
 
32
32
 
33
- == RELEASE NOTES
34
-
35
- Please see HISTORY file.
36
-
37
-
38
- == SYNOPSIS
33
+ ## Synopsis
39
34
 
40
35
  There are a number of modules and classes provided by the ANSI
41
36
  package. To get a good understanding of them it is best to pursue
42
- the QED documents[http://github.com/rubyworks/ansi/tree/master/qed/]
43
- or the API documentation[http://rubyworks.github.com/ansi/api/index.html].
37
+ the [QED documents](http://github.com/rubyworks/ansi/tree/master/qed/)
38
+ or the [API documentation](http://rubyworks.github.com/ansi/api/index.html).
44
39
 
45
40
  At the heart of all the provided libraries lies the ANSI::Code module
46
41
  which defines ANSI codes as constants and methods. For example:
47
42
 
48
- require 'ansi/code'
43
+ require 'ansi/code'
49
44
 
50
- ANSI.red + "Hello" + ANSI.blue + "World"
51
- => "\e[31mHello\e[34mWorld"
45
+ ANSI.red + "Hello" + ANSI.blue + "World"
46
+ => "\e[31mHello\e[34mWorld"
52
47
 
53
48
  Or in block form.
54
49
 
55
- ANSI.red{ "Hello" } + ANSI.blue{ "World" }
56
- => "\e[31mHello\e[0m\e[34mWorld\e[0m"
50
+ ANSI.red{ "Hello" } + ANSI.blue{ "World" }
51
+ => "\e[31mHello\e[0m\e[34mWorld\e[0m"
57
52
 
58
53
  The methods defined by this module are used throughout the rest of
59
54
  the system.
60
55
 
61
56
 
62
- == INSTALLATION
57
+ ## Installation
58
+
59
+ ### RubyGems
63
60
 
64
61
  To install with RubyGems simply open a console and type:
65
62
 
66
- $ sudo gem install ansi
63
+ $ sudo gem install ansi
64
+
65
+ ### Setup.rb (not recommended)
67
66
 
68
67
  Local installation requires Setup.rb (gem install setup),
69
- then download[http://github.com/rubyworks/ansi/download] the tarball package and type:
68
+ then [download](http://github.com/rubyworks/ansi/download) the tarball package and type:
70
69
 
71
- $ tar -xvzf ansi-1.0.0.tgz
72
- $ cd ansi-1.0.0
73
- $ sudo setup.rb all
70
+ $ tar -xvzf ansi-1.0.0.tgz
71
+ $ cd ansi-1.0.0
72
+ $ sudo setup.rb all
74
73
 
75
74
  Windows users use 'ruby setup.rb all'.
76
75
 
77
76
 
78
- == LICENSE & COPYRIGHTS
77
+ ## Release Notes
78
+
79
+ Please see HISTORY.md file.
80
+
81
+
82
+ ## License & Copyrights
79
83
 
80
84
  Copyright (c) 2009 Rubyworks
81
85
 
@@ -83,5 +87,5 @@ This program is redistributable under the terms of the *FreeBSD* license.
83
87
 
84
88
  Some pieces of the code are copyrighted by others.
85
89
 
86
- See COPYING.rdoc file for details.
90
+ See LICENSE.txt and NOTICE.md files for details.
87
91