Skip to content

Conversation

@pnorman
Copy link
Collaborator

@pnorman pnorman commented Sep 18, 2025

A consistent style helps when editing the code. Without any strong opinions I largely went for the rubocop defaults, with automatic corrections doing the bulk of the work.

Some method variable names were changed to longer ones. There is a Cop that identifies methods with short names. These changes were not just to satisfy the cop, as they also make the code easier to read.

When viewing this diff it might help to turn whitespace differences off.

image

I tested this with Street Spirit and the output is byte for byte identical

A consistent style helps when editing the code. Without any strong
opinions I largely went for the rubocop defaults, with automatic
corrections doing the bulk of the work.

Some method variable names were changed to longer ones. There
is a Cop that identifies methods with short names. These changes
were not just to satisfy the cop, as they also make the code
easier to read.
@systemed
Copy link
Owner

Thanks!

I would rather not rewrite the single-line statements to def method_name = something_or_other. This is Ruby 3.x syntax and certainly I still have a few machines on 2.x.

@pnorman
Copy link
Collaborator Author

pnorman commented Sep 19, 2025

I would rather not rewrite the single-line statements to def method_name = something_or_other. This is Ruby 3.x syntax and certainly I still have a few machines on 2.x.

How can we keep Ruby 3.x features from creeping in? I'm not a ruby expert so I won't know easily know if a language feature was present in 2.x.

Also, are the machines on 2.x running glug? I would expect them to only need the compiled stylesheet.

This changes to the syntax to one that is supported by Ruby 2.7
and passes Rubocop's Cops.
@pnorman pnorman requested a review from systemed September 19, 2025 19:13
@pnorman pnorman merged commit 69e49a7 into systemed:master Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants