1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

Disable assets debug on development environment only when running with Vagrant

This commit is contained in:
David O' Rojo 2018-02-26 18:18:24 -06:00
parent eb91d02ebe
commit e342a070de
3 changed files with 18 additions and 11 deletions

2
Vagrantfile vendored
View File

@ -28,7 +28,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder '.', '/vagrant', type: 'virtualbox'
# Provisioning
config.vm.provision "shell", privileged: true, run: "always" do |s|
config.vm.provision "shell", privileged: true, run: "once" do |s|
s.inline = "export LC_ALL=en_US.UTF-8\n" \
"export LANG=en_US.UTF-8\n" \
"export LANGUAGE=en_US.UTF-8"

View File

@ -4,7 +4,7 @@ Rails.application.configure do
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = true
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
@ -25,7 +25,8 @@ Rails.application.configure do
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = false
# Set to false when running with Vagrant to speed up response time.
config.assets.debug = ENV['VIRTUAL_DEV_ENV'] ? false : true
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.

View File

@ -1,5 +1,19 @@
#!/usr/bin/env zsh
# Set environmen values #######################################################
# Virtual environment flag
echo '# Set virtual environment flag' >> ~/.profile
echo 'export VIRTUAL_DEV_ENV=true' >> ~/.profile
echo "\n" >> ~/.profile
# Language configuration
echo '# Set locale configuration' >> ~/.profile
echo 'export LC_ALL=en_US.UTF-8' >> ~/.profile
echo 'export LANG=en_US.UTF-8' >> ~/.profile
echo 'export LANGUAGE=en_US.UTF-8' >> ~/.profile
echo "\n" >> ~/.profile
# Install and setup PostgreSQL ################################################
echo "***************************************************"
@ -93,14 +107,6 @@ echo "***************************************************"
echo "Checking for NVM... "
echo "***************************************************"
if [[ ! -x "$HOME/.nvm" ]]; then
# Set language configuration
echo '# Set locale configuration' >> ~/.profile
echo 'export LC_ALL=en_US.UTF-8' >> ~/.profile
echo 'export LANG=en_US.UTF-8' >> ~/.profile
echo 'export LANGUAGE=en_US.UTF-8' >> ~/.profile
echo "\n" >> ~/.profile
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
echo '# Node Version Manager' >> ~/.profile