ruby-changes:67405
From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:06:46 +0900 (JST)
Subject: [ruby-changes:67405] 81c0643762 (master): [rubygems/rubygems] Remove unnecessary escape sequences
https://git.ruby-lang.org/ruby.git/commit/?id=81c0643762 From 81c06437629da422a7b6701a140b040af430b832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Mon, 26 Jul 2021 15:21:18 +0200 Subject: [rubygems/rubygems] Remove unnecessary escape sequences Bundler formatters already take care of this. https://github.com/rubygems/rubygems/commit/c24415fdd5 --- lib/bundler/setup.rb | 4 ++-- spec/bundler/commands/exec_spec.rb | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/bundler/setup.rb b/lib/bundler/setup.rb index 27911dc..32e9b2d 100644 --- a/lib/bundler/setup.rb +++ b/lib/bundler/setup.rb @@ -9,10 +9,10 @@ if Bundler::SharedHelpers.in_bundle? https://github.com/ruby/ruby/blob/trunk/lib/bundler/setup.rb#L9 begin Bundler.ui.silence { Bundler.setup } rescue Bundler::BundlerError => e - Bundler.ui.warn "\e[31m#{e.message}\e[0m" + Bundler.ui.error e.message Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"] if e.is_a?(Bundler::GemNotFound) - Bundler.ui.warn "\e[33mRun `bundle install` to install missing gems.\e[0m" + Bundler.ui.warn "Run `bundle install` to install missing gems." end exit e.status_code end diff --git a/spec/bundler/commands/exec_spec.rb b/spec/bundler/commands/exec_spec.rb index 2c83ec8..68c4726 100644 --- a/spec/bundler/commands/exec_spec.rb +++ b/spec/bundler/commands/exec_spec.rb @@ -836,9 +836,9 @@ RSpec.describe "bundle exec" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/exec_spec.rb#L836 let(:exit_code) { Bundler::GemNotFound.new.status_code } let(:expected) { "" } let(:expected_err) { <<-EOS.strip } -\e[31mCould not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally. -The source contains the following versions of 'rack': 0.9.1, 1.0.0\e[0m -\e[33mRun `bundle install` to install missing gems.\e[0m +Could not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally. +The source contains the following versions of 'rack': 0.9.1, 1.0.0 +Run `bundle install` to install missing gems. EOS it "runs" do @@ -863,9 +863,9 @@ The source contains the following versions of 'rack': 0.9.1, 1.0.0\e[0m https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/exec_spec.rb#L863 let(:exit_code) { Bundler::GemNotFound.new.status_code } let(:expected) { "" } let(:expected_err) { <<-EOS.strip } -\e[31mCould not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally. -The source contains the following versions of 'rack': 1.0.0\e[0m -\e[33mRun `bundle install` to install missing gems.\e[0m +Could not find gem 'rack (= 2)' in rubygems repository #{file_uri_for(gem_repo1)}/ or installed locally. +The source contains the following versions of 'rack': 1.0.0 +Run `bundle install` to install missing gems. EOS it "runs" do -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/