canvas-lms/gems/handlebars_tasks
Ryan Shaw 9f34f62be9 upload css direct to s3 and optimize unbranded css
fixes: CNVS-22276

what this change does:
* changes it so if you have a 'host' set in canvs_cdn.yml,
  when you run brandable_css it will push the css
  files directly to s3 instead of writing them all to
  disk.
* fixes the bug where brandable_css thought it had
  to re-compile css files that have not changed
* changes the way we load css bundles that don't include
  any branding or use any of the variant variables
  (like: $use-high-contrast or $use-new-styles).
  before, we generated a unique css file for each
  variant and each brand for any of those bundles.
  this will instead point everyone to same url if 
  the file uses none of those variables.

test plan:
* with no canvas_cdn.yml file:
* run compile_assets
* run it again, it should say "no changes" quickly
* the css in canvas should work
* now, rm -rf public/dist/brandable_css
* save a canvas_cdn.yml with proper s3/cloudfront settings
* compile_assets
* canvas should work and use the css that was uploaded
  to s3 in previous step
* compile_assets again, it should say "no changes"
  within a few seconds.
* if you can, delete a css file from s3 & run 
  brandable_css again. it should see that it needs
  to regenerate that file and do so correctly.

when testing the css in the UI, especially make sure
to look for:
* try loading the equation editor in different variants,
  (e.g.: high contrast, new styles, legacy) the css
  for it should always be loaded from <cdn>/dist/brandable_css/no_variables/...
* keep your js console open, there should not be any 404s
* check the screenreader_gradebook


most of the changes actually happened in brandable_css:
https://github.com/ryankshaw/brandable_css/compare/6e0ddc59...master
when code-reviewing, please do a thorough scan of 
those changes too.


Change-Id: Ie6efcedd92c3783e0b2dd194ec222b9dc28d0838	
Change-Id: Ie6efcedd92c3783e0b2dd194ec222b9dc28d0838
Reviewed-on: https://gerrit.instructure.com/61495
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-04 21:23:43 +00:00
..
lib upload css direct to s3 and optimize unbranded css 2015-09-04 21:23:43 +00:00
spec spec: fix handlebars_ember_spec 2015-07-07 16:33:19 +00:00
.rspec extract handlebars_tasks gem 2014-04-21 19:48:22 +00:00
Gemfile extract handlebars_tasks gem 2014-04-21 19:48:22 +00:00
Rakefile extract handlebars_tasks gem 2014-04-21 19:48:22 +00:00
handlebars_tasks.gemspec align rspec version in gems with parent 2014-08-12 22:27:39 +00:00
test.sh bundle check before bundle install for gem tests 2014-06-03 20:09:10 +00:00