Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove win32console requirement in ruby 2.0.0 and higher #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Remove win32console requirement in ruby 2.0.0 and higher #35

wants to merge 1 commit into from

Conversation

Darunada
Copy link

This allows ansi to color output in windows with ruby 2+ without attempting to load win32console

The win32console gem is no longer required for ruby 2 or higher in Windows.
See: luislavena/win32console#17 (comment)

@Darunada
Copy link
Author

The CI check seems to fail because it's using an outdated version of bundler.

See: rubygems/bundler#3559

@thomthom
Copy link

Would it be possible to get this PR merged? A few gems depend on this ansi gem and on Windows it's often no color output as a result.

@thomthom
Copy link

For anyone else (or myself in the future) that might be looking for ways to address the issue of ansi not using color on Windows, here is an example of how I made minitest-reporters work:

# test_helper.rb

# Kludge: minitest-reporter depend on the `ansi` gem which hasn't been updated
# for a very long time. It's expecting to use another `win32console` gem in
# order to provide colorized output on Windows even though that is not longer
# needed. This works around that by fooling Ruby to think it has been loaded.
#
# https://github.com/rubyworks/ansi/issues/36
# https://github.com/rubyworks/ansi/pull/35
$LOADED_FEATURES << 'Win32/Console/ANSI'
Minitest::Reporters.use!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants