Closed maxhudson closed 3 years ago
I don't think this is a complete solution.. you can have your javascripts in any path, simply by adding paths to the asset paths configuration.
Because of that, I don't see how this is something that could be merged.
So is there any news about what the deprecations are replaced with?
I really appreciate your efforts on this -- this is by no means a slight, I just think asking a maintainer of sprockets might be a better solution -- see if there's an alternative, explain the need for it, etc.
I understand. I figured I'd make a pull request in-case you had a real solution.
From what I could tell, .filename
is supposed to be used instead of pathname. .logical_path
is not actually deprecated, but an error is thrown when it is used saying that .pathname
is not a method, so it seems like .logical_path
should be deprecated or modified in sprockets. That specific point seems like something worth mentioning to @sstephenson @rails.
As far as .to_a
, I'm not sure, but the default configuration of teaspoon seems to rely upon it because the default config.expand_assets
is set to true and results in that method being called.
I am guessing this is outdated and could be closed?
looks like this can be closed
I was able to get Sprockets 4 beta 6 + es6 javascript files working with teaspoon by making this modification and setting
config.expand_assets = false
.Teaspoon is using all of these and throwing errors because of them:
Has a deprecated dependency as far as I can tell (.pathname): http://www.rubydoc.info/github/sstephenson/sprockets/master/Sprockets%2FAsset:logical_path Deprecated: http://www.rubydoc.info/github/sstephenson/sprockets/Sprockets%2FAsset%3Apathname Deprecated: http://www.rubydoc.info/github/sstephenson/sprockets/Sprockets%2FAsset%3Ato_a
The way I modified the
suite.rb
file probably isn't ideal, but it does work for me. It would probably need to be modified if this were to merge.