premailer / css_parser

Ruby CSS Parser
Other
279 stars 110 forks source link

Ruby < 2.0 support #112

Closed ojab closed 3 years ago

ojab commented 3 years ago

I wanted to try to fix https://github.com/premailer/css_parser/issues/111 and was annoyed by ruby-1.9-style hash literals, so I tried to actually run tests on ruby-1.9.3.

ojab [ ~/src/css_parser ]$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
ojab [ ~/src/css_parser ]$ bundle
There was a RuntimeError while loading css_parser.gemspec:
can't modify frozen String from
  /home/ojab/src/css_parser/css_parser.gemspec:4:in `new'

It's broken starting from v1.3.7 (tagged @ 2015-09-22). Apparently nobody uses css_parser with such an old rubies for the long time, maybe we can stop supporting them?

And how do do feel about introducing rubocop (it's hard to understand what the codestyle is right now) & replacing minitest with rspec (IMO minitest hash much higher entry barrier for unknown codebases)? I'll try to do it before starting https://github.com/premailer/css_parser/issues/111 if it's fine.

grosser commented 3 years ago
ojab commented 3 years ago

Thanks! I'm planning to add rubocop rules to match the current style as close as possible and will try to retain old rubies compat if newer features will not be required for simplification/other stuff.

grosser commented 3 years ago

don't invest too much work, can ignore most style rules, but maybe focus on things like eval/rescue/frozen-strings etc

On Tue, Jan 5, 2021 at 9:38 AM Slava Kardakov notifications@github.com wrote:

Thanks! I'm planning to add rubocop rules to match the current style as close as possible and will try to retain old rubies compat if newer features will not be required for simplification/other stuff.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/premailer/css_parser/issues/112#issuecomment-754785918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACYZ4PPPWIJJAOFDLLSPDSYNE75ANCNFSM4VVVAEBQ .