Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #533 #534

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/capifony_symfony2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def load_database_config(data, env)

def read_parameters(data)
if '.ini' === File.extname(app_config_file) then
File.readable?(data) ? IniFile::load(data) : IniFile.new(data)
File.readable?(data) ? IniFile::load(data) : IniFile.new( :content => data )
else
YAML::load(data)
end
Expand Down
8 changes: 4 additions & 4 deletions lib/symfony2/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
run "#{try_sudo} sh -c 'cd #{shared_path}; tar -zcvf #{file} --exclude='cached-copy' .'"
capifony_puts_ok

FileUtils.mkdir_p("backups/")
FileUtils.mkdir_p("#{backup_path}/")

capifony_progress_start
get(file, "backups/#{filename}", :via => :scp) do |channel, name, sent, total|
get(file, "#{backup_path}/#{filename}", :via => :scp) do |channel, name, sent, total|
capifony_progress_update(sent, total)
end

capifony_pretty_print "--> Cleaning up"
begin
FileUtils.ln_sf(filename, "backups/#{application}.#{env}_shared.latest.tar.gz")
FileUtils.ln_sf(filename, "#{backup_path}/#{application}.#{env}_shared.latest.tar.gz")
rescue Exception # fallback for file systems that don't support symlinks
FileUtils.cp_r("backups/#{filename}", "backups/#{application}.#{env}_shared.latest.tar.gz")
FileUtils.cp_r("#{backup_path}/#{filename}", "#{backup_path}/#{application}.#{env}_shared.latest.tar.gz")
end
run "#{try_sudo} rm -f #{file}"
capifony_puts_ok
Expand Down