ku1ik / rainbow

Ruby gem for colorizing printed text on ANSI terminals
MIT License
813 stars 68 forks source link

Gemfile: Added windows-specific dependencies #19

Closed branneman closed 8 years ago

branneman commented 10 years ago

Since it's not obvious for Windows users why they don't get any coloring, I'm trying to save the next user from having to search the source and the web for the solution.

A lot of other projects use Rainbow, and it's quite a bane for Windows users to find the dependency that breaks the coloring. A silent fail is difficult to debug.

As a last argument, currently Rainbow doesn't work on 1 of the 3 major platforms, with this simple change it will work when people use bundler to install their dependencies. A simple step in the right direction I think.

The change I made has no effect on any platforms other than Windows, and since coloring already works on cygwin, I did not include it.

ku1ik commented 10 years ago

The Gemfile is used only for development of rainbow. The gems defined in it don't end up in the gemspec.

I suppose what you want to do is to add them to gemspec with add_dependency directives. However I'm not sure how to handle the conditional part of it. The if is evaluated on the machine that builds the actual gem from a gemspec, before it gets pushed to rubygems.org.