From: Luis Lavena on 9 Mar 2010 03:41 On Mar 9, 9:28 am, Charles Roper <reac...(a)charlesroper.co.uk> wrote: > On 09/03/2010 07:30, Luis Lavena wrote: > > > Are you using autospec? If so, is not win32console, as I mentioned to > > you before. > > The RSpec people seem to think it might be a win32console problem: > > http://j.mp/a4XYT3 > No, is not win32console, I've emailed rspec team before on this: http://rubyforge.org/pipermail/rspec-devel/2010-January/005341.html No answer. I've described there what could be the root of the issue. Does a previous version of win32console result in the same issue? If so, then is not win32console. -- Luis Lavena
From: Charles Roper on 9 Mar 2010 07:55 On 09/03/2010 08:45, Luis Lavena wrote: > On Mar 9, 9:28 am, Charles Roper<reac...(a)charlesroper.co.uk> wrote: >> On 09/03/2010 07:30, Luis Lavena wrote: >> >>> Are you using autospec? If so, is not win32console, as I mentioned to >>> you before. >> >> The RSpec people seem to think it might be a win32console problem: >> >> http://j.mp/a4XYT3 >> > > No, is not win32console, I've emailed rspec team before on this: > > http://rubyforge.org/pipermail/rspec-devel/2010-January/005341.html > > No answer. I've described there what could be the root of the issue. > > Does a previous version of win32console result in the same issue? > > If so, then is not win32console. Thanks for the confirmation, Luis. I've updated the ticket: http://j.mp/a4XYT3 Charles
From: Roger Pack on 9 Mar 2010 08:49 > No, is not win32console, I've emailed rspec team before on this: > > http://rubyforge.org/pipermail/rspec-devel/2010-January/005341.html Thanks for the link. Appears it is a bug with spec since autospec doesn't show colors but normal "spec" does. Thanks for your work on this. -rp -- Posted via http://www.ruby-forum.com/.
From: Gordon Thiesfeld on 9 Mar 2010 23:34 On Tue, Mar 9, 2010 at 7:49 AM, Roger Pack <rogerpack2005(a)gmail.com> wrote: > >> No, is not win32console, I've emailed rspec team before on this: >> >> http://rubyforge.org/pipermail/rspec-devel/2010-January/005341.html > > Thanks for the link. > Appears it is a bug with spec since autospec doesn't show colors but > normal "spec" does. > > Thanks for your work on this. > -rp > -- > Posted via http://www.ruby-forum.com/. > > If all of this code still works the way I remember it, this is actually easy to fix. Last time I checked, autospec relies on autotest, so you should be able to just require win32console in your ~/.autotest file. autospec runs the rspec framework as a subprocess. It parses the results, then spits them out on the screen. On posix systems, the escape codes work, because posix systems are designed to handle them. In Windows, the escape codes just get dumped to stdout, so you have to make sure the current process knows how to handle them. I hope that makes sense.
From: Luis Lavena on 10 Mar 2010 03:34 On Mar 10, 5:34 am, Gordon Thiesfeld <gthiesf...(a)gmail.com> wrote: > On Tue, Mar 9, 2010 at 7:49 AM, Roger Pack <rogerpack2...(a)gmail.com> wrote: > > >> No, is not win32console, I've emailed rspec team before on this: > > >>http://rubyforge.org/pipermail/rspec-devel/2010-January/005341.html > > > Thanks for the link. > > Appears it is a bug with spec since autospec doesn't show colors but > > normal "spec" does. > > > Thanks for your work on this. > > -rp > > -- > > Posted viahttp://www.ruby-forum.com/. > > If all of this code still works the way I remember it, this is > actually easy to fix. Last time I checked, autospec relies on > autotest, so you should be able to just require win32console in your > ~/.autotest file. autospec runs the rspec framework as a subprocess. > It parses the results, then spits them out on the screen. On posix > systems, the escape codes work, because posix systems are designed to > handle them. In Windows, the escape codes just get dumped to stdout, > so you have to make sure the current process knows how to handle them. > > I hope that makes sense. It does, however, as I mentioned in the RSpec-dev mailing list post, trying to recreate it just end prematurely, doesn't complete. Ignoring for a second that ZenTest/autospec changes the first two lines of the autotest rubygem stub, check the following example: #ruby ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32] #gem list: win32console (1.3.0.beta2, 1.3.0.beta1) rspec (1.3.0) ZenTest (4.2.1) # ~/.autotest STDOUT.puts "OUT: THIS IS ~/.autotest file" STDERR.puts "ERR: THIS IS ~/.autotest file" require 'win32console' puts "$stdout.redirected? #{$stdout.redirected?}" puts "$stderr.redirected? #{$stderr.redirected?}" # rake-compiler/.autotest STDOUT.puts "OUT: THIS IS rake-compiler/.autotest file" STDERR.puts "ERR: THIS IS rake-compiler/.autotest file" require 'win32console' puts "$stdout.redirected? #{$stdout.redirected?}" puts "$stderr.redirected? #{$stderr.redirected?}" Running autospec in my folder, output this: C:\Users\Luis\Projects\oss\rake-compiler>autospec (Not running features. To run features in autotest, set AUTOFEATURE=true.) loading autotest/rspec OUT: THIS IS ~/.autotest file ERR: THIS IS ~/.autotest file $stdout.redirected? false $stderr.redirected? false OUT: THIS IS rake-compiler/.autotest file ERR: THIS IS rake-compiler/.autotest file $stdout.redirected? false $stderr.redirected? false C:\Users\Luis\Tools\Ruby\ruby-1.8.6-p398-i386-mingw32\bin\ruby C:/ Users/Luis/.gem/ruby/x86-mingw32/1.8/gems/rspec-1.3.0/bin/spec -- autospec C:/Users/Luis/Projects/oss/rake-compiler/spec/lib/rake/ javaextensiontask_spec.rb C:/Users/Luis/Projects/oss/rake-compiler/ spec/lib/rake/extensiontask_spec.rb -O spec/spec.opts And from there beautiful colors (well, not beautiful, but seems it works). The following version also works: ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32] But NOT 1.9.1: C:\Users\Luis\Projects\oss\rake-compiler>autospec loading autotest/rspec OUT: THIS IS ~/.autotest file ERR: THIS IS ~/.autotest file $stdout.redirected? false $stderr.redirected? false OUT: THIS IS rake-compiler/.autotest file ERR: THIS IS rake-compiler/.autotest file $stdout.redirected? false $stderr.redirected? false C:\Users\Luis\Tools\Ruby\ruby-1.9.1-p378-i386-mingw32\bin\ruby C:/ Users/Luis/.gem/ruby/x86-mingw32/1.9.1/gems/rspec-1.3.0/bin/spec -- autospec C:/Users/Luis/Projects/oss/rake-compiler/spec/lib/rake/ extensiontask_spec.rb C:/Users/Luis/Projects/oss/rake-compiler/spec/ lib/rake/javaextensiontask_spec.rb -O spec/spec.opts Rake::ExtensionTask #new (basic) WARNING: You're cross-compiling a binary extension for JRuby, but are using another interpreter. If your Java classpath or extension dir settings are not correctly detected, then either check the appropriate environment variables or execute the Rake compilation task using the JRuby interpreter. (e.g. `jruby -S rake compile:java`) ==== Stops there, all without colors. Now, running rake spec or spec -c spec display all colors too, so is something around autospec/autotest and Ruby 1.9 ==== Hope I explained better this time since seems nobody answered on RSpec- dev maybe my english wasn't good enough. Regards, -- Luis Lavena
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Machinist with Plain Old Ruby Objects Next: Login Prompt - how to? |