magic_recipes 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,10 +44,10 @@ module MagicRecipes
44
44
  DESC
45
45
  task :symlink, :roles => assets_role, :except => { :no_release => true } do
46
46
  run <<-CMD
47
- rm -rf #{latest_release}/public/#{assets_prefix} &&
48
- mkdir -p #{latest_release}/public &&
49
- mkdir -p #{shared_path}/assets &&
50
- ln -s #{shared_path}/assets #{latest_release}/public/#{assets_prefix}
47
+ #{sudo if use_sudo} rm -rf #{latest_release}/public/#{assets_prefix} &&
48
+ #{sudo if use_sudo} mkdir -p #{latest_release}/public &&
49
+ #{sudo if use_sudo} mkdir -p #{shared_path}/assets &&
50
+ #{sudo if use_sudo} ln -s #{shared_path}/assets #{latest_release}/public/#{assets_prefix}
51
51
  CMD
52
52
  end
53
53
 
@@ -91,14 +91,14 @@ module MagicRecipes
91
91
 
92
92
  desc "Generate the database.yml configuration file."
93
93
  task :setup, roles: :app do
94
- run "mkdir -p #{shared_path}/config"
94
+ run "#{sudo if use_sudo} mkdir -p #{shared_path}/config"
95
95
  template "postgresql.yml.erb", "#{shared_path}/config/postgres_#{rails_env}.yml"
96
96
  end
97
97
  after "deploy:setup", "postgresql:setup"
98
98
 
99
99
  desc "Symlink the database.yml file into latest release"
100
100
  task :symlink, roles: :app do
101
- run "ln -nfs #{shared_path}/config/postgres_#{rails_env}.yml #{release_path}/config/database.yml"
101
+ run "#{sudo if use_sudo} ln -nfs #{shared_path}/config/postgres_#{rails_env}.yml #{release_path}/config/database.yml"
102
102
  end
103
103
  after "deploy:finalize_update", "postgresql:symlink"
104
104
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magic_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: