Skip to content

Commit

Permalink
All config in one file, loaded using load:defaults task
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjmit committed Nov 7, 2013
1 parent 8972709 commit 3031ab1
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
7 changes: 6 additions & 1 deletion lib/capistrano/symfony.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
load File.expand_path("../symfony/defaults.rb", __FILE__)
# Core tasks for deploying symfony
load File.expand_path("../tasks/symfony.rake", __FILE__)

# Additional tasks
require "capistrano/symfony/console"
require "capistrano/symfony/composer"
require "capistrano/symfony/assets"

namespace :load do
task :defaults do
load 'capistrano/symfony/defaults.rb'

This comment has been minimized.

Copy link
@peterjmit

peterjmit Nov 7, 2013

Author Owner

I have move all config settings into one file as @nifr suggested - we probably want to reduce the number of configuration values anyways (there are still many).

The load:defaults tasks seems to be the proper way to load the settings in

end
end
16 changes: 0 additions & 16 deletions lib/capistrano/symfony/assets.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1 @@
# Use AsseticBundle
set :dump_assetic_assets, false

# Assets install
set :assets_install, false
set :assets_symlinks, false
set :assets_relative, false
set :assets_install_path, fetch(:web_path)

# Whether to update `assets_version` in `config.yml`
set :update_assets_version, false

set :normalize_asset_timestamps, true
# Asset folders (that need to be timestamped)
set :asset_children, [fetch(:web_path) + "/css", fetch(:web_path) + "/images", fetch(:web_path) + "/js"]

load File.expand_path("../../tasks/assets.rake", __FILE__)
3 changes: 0 additions & 3 deletions lib/capistrano/symfony/console.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Symfony console bin
set :symfony_console, fetch(:app_path) + "/console"

load File.expand_path("../../tasks/symfony_console.rake", __FILE__)
17 changes: 17 additions & 0 deletions lib/capistrano/symfony/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,20 @@
# If set to false, it will never ask for confirmations (migrations task for instance)
# Use it carefully, really!
set :interactive_mode, true
set :symfony_console, fetch(:app_path) + "/console"

# Use AsseticBundle
set :dump_assetic_assets, false

# Assets install
set :assets_install, false
set :assets_symlinks, false
set :assets_relative, false
set :assets_install_path, fetch(:web_path)

# Whether to update `assets_version` in `config.yml`
set :update_assets_version, false

set :normalize_asset_timestamps, true
# Asset folders (that need to be timestamped)
set :asset_children, [fetch(:web_path) + "/css", fetch(:web_path) + "/images", fetch(:web_path) + "/js"]

0 comments on commit 3031ab1

Please sign in to comment.