From 08965c4c8cf7d0009efcbb374e3067b0777c3719 Mon Sep 17 00:00:00 2001 From: Serhii Bodnaruk Date: Fri, 24 Jul 2026 20:18:35 +0300 Subject: [PATCH] =?UTF-8?q?Remove=20noisy=20"Skipped=20=E2=80=94=20annotat?= =?UTF-8?q?ion=20unchanged"=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 2 +- lib/annotato/model_annotator.rb | 1 - lib/annotato/version.rb | 2 +- spec/annotato/model_annotator_spec.rb | 4 ++-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 08dd1fc..56650b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - annotato (0.2.5) + annotato (0.2.6) rails (>= 6.0) GEM diff --git a/lib/annotato/model_annotator.rb b/lib/annotato/model_annotator.rb index 575358e..8092917 100644 --- a/lib/annotato/model_annotator.rb +++ b/lib/annotato/model_annotator.rb @@ -58,7 +58,6 @@ def write_annotation(model, annotation) # Skip writing if the annotation hasn't changed if old_annotation && old_annotation.strip == annotation.strip - @output.puts "ℹ️ Skipped #{model.name} — annotation unchanged" return end diff --git a/lib/annotato/version.rb b/lib/annotato/version.rb index 5212659..1350795 100644 --- a/lib/annotato/version.rb +++ b/lib/annotato/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Annotato - VERSION = "0.2.5" + VERSION = "0.2.6" end diff --git a/spec/annotato/model_annotator_spec.rb b/spec/annotato/model_annotator_spec.rb index 93bd423..192c6c0 100644 --- a/spec/annotato/model_annotator_spec.rb +++ b/spec/annotato/model_annotator_spec.rb @@ -39,13 +39,13 @@ def eager_load! end describe "#write_annotation" do - it "skips writing annotation and outputs info message when annotation unchanged" do + it "skips writing annotation silently when annotation unchanged" do file = "spec/annotato/tmp_user.rb" File.write(file, annotation + "\nclass User\nend\n") allow(annotator).to receive(:model_file).and_return(file) annotator.send(:write_annotation, model, annotation) - expect(output.string).to include("ℹ️ Skipped User — annotation unchanged") + expect(output.string).to eq("") File.delete(file) end