From 8713d9b4dc0fb415798232ee0e3be3ce420bf27a Mon Sep 17 00:00:00 2001 From: Max Lewis Date: Wed, 1 Jul 2026 10:44:06 +1000 Subject: [PATCH] build(deps): remove colorize dependency colorize is licensed under GPL-2.0, a strong copyleft license. This gem is MIT-licensed and is embedded as a runtime dependency in other projects, so pulling in a GPL-2.0 dependency creates a license-compatibility risk for downstream consumers. Its only use was rendering the blue "[R-UIQ] " debug-log prefix, now reproduced by a small inline ANSI helper (blue_text) that emits the exact same escape sequence. Output is byte-identical and the runtime dependency is dropped entirely. Co-Authored-By: Claude Opus 4.8 --- lib/resque-unique_in_queue.rb | 9 +++++++-- lib/resque/unique_in_queue/version.rb | 2 +- resque-unique_in_queue.gemspec | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/resque-unique_in_queue.rb b/lib/resque-unique_in_queue.rb index 2a3c7d0..4066acf 100644 --- a/lib/resque-unique_in_queue.rb +++ b/lib/resque-unique_in_queue.rb @@ -6,7 +6,6 @@ require 'digest/md5' # External Gems -require 'colorized_string' require 'resque' # This Gem @@ -23,7 +22,13 @@ # Resque, Resque::Job, or Resque::Queue. module Resque module UniqueInQueue - PLUGIN_TAG = (ColorizedString['[R-UIQ] '].blue).freeze + # Wraps text in ANSI blue escape codes. Replaces the former `colorize` + # dependency; produces the exact sequence colorize's String#blue emitted. + def self.blue_text(text) + "\e[0;34;49m#{text}\e[0m" + end + + PLUGIN_TAG = blue_text('[R-UIQ] ').freeze def log(message) configuration.logger&.send(configuration.log_level, message) if configuration.logger diff --git a/lib/resque/unique_in_queue/version.rb b/lib/resque/unique_in_queue/version.rb index 3dec041..773fd82 100644 --- a/lib/resque/unique_in_queue/version.rb +++ b/lib/resque/unique_in_queue/version.rb @@ -2,6 +2,6 @@ module Resque module UniqueInQueue - VERSION = '2.0.1'.freeze + VERSION = '2.0.2'.freeze end end diff --git a/resque-unique_in_queue.gemspec b/resque-unique_in_queue.gemspec index d97f14f..98cf73e 100644 --- a/resque-unique_in_queue.gemspec +++ b/resque-unique_in_queue.gemspec @@ -20,7 +20,6 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_runtime_dependency 'colorize', '>= 0.8' spec.add_runtime_dependency 'resque', '>= 1.2' spec.add_development_dependency 'bundler', '>= 2.2.10'