-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 dependency term-ansicolor #43
Conversation
This dependency has caused problems for many developers who have a class named "Term", which is a very ambiguous word. This commit brings Term::ANSIColor into Cucumber and nests it under the Cucumber namespace.
I think we should use the more light-weight AnsiEscapes module in Gherkin: https://github.com/cucumber/gherkin/blob/master/lib/gherkin/formatter/ansi_escapes.rb |
Matt, the problem we ran into was that we have a model called Term that conflicted with the Term module in Term::AnsiColor. I'm not sure your suggestion would fix that. Wouldn't requiring lib/cucumber/term/ansicolor just pollute the global namespace again? Aslak, that sounds like a good idea, but Term::AnsiColor has a little more functionality than AnsiEscapes (escaping colored strings, turning coloring on and off). We would need to encapsulate that functionality somewhere else in order to make that work. I think this is the ideal solution. If I get some time I'll look into it further. Thanks guys! |
Has this gone anywhere lately? I have the same problem with a Term model in my application. I would imagine that's a pretty common model in education and finance. It sure would be great to have this fixed in Cucumber. Glad to help out if there's a way. |
Term::Ansicolor is GPL, so we should never have used it to begin with. And we cannot accept this pull request because it violates the GPL Fixing this should get rid of GPL code as well. Fixing this issue doesn't have high priority for me, but if anyone wants to give it a stab, I suggest reusing the ANSI stuff we have in gherkin: https://github.com/cucumber/gherkin/blob/master/lib/gherkin/formatter/ansi_escapes.rb |
Ok... I am taking a look whether I can take the code from Gherkin |
Ok, I took the Ansi_escapes module from Gherkin and quickly patched it into Cucumber. https://github.com/poseid/cucumber/commit/e0da6cb20c5dba5cdbf443312b2c7ec533644c4a (I also removed the dependency in the Gemspec) |
@Poseid - thanks a lot. Are all the features passing? |
no, that is why i am just checking some issues in ast/table and Cucumber::Cli::Configuration if these are pass, i give you a pull request |
Hmm, sorry, my modifications would need some work.
causes an error wrong number of arguments (1 for 0)
undefined method |
@aslakhellesoy I agree we should use the Gherkin AnsiEscapes eventually, but @joefiorini's fix is a step in the right direction. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Per the thread at http://groups.google.com/group/cukes/browse_thread/thread/4ffa442cdfb7ffac this commit embeds term-ansicolor under the Cucumber namespace and removes it from the gemspec.