Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Commit

Permalink
Add support for optional AS=user variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnston committed Sep 30, 2011
1 parent 00fbb34 commit 1a20e29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/porter/capistrano.rb
Expand Up @@ -5,7 +5,7 @@
stage = ARGV[0]

task :db do
set :user, ENV["USER"]
set :user, ENV["AS"] || ENV["USER"]

s = ""
run "cat #{config[stage]["app_dir"]}/config/database.yml" do |channel, stream, data|
Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/porter.rake
Expand Up @@ -7,7 +7,7 @@ namespace :porter do
namespace stage do
task :db => :environment do
src_db = ActiveRecord::Base.configurations[Rails.env]["database"].split("_").first+"_"+stage
src_user = ENV["USER"]
src_user = ENV["AS"] || ENV["USER"]

src_domain = config[stage]["domain"]

Expand Down Expand Up @@ -52,7 +52,7 @@ namespace :porter do

task :assets => :environment do
root = Rails.root
user = ENV["USER"]
user = ENV["AS"] || ENV["USER"]
domain = config[stage]['domain']
app_dir = config[stage]['app_dir']
asset_dirs = config[stage]['asset_dirs'].blank? ? '' : config[stage]['asset_dirs'].gsub(/,/,'').split(' ').map { |i| i.strip }
Expand Down

0 comments on commit 1a20e29

Please sign in to comment.