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

Replace Colorize with Rainbow #1

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* Your changes/patches go here.

- [CHORE: Remove GPL licensed dependency Colorize and replace it with Rainbow]

# v1.3.0 / 2023-06-16 [(commits)](https://github.com/fastruby/next_rails/compare/v1.2.4...v1.3.0)

- [FEATURE: Add NextRails.next? for application usage (e.g. Rails shims)](https://github.com/fastruby/next_rails/pull/97)
Expand Down
4 changes: 3 additions & 1 deletion exe/deprecations
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env ruby
require "json"
require "colorize"
require "rainbow/refinement"
require "optparse"
require "set"

using Rainbow

def run_tests(deprecation_warnings, opts = {})
tracker_mode = opts[:tracker_mode]
next_mode = opts[:next_mode]
Expand Down
4 changes: 3 additions & 1 deletion lib/deprecation_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require "colorize"
require "rainbow/refinement"
require "json"

using Rainbow

# A shitlist for deprecation warnings during test runs. It has two modes: "save" and "compare"
#
# DEPRECATION_TRACKER=save
Expand Down
6 changes: 4 additions & 2 deletions lib/next_rails/bundle_report.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require "colorize"
require "rainbow/refinement"
require "cgi"
require "erb"
require "json"
require "net/http"

using Rainbow

module NextRails
module BundleReport
extend self
Expand Down Expand Up @@ -168,4 +170,4 @@ def output_to_stdout(out_of_date_gems, total_gem_count, sourced_from_git_count)
puts footer
end
end
end
end
2 changes: 1 addition & 1 deletion next_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "colorize", ">= 0.8.1"
spec.add_dependency "rainbow", ">= 2"
spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
spec.add_development_dependency "rake"
spec.add_development_dependency "rspec", "~> 3.0"
Expand Down
2 changes: 2 additions & 0 deletions spec/bundle_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
require_relative 'spec_helper'
require_relative '../lib/next_rails/bundle_report'

using Rainbow

RSpec.describe NextRails::BundleReport do
describe '.outdated' do
let(:mock_version) { Struct.new(:version, :age) }
Expand Down
Loading