Skip to content

Commit fa960ff

Browse files
Fix StandardRB linting issues
- Auto-corrected Ruby style issues - Applied standardrb --fix [Automated daily update]
1 parent 1f5ef87 commit fa960ff

File tree

3 files changed

+43
-9
lines changed

3 files changed

+43
-9
lines changed

spec/services/pdf_generator_service/assessment_block_builder_unit_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,27 +226,27 @@
226226
it "correctly identifies pass fields vs other boolean fields" do
227227
# Test that the builder correctly distinguishes between actual pass/fail fields
228228
# and other fields that might have "pass" in their name
229-
229+
230230
# Test with known pass field from materials assessment
231231
assessment.fabric_strength_pass = true
232232
fields = {pass: :fabric_strength_pass}
233-
233+
234234
pass_value = builder.send(:determine_pass_value, fields, :fabric_strength_pass, true)
235235
expect(pass_value).to eq(true)
236-
236+
237237
# Test field grouping logic for fields with "pass" in the name
238238
field_keys = [:fabric_strength_pass, :fabric_strength_comment, :thread_pass]
239239
groups = builder.send(:group_assessment_fields, field_keys)
240240
expect(groups.keys).to include(:fabric_strength, :thread)
241241
expect(groups[:fabric_strength][:pass]).to eq(:fabric_strength_pass)
242-
242+
243243
# Test that when main field is the pass field itself, it returns the assessment value
244244
assessment.thread_pass = false
245245
fields_with_only_pass = {pass: :thread_pass}
246246
pass_value = builder.send(:determine_pass_value, fields_with_only_pass, :thread_pass, true)
247247
# When the main field IS the pass field, it returns the value from assessment
248248
expect(pass_value).to eq(false)
249-
249+
250250
# Test that fields without pass suffix return nil for pass_fail
251251
assessment.ropes = 25
252252
fields_without_pass = {base: :ropes}

spec/services/pdf_generator_service_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,18 @@
159159
it "would add draft watermark to incomplete inspections in production" do
160160
# Watermarks are disabled in test environment to prevent test instability
161161
# This test verifies the logic for applying watermarks would work correctly
162-
162+
163163
# Verify draft inspection is incomplete
164164
expect(draft_inspection).not_to be_complete
165-
165+
166166
# Test that we can generate PDF without errors
167167
pdf = PdfGeneratorService.generate_inspection_report(draft_inspection)
168168
expect { pdf.render }.not_to raise_error
169-
169+
170170
# In production, the watermark would be added via Utilities.add_draft_watermark
171171
# when inspection.complete? is false and Rails.env.test? is false
172172
expect(Rails.env).to be_test # Confirm we're in test environment
173-
173+
174174
# If we were not in test environment, watermark would be applied
175175
allow(Rails.env).to receive(:test?).and_return(false)
176176
expect(draft_inspection.complete?).to eq(false) # This would trigger watermark in production

standardrb_output.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Warning: AllCops does not support MigratedSchemaVersion parameter.
2+
3+
Supported parameters are:
4+
5+
- RubyInterpreters
6+
- Include
7+
- Exclude
8+
- DefaultFormatter
9+
- DisplayCopNames
10+
- DisplayStyleGuide
11+
- StyleGuideBaseURL
12+
- DocumentationBaseURL
13+
- DocumentationExtension
14+
- ExtraDetails
15+
- StyleGuideCopsOnly
16+
- EnabledByDefault
17+
- DisabledByDefault
18+
- NewCops
19+
- UseCache
20+
- MaxFilesInCache
21+
- CacheRootDirectory
22+
- AllowSymlinksInCacheRootDirectory
23+
- TargetRubyVersion
24+
- ParserEngine
25+
- SuggestExtensions
26+
- ActiveSupportExtensionsEnabled
27+
- StringLiteralsFrozenByDefault
28+
- Enabled
29+
- TargetRailsVersion
30+
Warning: Lint/UselessAccessModifier does not support ContextCreatingMethods parameter.
31+
32+
Supported parameters are:
33+
34+
- Enabled

0 commit comments

Comments
 (0)