Skip to content

Commit 328ae51

Browse files
committed
Run linter after rebasing
1 parent c71a6e3 commit 328ae51

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/annotate_rb/model_annotator/annotation_diff_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module AnnotateRb
44
module ModelAnnotator
55
# Compares the current file content and new annotation block and generates the column annotation differences
66
class AnnotationDiffGenerator
7-
HEADER_PATTERN = /(^# Table name:.*?\n(#.*[\r]?\n)*[\r]?)/.freeze
7+
HEADER_PATTERN = /(^# Table name:.*?\n(#.*\r?\n)*\r?)/.freeze
88
# COLUMN_PATTERN = /^#[\t ]+[\w\*\.`\[\]():]+[\t ]+.+$/.freeze
99
COLUMN_PATTERN = /^#[\t ]+[^\t ]+[\t ]+.+$/.freeze
1010

spec/lib/annotate_rb/model_annotator/annotation_diff_generator_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,23 @@ class User < ApplicationRecord
138138
]
139139
end
140140

141-
it 'returns an AnnotationDiff object with the expected old and new columns' do
141+
it "returns an AnnotationDiff object with the expected old and new columns" do
142142
test_columns_match_expected
143143

144144
expect(subject.changed?).to eq(true)
145145
end
146146
end
147147

148-
context 'when model file has existing annotations with column multi-byte comments' do
148+
context "when model file has existing annotations with column multi-byte comments" do
149149
let(:annotation_block) do
150150
klass = mock_class(:users,
151-
:id,
152-
[
153-
mock_column(:id, :bigint, comment: 'ID'),
154-
mock_column(:active, :boolean, limit: 1, comment: 'ACTIVE'),
155-
],
156-
[],
157-
[])
151+
:id,
152+
[
153+
mock_column(:id, :bigint, comment: "ID"),
154+
mock_column(:active, :boolean, limit: 1, comment: "ACTIVE")
155+
],
156+
[],
157+
[])
158158
options = AnnotateRb::Options.from({})
159159
AnnotateRb::ModelAnnotator::AnnotationBuilder.new(klass, options).build
160160
end

0 commit comments

Comments
 (0)