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

Use Rainbow to remove GPL dependency Colorize #120

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

timlkelly
Copy link

@timlkelly timlkelly commented Aug 23, 2024

Description

The Colorize dependency uses the GPL 2.0 license. This work switches the dependency to Rainbow, which uses the MIT license, ensuring that NextRails also does not inherit the GPL license.

Motivation and Context

Some organizations are not allowed to use the GPL license. Switching to Rainbow allows others to use NextRails because it will no longer include a GPL dependency.

How Has This Been Tested?

The change is relatively minimal, and Rainbow has a similar API to Colorize, albeit using Ruby Refinements.

  • Updated specs to ensure they pass
  • Tested locally against a Rails project

Screenshots:

I will abide by the code of conduct

@timlkelly timlkelly closed this Aug 23, 2024
@timlkelly timlkelly reopened this Aug 23, 2024
@timlkelly timlkelly changed the title Replace Colorize with Rainbow Use Rainbow to remove GPL dependency Colorize Aug 23, 2024
@timlkelly timlkelly marked this pull request as ready for review August 23, 2024 20:38
@timlkelly
Copy link
Author

@etagwerker, Do you have any thoughts about this change regarding the licensing?

@timlkelly
Copy link
Author

timlkelly commented Sep 9, 2024

Ah. It looks like Rainbow 3.x does not support Ruby < 2.1, see changelog. Do you think it's imperative to keep Ruby 2.0 support now?

If we use Rainbow version 2 doesn't include the String refinement, which means it's no longer a drop-in replacement. The code would need to be updated to use the Rainbow method directly, e.g., Rainbow("this is red").red.

@etagwerker
Copy link
Member

Do you think it's imperative to keep Ruby 2.0 support now?

I don't think this is imperative. I'm fine with supporting Ruby 2.6 and higher.

@etagwerker etagwerker merged commit 8627ce1 into fastruby:main Sep 9, 2024
8 of 11 checks passed
@timlkelly timlkelly deleted the rainbow branch September 9, 2024 18:39
JuanVqz added a commit that referenced this pull request Sep 22, 2024
Pull Request #120 removed Colorize in favor of Rainbow,
`bundle_report/ruby_version_compatibility.rb` was using Colorize and we
need to update it to use Rainbow
JuanVqz added a commit that referenced this pull request Sep 22, 2024
Pull Request #120 removed Colorize in favor of Rainbow,
`bundle_report/ruby_version_compatibility.rb` was using Colorize and we
need to update it to use Rainbow
@JuanVqz JuanVqz mentioned this pull request Sep 24, 2024
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