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

[close #381] Avoid Sprockets deprecations #382

Merged
merged 7 commits into from
Jul 22, 2016

Conversation

schneems
Copy link
Member

No description provided.

@rails-bot
Copy link

warning Warning warning

  • Pull requests are usually filed against the master branch for this repo, but this one is against 5-0-stable. Please double check that you specified the right target!

@schneems schneems force-pushed the schneems/fix-deprecations branch 2 times, most recently from 15e6092 to 5f306d3 Compare July 22, 2016 14:05
- Use both `register_engine` and `register_transformer` in railtie.rb. 
- In the test postprocessor use an object that responds to `call` and `new.render`.
Add required manifest files so we don't get exceptions.

In sprockets 4 when you render a `.scss` file it will give you the raw file instead of the generated CSS. To fix tests we must generate css instead of scss.
Two arguments get passed in, so we need to arguments in the interface.
env.register_engine '.scss', Sass::Rails::ScssTemplate, silence_deprecation: true
args = ['.sass', Sass::Rails::SassTemplate]
args << { silence_deprecation: true } if env.method(:register_engine).arity > 2
env.register_engine *args
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we'd better put brackets here or we'll get warning: *' interpreted as argument prefix

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.

3 participants