jamesmartin / inline_svg

Embed SVG documents in your Rails views and style them with CSS
MIT License
716 stars 72 forks source link

RuboCop: Stage IV #171

Closed tagliala closed 3 days ago

tagliala commented 1 month ago

Requires #170

I've tried to only fix objective or almost-objective offenses, if you don't like some of the fixes let me know.

There are very few changes to production code


This PR fixes:

Some manual fixes:

tagliala commented 1 month ago

@jamesmartin rebased and ready for review

Most of the changes are related to non-production code

There are two changes on production code with a manual fix, they have a comment and I'm quite positive they are safe

tagliala commented 3 days ago

Hi @jamesmartin, sorry for the bump

I did the requested change, I think this can be merged, there are very few changes to production code.

Then we can proceed by enabling frozen string literals, which should also save memory and improve performance (even if there are no benchmarks at the moment, I will try to do implement something: require_relative helps a lot because it will allow to use https://rubygems.org/gems/gem_bench and compare the same gem on local machine side to side)

I would like to test inline_svg for a project I have in mind from a long time (streamline Font Awesome usage in Rails applications)