Skip to content

Commit

Permalink
='u' is no longer done automatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Nov 20, 2008
1 parent 3a15d39 commit ec82b0e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ This will run foo.feature at line 15 and bar.feature at line 6, 45 and 111.
* Directly creating a Table meant the scenario table header was never set which was causing a formatter error (#91 Joseph Wilk)

=== Removed features
* $KCODE='u' is no longer done automatically. Developers should do that explicitly when needed in step definitions or env.rb.
* Step definition without a block being treated as pending (#64 Joseph Wilk)
* The --line option has been removed. Use the new file.feature:line format instead.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$KCODE='u'
require 'spec'
$:.unshift(File.dirname(__FILE__) + '/../../lib')
require 'calculator'
Expand Down
1 change: 1 addition & 0 deletions lib/cucumber.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))

require 'jcode'
require 'cucumber/platform'
require 'rubygems'
require 'treetop/runtime'
Expand Down
10 changes: 3 additions & 7 deletions lib/cucumber/formatters/ansicolor.rb
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
gem 'term-ansicolor'

# Hack to work around Win32/Console, which bundles a licence-violating, outdated
# copy of term/ansicolor that doesn't implement Term::ANSIColor#coloring=.
# We want the official one!
gem 'term-ansicolor'
$LOAD_PATH.each{|path| $LOAD_PATH.unshift($LOAD_PATH.delete(path)) if path =~ /term-ansicolor/}
require 'term/ansicolor'

if $CUCUMBER_WINDOWS_MRI
begin
require 'Win32/Console/ANSI'
rescue LoadError
STDERR.puts "You must gem install win32console to get coloured output on this ruby platform (#{PLATFORM})"
STDERR.puts "You must gem install win32console to get coloured output on MRI/Windows"
Term::ANSIColor.coloring = false
end
else
$KCODE='u'
end

Term::ANSIColor.coloring = false if !STDOUT.tty? || ($CUCUMBER_WINDOWS && !$CUCUMBER_WINDOWS_MRI)
require 'jcode'

module Cucumber
module Formatters
Expand Down Expand Up @@ -91,7 +87,7 @@ module ANSIColor
end
end

#Not supported in Term::ANSIColor
# Not supported in Term::ANSIColor
def grey(m)
if ::Term::ANSIColor.coloring?
"\e[90m#{m}\e[0m"
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
gem 'rspec'
require 'spec'

$KCODE='u'
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'cucumber'
require 'cucumber/treetop_parser/feature_en'
Expand Down

0 comments on commit ec82b0e

Please sign in to comment.