[Cleanup] Remove old sass#6
Open
phenchaw wants to merge 1 commit into
Open
Conversation
| spec.add_dependency 'tilt' | ||
| spec.add_dependency 'slim' | ||
| spec.add_dependency 'sass' | ||
| spec.add_dependency 'configurations', '~> 2.2.0' |
There was a problem hiding this comment.
Missing SCSS engine dependency after removing sass gem
The sass gem is removed here, but no Dart Sass gem is added as a replacement. The project still has a style.scss template (lib/aub/payroll/summary_file/templates/style.scss) that is rendered at runtime via Tilt in html_generator.rb:
render 'style.scss', 'style.css'This calls Tilt.new(template_path).render(self) at line 41, which requires a registered template handler for SCSS. Without a gem that provides an SCSS engine (such as dartsass-ruby), Tilt will raise a RuntimeError: Could not find Tilt template handler for 'scss' when this code executes, breaking PDF generation.
The fix should add a Dart Sass gem dependency:
Suggested change
| spec.add_dependency 'configurations', '~> 2.2.0' | |
| spec.add_dependency 'dartsass-ruby' | |
| spec.add_dependency 'configurations', '~> 2.2.0' | |
| end |
Alternatively, sassc (LibSass) is also a valid SCSS processor.
Prompt To Fix With AI
This is a comment left during a code review.
Path: aub-payroll.gemspec
Line: 37
Comment:
Missing SCSS engine dependency after removing `sass` gem
The `sass` gem is removed here, but no Dart Sass gem is added as a replacement. The project still has a `style.scss` template (`lib/aub/payroll/summary_file/templates/style.scss`) that is rendered at runtime via Tilt in `html_generator.rb`:
```ruby
render 'style.scss', 'style.css'
```
This calls `Tilt.new(template_path).render(self)` at line 41, which requires a registered template handler for SCSS. Without a gem that provides an SCSS engine (such as `dartsass-ruby`), Tilt will raise a `RuntimeError: Could not find Tilt template handler for 'scss'` when this code executes, breaking PDF generation.
The fix should add a Dart Sass gem dependency:
```suggestion
spec.add_dependency 'dartsass-ruby'
spec.add_dependency 'configurations', '~> 2.2.0'
end
```
Alternatively, `sassc` (LibSass) is also a valid SCSS processor.
How can I resolve this? If you propose a fix, please make it concise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed sass dependency, tilt should use dartsass
Greptile Summary
This PR removes the
sassgem dependency fromaub-payroll.gemspecwithout adding a replacement SCSS engine. However, the project still contains an activestyle.scsstemplate (lib/aub/payroll/summary_file/templates/style.scss) that is rendered at runtime via Tilt inhtml_generator.rb. Without a registered SCSS handler (provided by gems likedartsass-rubyorsassc), this will cause a runtimeRuntimeErrorwhenever a summary PDF is generated, breaking a core feature of the gem.Critical issue: No replacement SCSS-processing dependency was added before removing
sass.Confidence Score: 1/5
sasswithout adding a replacement SCSS engine will cause runtime failures when generating PDFs.sass) while leaving active SCSS template rendering code in place. This will causeRuntimeErrorwheneverhtml_generator.rbattempts to renderstyle.scssvia Tilt, breaking PDF generation — a core feature of this gem. No replacement dependency (e.g.,dartsass-ruby,sassc) is provided.aub-payroll.gemspec— must add an SCSS engine gem before thesassremoval is safe.Sequence Diagram
sequenceDiagram participant Caller participant HTMLGenerator participant Tilt participant SassEngine Caller->>HTMLGenerator: generate() HTMLGenerator->>Tilt: Tilt.new("style.scss") Tilt->>SassEngine: lookup SCSS handler Note over SassEngine: ❌ No sass/dartsass gem present<br/>after this PR — Tilt raises RuntimeError SassEngine-->>Tilt: handler not found Tilt-->>HTMLGenerator: RuntimeError HTMLGenerator-->>Caller: Exception propagatesLast reviewed commit: 381b0e7
Context used:
dashboard- CLAUDE.md (source)