everzet/capifony — Issue #76: Nonstandard base directory problems
Author: krmcbride
Created: 2011-11-14 04:28:29+00:00
State: open

At work our main application uses a couple frameworks/libs and has Sf2 one level deep in our git repo's file structure like so:

```
/some_lib
/framework_foo
/sf2
/lib_bar
```

Inside the `/sf2/` directory, though, everything is setup as a standard Sf2 install. I first tried just setting the correct `app_path` and `web_path`, which appear to be the basis of just about all other paths, but I was still getting path errors. I'm still a ruby/capistrano noob so maybe I'm overlooking something, but even though the two paths above were set correctly in the deploy.rb, I find I have to explicitly set the correct `cache_path` and `symfony_console`.

Unfortunately, not all paths are configurable -- some appear hardcoded. Example:

[symfony2.rb#L145](https://github.com/everzet/capifony/blob/master/lib/symfony2.rb#L145)

```ruby

namespace :vendors do
desc "Runs the bin/vendors script to install the vendors (fast if already installed)"
task :install do
run "cd #{latest_release} && #{php_bin} bin/vendors install"
end

desc "Runs the bin/vendors script to reinstall the vendors"
task :reinstall do
run "cd #{latest_release} && #{php_bin} bin/vendors install --reinstall"
end

desc "Runs the bin/vendors script to upgrade the vendors"
task :upgrade do
run "cd #{latest_release} && #{php_bin} bin/vendors update"
end
end

```

Since we have a standard Sf2 installation, it would be nice to just have a `base_dir` variable to set (in our case I could just set that to `sf2` and be done with it).

I'd send some PRs but I'm swamped at work, sorry!