osp-deploy 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/osp_deploy/rails_deployer.rb +3 -2
- data/lib/osp_deploy/version.rb +1 -1
- metadata +1 -1
@@ -68,6 +68,7 @@ class OspDeploy::RailsDeployer
|
|
68
68
|
|
69
69
|
# some defaults
|
70
70
|
@deployment_config['environment'] ||= production
|
71
|
+
@rails_env = @deployment_config['environment']
|
71
72
|
@valid = true
|
72
73
|
end
|
73
74
|
|
@@ -126,7 +127,7 @@ EOT
|
|
126
127
|
do_cmds 'do_before_local', do_before_local
|
127
128
|
|
128
129
|
if @deployment_config['jobs'].include?(:war)
|
129
|
-
execute_cmd 'warble'
|
130
|
+
execute_cmd 'RAILS_ENV="#{@rails_env}" warble'
|
130
131
|
end
|
131
132
|
|
132
133
|
|
@@ -365,7 +366,7 @@ EOS
|
|
365
366
|
puts cmd
|
366
367
|
else
|
367
368
|
if local
|
368
|
-
sys_cmd = cmd
|
369
|
+
sys_cmd = "export RAILS_ENV=#{@rails_env} && #{cmd}"
|
369
370
|
else
|
370
371
|
sys_cmd = "ssh #{server_uri} '. .profile && cd #{file_dir} && export RAILS_ENV=#{@rails_env} && #{cmd}'"
|
371
372
|
end
|
data/lib/osp_deploy/version.rb
CHANGED