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

Allow manifest.js to be placed anywhere. #467

Closed

Conversation

yubele
Copy link

@yubele yubele commented Sep 19, 2020

Description

This implementation ensures that you don't get an error if you place manifest.js anywhere (other than app/assets/config/manifest.js).

This fix may also help resolve #369.

Problems to fix

After moving manifest.js, I get a ManifestNeededError.

@yubele yubele force-pushed the feature/support_any_manifest_location branch from bff8af8 to 9d4cdc0 Compare September 19, 2020 17:58
@yubele yubele force-pushed the feature/support_any_manifest_location branch from 9d4cdc0 to 31fe7a7 Compare September 19, 2020 18:03
@yubele yubele marked this pull request as ready for review September 19, 2020 18:33
@yubele
Copy link
Author

yubele commented Sep 20, 2020

In the test below, it is failed, but I ran it in the same procedure as travis, but it did not reproduce in my environment.

https://travis-ci.org/github/rails/sprockets-rails/jobs/728618169
https://travis-ci.org/github/rails/sprockets-rails/jobs/728618185

log

yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ rvm use 2.5.8 --install --binary --fuzzy
Required ruby-2.5.8 is not installed - installing.
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/18.04/x86_64/ruby-2.5.8.tar.bz2
Checking requirements for ubuntu.
Requirements installation successful.
ruby-2.5.8 - #configure
ruby-2.5.8 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19.0M  100 19.0M    0     0  20.8M      0 --:--:-- --:--:-- --:--:-- 20.7M
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.5.8 - #validate archive
ruby-2.5.8 - #extract
ruby-2.5.8 - #validate binary
ruby-2.5.8 - #setup
ruby-2.5.8 - #gemset created /home/ubuntu/.rvm/gems/ruby-2.5.8@global
ruby-2.5.8 - #importing gemset /home/ubuntu/.rvm/gemsets/global.gems..................................
ruby-2.5.8 - #generating global wrappers.......
ruby-2.5.8 - #gemset created /home/ubuntu/.rvm/gems/ruby-2.5.8
ruby-2.5.8 - #importing gemsetfile /home/ubuntu/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.5.8 - #generating default wrappers.......
Using /home/ubuntu/.rvm/gems/ruby-2.5.8
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ gem install bundler -v '<2'
Fetching bundler-1.17.3.gem
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Installing ri documentation for bundler-1.17.3
Done installing documentation for bundler after 4 seconds
1 gem installed
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ ls gemfiles/Gemfile.rails-^C
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ export BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rails-5.0.x.sprockets-4.x
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ ruby --version
ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux]
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ gem install bundler -v '<2'
Successfully installed bundler-1.17.3
Parsing documentation for bundler-1.17.3
Done installing documentation for bundler after 3 seconds
1 gem installed
yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ bundle install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-vendor/bundle}
Fetching https://github.com/rails/sprockets.git
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 13.0.1
Installing rake 13.0.1
Fetching concurrent-ruby 1.1.7
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6
Installing concurrent-ruby 1.1.7
Installing thread_safe 0.3.6
Fetching builder 3.2.4
Fetching erubis 2.7.0
Installing builder 3.2.4
Fetching mini_portile2 2.4.0
Installing erubis 2.7.0
Installing mini_portile2 2.4.0
Fetching crass 1.0.6
Installing crass 1.0.6
Fetching rack 2.2.3
Installing rack 2.2.3
Using bundler 1.17.3
Fetching execjs 2.7.0
Fetching ffi 1.13.1
Installing execjs 2.7.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching thor 1.0.1
Installing ffi 1.13.1 with native extensions
Installing thor 1.0.1
Fetching rb-fsevent 0.10.4
Installing rb-fsevent 0.10.4
Fetching tzinfo 1.2.7
Installing tzinfo 1.2.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching nokogiri 1.10.10
Installing nokogiri 1.10.10 with native extensions
Fetching rack-test 0.6.3
Installing rack-test 0.6.3
Using sprockets 4.0.2 from https://github.com/rails/sprockets.git (at master@dba2802)
Fetching uglifier 4.2.0
Fetching activesupport 5.0.7.2
Installing uglifier 4.2.0
Fetching rb-inotify 0.10.1
Installing activesupport 5.0.7.2
Installing rb-inotify 0.10.1
Fetching loofah 2.7.0
Installing loofah 2.7.0
Fetching sass-listen 4.0.0
Fetching rails-html-sanitizer 1.3.0
Installing sass-listen 4.0.0
Fetching rails-dom-testing 2.0.3
Installing rails-html-sanitizer 1.3.0
Fetching sass 3.7.4
Installing rails-dom-testing 2.0.3
Fetching actionview 5.0.7.2
Installing sass 3.7.4
Installing actionview 5.0.7.2
Fetching actionpack 5.0.7.2
Installing actionpack 5.0.7.2
Using sprockets-rails 3.2.2 from source at `..`
Fetching railties 5.0.7.2
Installing railties 5.0.7.2
Bundle complete! 8 Gemfile dependencies, 32 gems now installed.
Bundled gems are installed into `./gemfiles/vendor/bundle`
Post-install message from i18n:

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

If you are upgrading your Rails application from an older version of Rails:

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

If you are starting a NEW Rails application, you can ignore this notice.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Post-install message from sass:

Ruby Sass has reached end-of-life and should no longer be used.

* If you use Sass as a command-line tool, we recommend using Dart Sass, the new
  primary implementation: https://sass-lang.com/install

* If you use Sass as a plug-in for a Ruby web framework, we recommend using the
  sassc gem: https://github.com/sass/sassc-ruby#readme

* For more details, please refer to the Sass blog:
  https://sass-lang.com/blog/posts/7828841

yusuke:~/environment/sprockets-rails (feature/support_any_manifest_location) $ bundle exec rake
/home/ubuntu/.rvm/rubies/ruby-2.5.8/bin/ruby -w -I"lib:lib" -I"/home/ubuntu/environment/sprockets-rails/gemfiles/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib" "/home/ubuntu/environment/sprockets-rails/gemfiles/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/lib/rake/rake_test_loader.rb" "test/test_helper.rb" "test/test_quiet_assets.rb" "test/test_railtie.rb" "test/test_task.rb" 
/home/ubuntu/environment/sprockets-rails/gemfiles/vendor/bundle/ruby/2.5.0/gems/activesupport-5.0.7.2/lib/active_support/core_ext/hash/slice.rb:21: warning: method redefined; discarding old slice
/home/ubuntu/environment/sprockets-rails/gemfiles/vendor/bundle/ruby/2.5.0/gems/actionview-5.0.7.2/lib/action_view/helpers/controller_helper.rb:14: warning: `*' interpreted as argument prefix
Run options: --seed 39417

# Running:

........................................................................................................................................................

Finished in 11.806762s, 12.8740 runs/s, 65.2169 assertions/s.

@yubele yubele closed this Jan 12, 2022
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.

sprockets 4 manifest.js location
1 participant