Skip to content
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

Merged
merged 5 commits into from
Mar 9, 2017

Conversation

coppolaf
Copy link

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

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
Copy link
Collaborator

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.

@coppolaf
Copy link
Author

coppolaf commented Sep 8, 2016

@maxd,

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.....
it produces an error in my environment (see pull request #123... here @manzikov solved it see link below)

diff rails5 vs pull req #123

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

here:Could you please explain why charset is set to :css? Here is examples of using register_mime_type method.

this error is surely due to this passage.... (i missed the charset definition!)

then used the declaration on row 17 to indirectly reference Sprockets...
in my actual configration Sprockets is at v.3.7.0 so..
it still responds to register_engine method....
the code i've produced seems to be running fine (apparently) but as you wrote, fails testing just on line 20... (you take my attention on this error.... it was due to find/replace i mind...)

so,
many thanks again for your time,
it was a pleasure for me to debate about my code...

going to fix this and test again vs travis-ci

regards

Francesco

@coppolaf
Copy link
Author

coppolaf commented Sep 8, 2016

thanks to @maxd suggestions,

now code passes travis-ci checks!!

@simi
check it and let us know if it will result useful!!

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...
all suggestions are welcome!!

regards,
Francesco

@maxd maxd mentioned this pull request Sep 29, 2016
@ajm188
Copy link

ajm188 commented Feb 25, 2017

@coppolaf @maxd any reason why this hasn't been merged yet? I would like to be able to remove this deprecation warning from my application.

@metaskills metaskills merged commit ce747da into metaskills:rails5 Mar 9, 2017
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.

4 participants