iron-term-ansicolor 0.0.3-universal-.net-2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc ADDED
@@ -0,0 +1,16 @@
1
+ = iron-term-ansicolor
2
+
3
+ iron-term-console is a library for IronRuby that makes use of the .Net framework
4
+ System.Console and related classes to provide colored output for ANSI formatted
5
+ strings.
6
+
7
+ For the Ruby OneClick installer, a package called win32console exists to provide
8
+ this functionality. It makes calls to the Win32 API, including bit twiddling,
9
+ to provide colored console output for that Ruby distribution. In IronRuby, we
10
+ have direct access to the .Net Base Class Library. Rather than writing C# code
11
+ to create an IronRuby module to interact with a C++ API, this library directly
12
+ uses the .Net BCL, and write the code directly in Ruby.
13
+
14
+ == Copyright
15
+
16
+ Copyright (c) 2009 Will Green, Ivan Porto Carrero, David Blackmon. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,239 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'fileutils'
4
+ require 'rake/rdoctask'
5
+ require 'lib/iron-term-ansicolor'
6
+ require 'spec/rake/spectask'
7
+ Spec::Rake::SpecTask.new(:spec) do |spec|
8
+ spec.libs << 'lib' << 'spec'
9
+ spec.spec_files = FileList['spec/**/*_spec.rb']
10
+ end
11
+
12
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
13
+ spec.libs << 'lib' << 'spec'
14
+ spec.pattern = 'spec/**/*_spec.rb'
15
+ spec.rcov = true
16
+ end
17
+
18
+
19
+ task :default => :spec
20
+
21
+
22
+ ##############################################################################
23
+ # OPTIONS
24
+ ##############################################################################
25
+
26
+ PKG_NAME = 'iron-term-ansicolor'
27
+ PKG_VERSION = if File.exist?('VERSION.yml')
28
+ config = YAML.load(File.read('VERSION.yml'))
29
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
30
+ else
31
+ version = IronTermAnsiColor::Version::STRING
32
+ end
33
+ AUTHORS = ['Will Green', 'David Blackmon', 'Ivan Porto Carrero', 'Danny Coates']
34
+ EMAIL = "will@hotgazpacho.org"
35
+ HOMEPAGE = "http://github.com/hotgazpacho/iron-term-ansicolor"
36
+ SUMMARY = "iron-term-ansicolor brings color output to IronRuby on Windows"
37
+
38
+ # These are the common rdoc options that are shared between generation of
39
+ # rdoc files using BOTH 'rake rdoc' and the installation by users of a
40
+ # RubyGem version which builds rdoc's along with its installation. Any
41
+ # rdoc options that are ONLY for developers running 'rake rdoc' should be
42
+ # added in the 'Rake::RDocTask' block below.
43
+ RDOC_OPTIONS = [
44
+ "--quiet",
45
+ "--title", SUMMARY,
46
+ "--main", "README.rdoc",
47
+ "--line-numbers",
48
+ "--format","darkfish"
49
+ ]
50
+
51
+ # Extra files outside of the lib dir that should be included with the rdocs.
52
+ RDOC_FILES = (%w( README.rdoc)).sort
53
+
54
+ # The full file list used for rdocs, tarballs, gems, and for generating the xmpp4r.gemspec.
55
+ PKG_FILES = (%w( Rakefile iron-term-ansicolor.gemspec ) + RDOC_FILES + Dir["{lib,spec}/**/*"]).sort
56
+
57
+ TEST_FILES = Dir["spec/**/*"].sort
58
+
59
+ # RDOC
60
+ #######
61
+ Rake::RDocTask.new do |rd|
62
+
63
+ # which dir should rdoc files be installed in?
64
+ rd.rdoc_dir = 'rdoc'
65
+ rd.title = "iron-term-ansicolor #{PKG_VERSION}"
66
+
67
+ # the full list of files to be included
68
+ rd.rdoc_files.include('README*')
69
+ rd.rdoc_files.include(RDOC_FILES, "lib/**/*.rb")
70
+
71
+ # the full list of options that are common between gem build
72
+ # and 'rake rdoc' build of docs.
73
+ rd.options = RDOC_OPTIONS
74
+
75
+ # Devs Only : Uncomment to also document private methods in the rdocs
76
+ # Please don't check this change in to the source repo.
77
+ #rd.options << '--all'
78
+
79
+ # Devs Only : Uncomment to generate dot (graphviz) diagrams along with rdocs.
80
+ # This requires that graphiz (dot) be installed as a local binary and on your path.
81
+ # See : http://www.graphviz.org/
82
+ # Please don't check this change in to the source repo as it introduces a binary dependency.
83
+ #rd.options << '--diagram'
84
+ #rd.options << '--fileboxes'
85
+
86
+ end
87
+
88
+ ##############################################################################
89
+ # PACKAGING & INSTALLATION
90
+ ##############################################################################
91
+
92
+ # What files/dirs should 'rake clean' remove?
93
+ #CLEAN.include ["*.gem", "pkg", "rdoc", "coverage"]
94
+
95
+ begin
96
+ require 'rake/gempackagetask'
97
+
98
+ spec = Gem::Specification.new do |s|
99
+ s.name = PKG_NAME
100
+ s.version = PKG_VERSION
101
+ s.authors = AUTHORS
102
+ s.email = EMAIL
103
+ s.homepage = HOMEPAGE
104
+ s.rubyforge_project = PKG_NAME
105
+ s.summary = SUMMARY
106
+ s.description = s.summary
107
+ s.platform = Gem::Platform::CURRENT #Gem::Platform::RUBY
108
+ s.require_path = 'lib'
109
+ s.executables = []
110
+ s.files = PKG_FILES
111
+ s.test_files = TEST_FILES
112
+ s.has_rdoc = true
113
+ s.extra_rdoc_files = RDOC_FILES
114
+ s.rdoc_options = RDOC_OPTIONS
115
+ s.required_ruby_version = ">= 1.8.6"
116
+ s.add_dependency 'term-ansicolor', ">= 1.0.4"
117
+ s.add_development_dependency 'rspec'
118
+ end
119
+
120
+ Rake::GemPackageTask.new(spec) do |pkg|
121
+ pkg.gem_spec = spec
122
+ pkg.need_tar = true
123
+ pkg.need_zip = true
124
+ end
125
+
126
+ namespace :gem do
127
+
128
+ desc "Run :package and install the .gem locally"
129
+ task :install => [:update_gemspec, :package] do
130
+ sh %{sudo gem install --local pkg/#{PKG_NAME}-#{PKG_VERSION}.gem}
131
+ end
132
+
133
+ desc "Like gem:install but without ri or rdocs"
134
+ task :install_fast => [:update_gemspec, :package] do
135
+ sh %{sudo gem install --local pkg/#{PKG_NAME}-#{PKG_VERSION}.gem --no-rdoc --no-ri}
136
+ end
137
+
138
+ desc "Run :clean and uninstall the .gem"
139
+ task :uninstall => :clean do
140
+ sh %{sudo gem uninstall #{PKG_NAME}}
141
+ end
142
+
143
+ # Thanks to the Merb project for this code.
144
+ desc "Update Github Gemspec"
145
+ task :update_gemspec do
146
+ skip_fields = %w(new_platform original_platform date)
147
+
148
+ result = "# WARNING : RAKE AUTO-GENERATED FILE. DO NOT MANUALLY EDIT!\n"
149
+ result << "# RUN : 'rake gem:update_gemspec'\n\n"
150
+ result << "Gem::Specification.new do |s|\n"
151
+ spec.instance_variables.sort.each do |ivar|
152
+ value = spec.instance_variable_get(ivar)
153
+ name = ivar.to_s.split("@").last
154
+ next if skip_fields.include?(name) || value.nil? || value == "" || (value.respond_to?(:empty?) && value.empty?)
155
+ if name == "dependencies"
156
+ value.each do |d|
157
+ dep, *ver = d.to_s.split(" ")
158
+ result << " s.add_dependency #{dep.inspect}, #{ver.join(" ").inspect.gsub(/[()]/, "")}\n"
159
+ end
160
+ else
161
+ case value
162
+ when Array
163
+ value = name != "files" ? value.inspect : value.sort.uniq.inspect.split(",").join(",\n")
164
+ when String, Fixnum, true, false
165
+ value = value.inspect
166
+ else
167
+ value = value.to_s.inspect
168
+ end
169
+ result << " s.#{name} = #{value}\n"
170
+ end
171
+ end
172
+ result << "end"
173
+ File.open(File.join(File.dirname(__FILE__), "#{spec.name}.gemspec"), "w"){|f| f << result}
174
+ end
175
+
176
+ end # namespace :gem
177
+
178
+ # also keep the gemspec up to date each time we package a tarball or gem
179
+ task :package => ['gem:update_gemspec']
180
+ task :gem => ['gem:update_gemspec']
181
+
182
+ rescue LoadError
183
+ puts <<EOF
184
+ ###
185
+ Packaging Warning : RubyGems is apparently not installed on this
186
+ system and any file add/remove/rename will not
187
+ be auto-updated in the 'iron-term-ansicolor.gemspec' when you run any
188
+ package tasks. All such file changes are recommended
189
+ to be packaged on a system with RubyGems installed
190
+ if you intend to push commits to the Git repo so the
191
+ gemspec will also stay in sync for others.
192
+ ###
193
+ EOF
194
+ end
195
+
196
+ # we are apparently on a system that does not have RubyGems installed.
197
+ # Lets try to provide only the basic tarball package tasks as a fallback.
198
+ unless defined? Gem
199
+ begin
200
+ require 'rake/packagetask'
201
+ Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |p|
202
+ p.package_files = PKG_FILES
203
+ p.need_tar = true
204
+ p.need_zip = true
205
+ end
206
+ rescue LoadError
207
+ puts <<EOF
208
+ ###
209
+ Warning : Unable to require the 'rake/packagetask'. Is Rake installed?
210
+ ###
211
+ EOF
212
+ end
213
+ end
214
+
215
+ begin
216
+ require 'jeweler'
217
+ Jeweler::Tasks.new do |gem|
218
+ gem.name = PKG_NAME
219
+ gem.summary = SUMMARY
220
+ gem.description = SUMMARY
221
+ gem.email = EMAIL
222
+ gem.homepage = HOMEPAGE
223
+ gem.authors = AUTHORS
224
+ gem.platform = Gem::Platform::CURRENT
225
+ gem.required_ruby_version = ">= 1.8.6"
226
+ gem.add_dependency 'term-ansicolor', ">= 1.0.4"
227
+ gem.add_development_dependency 'rspec'
228
+ gem.files = PKG_FILES
229
+ gem.test_files = TEST_FILES
230
+ gem.has_rdoc = true
231
+ gem.extra_rdoc_files = RDOC_FILES
232
+ gem.rdoc_options = RDOC_OPTIONS
233
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
234
+ end
235
+
236
+ rescue LoadError
237
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
238
+ end
239
+
@@ -0,0 +1,56 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{iron-term-ansicolor}
8
+ s.version = "0.0.3"
9
+ s.platform = %q{universal-.net-2.0}
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.authors = ["Will Green", "David Blackmon", "Ivan Porto Carrero", "Danny Coates"]
13
+ s.date = %q{2010-03-07}
14
+ s.description = %q{iron-term-ansicolor brings color output to IronRuby on Windows}
15
+ s.email = %q{will@hotgazpacho.org}
16
+ s.extra_rdoc_files = [
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "README.rdoc",
21
+ "Rakefile",
22
+ "iron-term-ansicolor.gemspec",
23
+ "lib/iron-term-ansicolor.rb",
24
+ "spec/iron-term-ansicolor_simple_background_spec.rb",
25
+ "spec/iron-term-ansicolor_simple_foreground_spec.rb",
26
+ "spec/spec_helper.rb"
27
+ ]
28
+ s.homepage = %q{http://github.com/hotgazpacho/iron-term-ansicolor}
29
+ s.rdoc_options = ["--quiet", "--title", "iron-term-ansicolor brings color output to IronRuby on Windows", "--main", "README.rdoc", "--line-numbers", "--format", "darkfish"]
30
+ s.require_paths = ["lib"]
31
+ s.required_ruby_version = Gem::Requirement.new(">= 1.8.6")
32
+ s.rubygems_version = %q{1.3.5}
33
+ s.summary = %q{iron-term-ansicolor brings color output to IronRuby on Windows}
34
+ s.test_files = [
35
+ "spec/iron-term-ansicolor_simple_background_spec.rb",
36
+ "spec/iron-term-ansicolor_simple_foreground_spec.rb",
37
+ "spec/spec_helper.rb"
38
+ ]
39
+
40
+ if s.respond_to? :specification_version then
41
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
42
+ s.specification_version = 3
43
+
44
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
45
+ s.add_runtime_dependency(%q<term-ansicolor>, [">= 1.0.4"])
46
+ s.add_development_dependency(%q<rspec>, [">= 0"])
47
+ else
48
+ s.add_dependency(%q<term-ansicolor>, [">= 1.0.4"])
49
+ s.add_dependency(%q<rspec>, [">= 0"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<term-ansicolor>, [">= 1.0.4"])
53
+ s.add_dependency(%q<rspec>, [">= 0"])
54
+ end
55
+ end
56
+
@@ -0,0 +1,107 @@
1
+ begin
2
+ require 'mscorlib'
3
+ rescue LoadError
4
+ print "iron-term-ansicolor will only work on IronRuby"
5
+ end
6
+ require 'term/ansicolor'
7
+
8
+ class String
9
+ include Term::ANSIColor
10
+ end
11
+
12
+ module IronTermAnsiColor
13
+ include System
14
+ module Version
15
+ MAJOR=0
16
+ MINOR=0
17
+ PATCH=3
18
+ STRING="#{MAJOR}.#{MINOR}.#{PATCH}"
19
+ end
20
+
21
+ ANSI_REGEXP = /\e\[([1349][0-7][0-7]?|[01])m/
22
+
23
+ FGCOLORS = {
24
+ 30 => ConsoleColor.black,
25
+ 31 => ConsoleColor.dark_red,
26
+ 32 => ConsoleColor.dark_green,
27
+ 33 => ConsoleColor.dark_yellow,
28
+ 34 => ConsoleColor.dark_blue,
29
+ 35 => ConsoleColor.dark_magenta,
30
+ 36 => ConsoleColor.dark_cyan,
31
+ 37 => ConsoleColor.gray,
32
+ 90 => ConsoleColor.dark_gray,
33
+ 91 => ConsoleColor.red,
34
+ 92 => ConsoleColor.green,
35
+ 93 => ConsoleColor.yellow,
36
+ 94 => ConsoleColor.blue,
37
+ 95 => ConsoleColor.magenta,
38
+ 96 => ConsoleColor.cyan,
39
+ 97 => ConsoleColor.white
40
+ }
41
+
42
+ BGCOLORS = {
43
+ 40 => ConsoleColor.black,
44
+ 41 => ConsoleColor.dark_red,
45
+ 42 => ConsoleColor.dark_green,
46
+ 43 => ConsoleColor.dark_yellow,
47
+ 44 => ConsoleColor.dark_blue,
48
+ 45 => ConsoleColor.dark_magenta,
49
+ 46 => ConsoleColor.dark_cyan,
50
+ 47 => ConsoleColor.gray,
51
+ 100 => ConsoleColor.dark_gray,
52
+ 101 => ConsoleColor.red,
53
+ 102 => ConsoleColor.green,
54
+ 103 => ConsoleColor.yellow,
55
+ 104 => ConsoleColor.blue,
56
+ 105 => ConsoleColor.magenta,
57
+ 106 => ConsoleColor.cyan,
58
+ 107 => ConsoleColor.white
59
+ }
60
+
61
+ def set_color(num)
62
+ if num == 0
63
+ Console.reset_color
64
+ elsif num == 1
65
+ #since we can't do bold, invert the colors
66
+ bg = Console.background_color
67
+ Console.background_color = Console.foreground_color
68
+ Console.foreground_color = bg
69
+ else
70
+ Console.foreground_color = FGCOLORS[num] || Console.foreground_color
71
+ Console.background_color = BGCOLORS[num] || Console.background_color
72
+ end
73
+ end
74
+ end
75
+
76
+ class IO
77
+ include IronTermAnsiColor
78
+
79
+ def puts(*args)
80
+ if args.empty?
81
+ syswrite "\n"
82
+ else
83
+ args.each do |str|
84
+ write(str)
85
+ syswrite "\n"
86
+ end
87
+ end
88
+ nil
89
+ end
90
+
91
+ def write(str)
92
+ result = 0
93
+ str = str.to_s
94
+ match = ANSI_REGEXP.match(str)
95
+ if match.nil?
96
+ #no ansi code in string
97
+ result += syswrite str
98
+ else
99
+ #write what comes before the ansi code in the current color
100
+ result += syswrite str[0, match.begin(1) - 2]
101
+ set_color(match[1].to_i)
102
+ #write what comes after the ansi code in the new color
103
+ result += write(str[(match.end(1) + 1)..-1])
104
+ end
105
+ result
106
+ end
107
+ end
@@ -0,0 +1,65 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "IronTermANSIColor", "when given a string with ANSI background color control characters" do
4
+
5
+ before(:all) do
6
+ @original_bgcolor = System::ConsoleColor.Gray
7
+ end
8
+
9
+ it "should set the background color to black when doing a puts of a string with only black background ANSI control code and reset the background color after" do
10
+ string = "Black".on_black
11
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.Black)
12
+ System::Console.should_receive(:reset_color).at_least(:once)
13
+ puts string
14
+ end
15
+
16
+ it "should set the background color to dark red when doing a puts of a string with only red background ANSI control code and reset the background color after" do
17
+ string = "Red".on_red
18
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkRed)
19
+ System::Console.should_receive(:reset_color).at_least(:once)
20
+ puts string
21
+ end
22
+
23
+ it "should set the background color to dark green when doing a puts of a string with only green background ANSI control code and reset the background color after" do
24
+ string = "Green".on_green
25
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkGreen)
26
+ System::Console.should_receive(:reset_color).at_least(:once)
27
+ puts string
28
+ end
29
+
30
+ it "should set the background color to dark yellow when doing a puts of a string with only yellow background ANSI control code and reset the background color after" do
31
+ string = "Yellow".on_yellow
32
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkYellow)
33
+ System::Console.should_receive(:reset_color).at_least(:once)
34
+ puts string
35
+ end
36
+
37
+ it "should set the background color to dark blue when doing a puts of a string with only blue background ANSI control code and reset the background color after" do
38
+ string = "Blue".on_blue
39
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkBlue)
40
+ System::Console.should_receive(:reset_color).at_least(:once)
41
+ puts string
42
+ end
43
+
44
+ it "should set the background color to dark magenta when doing a puts of a string with only magenta background ANSI control code and reset the background color after" do
45
+ string = "Magenta".on_magenta
46
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkMagenta)
47
+ System::Console.should_receive(:reset_color).at_least(:once)
48
+ puts string
49
+ end
50
+
51
+ it "should set the background color to dark cyan when doing a puts of a string with only cyan background ANSI control code and reset the background color after" do
52
+ string = "Cyan".on_cyan
53
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.DarkCyan)
54
+ System::Console.should_receive(:reset_color).at_least(:once)
55
+ puts string
56
+ end
57
+
58
+ it "should set the background color to gray when doing a puts of a string with only white background ANSI control code and reset the background color after" do
59
+ string = "Gray".on_white
60
+ System::Console.should_receive(:background_color=).once.with(System::ConsoleColor.Gray)
61
+ System::Console.should_receive(:reset_color).at_least(:once)
62
+ puts string
63
+ end
64
+ end
65
+
@@ -0,0 +1,65 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ describe "IronTermANSIColor", "when given a string with ANSI foreground color control characters" do
4
+
5
+ before(:all) do
6
+ @original_fgcolor = System::ConsoleColor.Gray
7
+ end
8
+
9
+ it "should set the foreground color to black when doing a puts of a string with only blackforeground ANSI control code and reset the foreground color after" do
10
+ string = "Black".black
11
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.black)
12
+ System::Console.should_receive(:reset_color).at_least(:once)
13
+ puts string
14
+ end
15
+
16
+ it "should set the foreground color to dark red when doing a puts of a string with only redforeground ANSI control code and reset the foreground color after" do
17
+ string = "Red".red
18
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.dark_red)
19
+ System::Console.should_receive(:reset_color).at_least(:once)
20
+ puts string
21
+ end
22
+
23
+ it "should set the foreground color to dark green when doing a puts of a string with only greenforeground ANSI control code and reset the foreground color after" do
24
+ string = "Green".green
25
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.dark_green)
26
+ System::Console.should_receive(:reset_color).at_least(:once)
27
+ puts string
28
+ end
29
+
30
+ it "should set the foreground color to dark yellow when doing a puts of a string with only yellowforeground ANSI control code and reset the foreground color after" do
31
+ string = "Yellow".yellow
32
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.DarkYellow)
33
+ System::Console.should_receive(:reset_color).at_least(:once)
34
+ puts string
35
+ end
36
+
37
+ it "should set the foreground color to dark blue when doing a puts of a string with only blueforeground ANSI control code and reset the foreground color after" do
38
+ string = "Blue".blue
39
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.DarkBlue)
40
+ System::Console.should_receive(:reset_color).at_least(:once)
41
+ puts string
42
+ end
43
+
44
+ it "should set the foreground color to dark magenta when doing a puts of a string with only magentaforeground ANSI control code and reset the foreground color after" do
45
+ string = "Magenta".magenta
46
+ System::Console.should_receive(:foreground_color=).at_least(:once).with(System::ConsoleColor.DarkMagenta)
47
+ System::Console.should_receive(:reset_color).at_least(:once)
48
+ puts string
49
+ end
50
+
51
+ it "should set the foreground color to dark cyan when doing a puts of a string with only cyanforeground ANSI control code and reset the foreground color after" do
52
+ string = "Cyan".cyan
53
+ System::Console.should_receive(:foreground_color=).once.with(System::ConsoleColor.DarkCyan)
54
+ System::Console.should_receive(:reset_color).at_least(:once)
55
+ puts string
56
+ end
57
+
58
+ it "should set the foreground color to gray when doing a puts of a string with only whiteforeground ANSI control code and reset the foreground color after" do
59
+ string = "Gray".white
60
+ System::Console.should_receive(:foreground_color=).at_least(:once).with(System::ConsoleColor.Gray)
61
+ System::Console.should_receive(:reset_color).at_least(:once)
62
+ puts string
63
+ end
64
+ end
65
+
@@ -0,0 +1,10 @@
1
+ require 'spec'
2
+
3
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
4
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ require 'rubygems'
6
+ require 'iron-term-ansicolor'
7
+
8
+ Spec::Runner.configure do |config|
9
+
10
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: iron-term-ansicolor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
5
+ platform: universal-.net-2.0
6
+ authors:
7
+ - Will Green
8
+ - David Blackmon
9
+ - Ivan Porto Carrero
10
+ - Danny Coates
11
+ autorequire:
12
+ bindir: bin
13
+ cert_chain: []
14
+ date: 2010-03-07 00:00:00 -05:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: term-ansicolor
19
+ type: :runtime
20
+ version_requirement:
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 1.0.4
26
+ version:
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ type: :development
30
+ version_requirement:
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: "0"
36
+ version:
37
+ description: iron-term-ansicolor brings color output to IronRuby on Windows
38
+ email: will@hotgazpacho.org
39
+ executables: []
40
+ extensions: []
41
+ extra_rdoc_files:
42
+ - README.rdoc
43
+ files:
44
+ - README.rdoc
45
+ - Rakefile
46
+ - iron-term-ansicolor.gemspec
47
+ - lib/iron-term-ansicolor.rb
48
+ - spec/iron-term-ansicolor_simple_background_spec.rb
49
+ - spec/iron-term-ansicolor_simple_foreground_spec.rb
50
+ - spec/spec_helper.rb
51
+ has_rdoc: true
52
+ homepage: http://github.com/hotgazpacho/iron-term-ansicolor
53
+ licenses: []
54
+ post_install_message:
55
+ rdoc_options:
56
+ - --quiet
57
+ - --title
58
+ - iron-term-ansicolor brings color output to IronRuby on Windows
59
+ - --main
60
+ - README.rdoc
61
+ - --line-numbers
62
+ - --format
63
+ - darkfish
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 1.8.6
71
+ version:
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: "0"
77
+ version:
78
+ requirements: []
79
+ rubyforge_project: iron-term-ansicolor
80
+ rubygems_version: 1.3.5
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: iron-term-ansicolor brings color output to IronRuby on Windows
84
+ test_files:
85
+ - spec/iron-term-ansicolor_simple_background_spec.rb
86
+ - spec/iron-term-ansicolor_simple_foreground_spec.rb
87
+ - spec/spec_helper.rb