ansi 1.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.
@@ -0,0 +1,3 @@
1
+ Module which makes it very easy to use ANSI codes
2
+ --very nice for beautifying shell output.
3
+
@@ -0,0 +1,3 @@
1
+ Florian Frank
2
+ Trans <transfire@gmail.com>
3
+
@@ -0,0 +1 @@
1
+ 2004-08-01
@@ -0,0 +1 @@
1
+ http://death.rubyforge.org/ansicode
@@ -0,0 +1 @@
1
+ LGPLv3
@@ -0,0 +1 @@
1
+ ansi
@@ -0,0 +1 @@
1
+ death
@@ -0,0 +1 @@
1
+ 2009-07-08
@@ -0,0 +1 @@
1
+ svn://rubyforge.org/var/svn/death/ansicode
@@ -0,0 +1 @@
1
+ ANSI codes at your fingertips!
@@ -0,0 +1 @@
1
+ ANSI
@@ -0,0 +1 @@
1
+ 1.0.0
@@ -0,0 +1,20 @@
1
+ require 'test/unit'
2
+ require 'ansicode'
3
+
4
+ class TestANSICode < Test::Unit::TestCase
5
+
6
+ include ANSICode
7
+
8
+ def test_methods
9
+ str = red + "Hello" + blue + "World"
10
+ out = "\e[31mHello\e[34mWorld"
11
+ assert_equal( out, str )
12
+ end
13
+
14
+ def test_blocks
15
+ str = red { "Hello" } + blue { "World" }
16
+ out = "\e[31mHello\e[0m\e[34mWorld\e[0m"
17
+ assert_equal( out, str )
18
+ end
19
+
20
+ end
@@ -0,0 +1,18 @@
1
+ require 'test/unit'
2
+ require 'stringio'
3
+ require 'ansi/progressbar'
4
+
5
+ class TC_ANSI_Progressbar < Test::Unit::TestCase
6
+
7
+ def test_progressbar
8
+ stio = StringIO.new
9
+ pbar = ANSI::Progressbar.new("Test Bar", 10, stio) do |b|
10
+ b.style(:title => [:red], :bar=>[:blue])
11
+ end
12
+ 10.times do |i|
13
+ sleep 0.1
14
+ pbar.inc
15
+ end
16
+ end
17
+
18
+ end
metadata ADDED
@@ -0,0 +1,93 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ansi
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Florian Frank
8
+ - Trans <transfire@gmail.com>
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2009-08-15 00:00:00 -04:00
14
+ default_executable:
15
+ dependencies: []
16
+
17
+ description: The ANSI project is a collection of ANSI code related libraries enabling ANSI code based colorization and stylization of output. It is very nice for beautifying shell output. This collection is based on a set of scripts spun-off from Ruby Facets. Include are Code (used to be ANSICode), Logger, Progressbar and String. In addition the library include Terminal which provides information about the current output device.
18
+ email: Florian Frank
19
+ executables: []
20
+
21
+ extensions: []
22
+
23
+ extra_rdoc_files:
24
+ - README
25
+ - MANIFEST
26
+ - LICENSE
27
+ - HISTORY
28
+ files:
29
+ - HISTORY
30
+ - LICENSE
31
+ - MANIFEST
32
+ - README
33
+ - demo/logger.rd
34
+ - demo/progressbar.rd
35
+ - lib/ansi.rb
36
+ - lib/ansi/code.rb
37
+ - lib/ansi/logger.rb
38
+ - lib/ansi/progressbar.rb
39
+ - lib/ansi/string.rb
40
+ - lib/ansi/terminal.rb
41
+ - lib/ansi/terminal/curses.rb
42
+ - lib/ansi/terminal/stty.rb
43
+ - lib/ansi/terminal/termios.rb
44
+ - lib/ansi/terminal/win32.rb
45
+ - meta/abstract
46
+ - meta/authors
47
+ - meta/created
48
+ - meta/homepage
49
+ - meta/license
50
+ - meta/package
51
+ - meta/project
52
+ - meta/released
53
+ - meta/repository
54
+ - meta/summary
55
+ - meta/title
56
+ - meta/version
57
+ - test/test_ansicode.rb
58
+ - test/test_progressbar.rb
59
+ has_rdoc: true
60
+ homepage: http://death.rubyforge.org/ansicode
61
+ licenses: []
62
+
63
+ post_install_message:
64
+ rdoc_options:
65
+ - --inline-source
66
+ - --title
67
+ - ansi api
68
+ - --main
69
+ - README
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ version:
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: "0"
83
+ version:
84
+ requirements: []
85
+
86
+ rubyforge_project: death
87
+ rubygems_version: 1.3.5
88
+ signing_key:
89
+ specification_version: 3
90
+ summary: ANSI codes at your fingertips!
91
+ test_files:
92
+ - test/test_ansicode.rb
93
+ - test/test_progressbar.rb