make compile_assets work when there’s no db.yml
Fixes: CNVS-39854 Test plan: * mv config/database.yml config/database.yml.backup * bundle exec rake canvas:compile_assets * it should work * Docker build should pass Change-Id: I0786d1de1d6f6f69d665e10b0428571e77d7f859 Reviewed-on: https://gerrit.instructure.com/128974 Reviewed-by: James Williams <jamesw@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins Product-Review: Ryan Shaw <ryan@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
e1d0428a9d
commit
a9eb19ffa6
|
@ -19,7 +19,11 @@
|
|||
# instead of doing it's normal cache busting stuff on the url.
|
||||
# eg: instead of '/images/whatever.png?12345', we want '/dist/images/whatever-<md5 of file>.png'.
|
||||
# There is a different method that needs to be monkeypatched for rails 3 vs rails 4
|
||||
require 'action_view/helpers/asset_url_helper'
|
||||
|
||||
|
||||
|
||||
require 'action_view/helpers'
|
||||
|
||||
module RevAssetPaths
|
||||
def path_to_asset(source, options = {})
|
||||
original_path = super
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace :css do
|
|||
task :compile do
|
||||
# try to get a conection to the database so we can do the brand_configs:write below
|
||||
require 'config/environment' rescue nil
|
||||
require 'config/initializers/revved_asset_urls'
|
||||
require 'lib/brandable_css'
|
||||
puts "--> Starting: 'css:compile'"
|
||||
time = Benchmark.realtime do
|
||||
|
|
Loading…
Reference in New Issue