-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails5 - fix for first deprecation warning see issue #122 #124
Conversation
…t sprockets new requirements
… above 3.7.x o above
args << { mime_type: 'text/less', silence_deprecation: true } if env::VERSION.start_with?("3") | ||
env.register_engine(*args) | ||
elsif env.respond_to?(:register_transformer) | ||
env.register_mime_type 'text/less', extensions: ['.less'], charset: :css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain why charset
is set to :css
? Here is examples of using register_mime_type
method.
looking to rebuilt all the path i've followed to produce the code you've read.... i've started looking at @simi version inside rails5 branch..... then i've looked at the link: Registering All Versions of Sprockets in Processors then copy/paste of the code from example and modified params to adapt (sure here i've missed something as you noted
this error is surely due to this passage.... (i missed the charset definition!) then used the declaration on row 17 to indirectly reference Sprockets... so, going to fix this and test again vs travis-ci regards Francesco |
thanks to @maxd suggestions, now code passes travis-ci checks!! @simi note: i haven't changed row 23... ( ....charset: :css.... ) let me know if this may be harmful using Sprockets version > 3.x!! PS: sure other errors are present inside my implementation... regards, |
this fix resolves the first deprecation warning object of issue #122
second warning persists...
i've tested this using rails 4.2.4
pls check against rails5 ...
regards,
francesco