termcolor 0.2.1 → 0.2.3

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.
@@ -4,7 +4,7 @@ http://wiki.github.com/jugyo/termcolor
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Termcolor is a library for ANSII color formatting like HTML for output in terminal.
7
+ Termcolor is a library for ANSI color formatting like HTML for output in terminal.
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ require 'rubygems'
3
+ require 'termcolor'
4
+
5
+ puts TermColor.parse <<EOS
6
+
7
+ <on_blue><white><bold>TermColor Example</bold></white></on_blue>
8
+
9
+ <on_green><white>Termcolor</white></on_green> is a library for <red><bold>ANSII</bold></red> <blue>c</blue><yellow>o</yellow><green>l</green>o<red>r</red> formatting like <on_magenta>HTML</on_magenta>
10
+ for output in terminal.
11
+
12
+ EOS
13
+
14
+ ["REVERSE", "ON_RED", "DARK", "MAGENTA", "ColorScheme", "RESET", "RED", "ON_BLUE", "BLINK", "ON_BLACK", "BOLD", "BLUE", "ON_WHITE", "QuestionError", "CLEAR", "BLACK", "ON_YELLOW", "SampleColorScheme", "UNDERSCORE", "WHITE", "SystemExtensions", "ERASE_CHAR", "YELLOW", "ON_CYAN", "CONCEALED", "ON_GREEN", "CHARACTER_MODE", "UNDERLINE", "CYAN", "Question", "Menu", "VERSION", "ERASE_LINE", "GREEN", "ON_MAGENTA"]
@@ -1,4 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
+ require 'rubygems'
2
3
  require 'highline'
3
4
  require 'cgi'
4
5
  require 'rexml/parsers/streamparser'
@@ -6,7 +7,7 @@ require 'rexml/parsers/baseparser'
6
7
  require 'rexml/streamlistener'
7
8
 
8
9
  module TermColor
9
- VERSION = '0.2.1'
10
+ VERSION = '0.2.3'
10
11
  include REXML
11
12
 
12
13
  class ParseError < StandardError; end
@@ -35,8 +36,7 @@ module TermColor
35
36
  end
36
37
 
37
38
  def tag_start(name, attrs)
38
- esc_seq = HighLine.const_get(name.upcase)
39
- @result << esc_seq
39
+ @result << HighLine.const_get(name.upcase)
40
40
  @tag_stack.push(name)
41
41
  rescue NameError
42
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termcolor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jugyo
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-24 00:00:00 +09:00
12
+ date: 2009-02-28 00:00:00 +09:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -35,6 +35,7 @@ files:
35
35
  - lib/termcolor.rb
36
36
  - spec/spec_helper.rb
37
37
  - spec/termcolor_spec.rb
38
+ - examples/example.rb
38
39
  - README.rdoc
39
40
  - History.txt
40
41
  - Rakefile