Skip to content
Merged
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: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
annotato (0.2.5)
annotato (0.2.6)
rails (>= 6.0)

GEM
Expand Down
1 change: 0 additions & 1 deletion lib/annotato/model_annotator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/annotato/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Annotato
VERSION = "0.2.5"
VERSION = "0.2.6"
end
4 changes: 2 additions & 2 deletions spec/annotato/model_annotator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading