From 674045addb3558cd2495db67f0b18ae467930c07 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Mon, 5 Oct 2015 10:53:40 -0600 Subject: [PATCH] don't remove compressed files from client app symlinks Change-Id: Ib26d7865dd68a53e3dc7b6ea424965939c07ca0e Reviewed-on: https://gerrit.instructure.com/64579 Reviewed-by: Rob Orton Tested-by: Jenkins Product-Review: Cody Cutrer QA-Review: Cody Cutrer --- .gitignore | 2 ++ config/initializers/client_app_symlinks.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index b9f04ad5242..8328c853366 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,9 @@ Gemfile.lock4 /public/javascripts/jst/ /public/javascripts/jsx/ /public/javascripts/translations/ +/public/javascripts/**/*.gz /public/optimized/ +/public/vendor/tinymce_themes/**/*.gz /spec/javascripts/compiled/ /spec/javascripts/requirejs_config.js /spec/javascripts/runner.html diff --git a/config/initializers/client_app_symlinks.rb b/config/initializers/client_app_symlinks.rb index b4f4ab72392..a677d91f8d1 100644 --- a/config/initializers/client_app_symlinks.rb +++ b/config/initializers/client_app_symlinks.rb @@ -33,6 +33,8 @@ def maintain_client_app_symlinks dir = dir.dirname end end + # compressing assets can generate .gz versions of files; don't remove them + valid_files.merge(valid_files.map { |f| Pathname.new(f.to_s + '.gz') }) # remove any unnecessary links Pathname.glob("public/javascripts/client_apps/**/*").each do |file|