alpha_omega 0.0.23 → 0.0.24

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- alpha_omega (0.0.23)
4
+ alpha_omega (0.0.24)
5
5
  HeSYINUvSBZfxqA-capistrano
6
6
  HeSYINUvSBZfxqA-capistrano_colors
7
7
  HeSYINUvSBZfxqA-capistrano_log
@@ -36,6 +36,9 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
36
36
  _cset(:deploy_to) { "/u/apps/#{application}" }
37
37
  _cset(:revision) { source.head }
38
38
 
39
+ _cset :root_user, "root"
40
+ _cset :root_group, "root"
41
+
39
42
  # =========================================================================
40
43
  # These variables should NOT be changed unless you are very confident in
41
44
  # what you are doing. Make sure you understand all the implications of your
@@ -49,12 +52,12 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
49
52
 
50
53
  _cset :version_dir, "releases"
51
54
  _cset :current_dir, "current"
52
- _cset :service_dir, "service"
55
+ _cset :service_dir, "service"
53
56
  _cset :releases, %w(alpha omega)
54
57
 
55
58
  _cset(:releases_path) { File.join(deploy_to, version_dir) }
56
59
  _cset(:current_path) { File.join(deploy_to, current_dir) }
57
- _cset(:service_path) { File.join(deploy_to, service_dir) }
60
+ _cset(:service_path) { File.join(deploy_to, service_dir) }
58
61
  _cset(:release_path) { File.join(releases_path, release_name) }
59
62
 
60
63
  _cset(:current_release) { release_path }
@@ -201,8 +204,8 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
201
204
 
202
205
  task :bootstrap_code, :except => { :no_release => true } do
203
206
  if releases.length == 1 # without services and run as root
204
- sudo "install -d -m 0775 -o root -g root #{deploy_to}"
205
- sudo "install -d -m 0775 -o #{user} -g #{group} #{releases_path} #{deploy_to}/log"
207
+ run "[[ -d #{deploy_to} ]] || sudo install -d -m 0775 -o #{root_user} -g #{root_group} #{deploy_to}"
208
+ run "sudo install -d -m 0775 -o #{user} -g #{group} #{releases_path} #{deploy_to}/log"
206
209
  else
207
210
  dirs = [ releases_path, service_path, "#{deploy_to}/log" ]
208
211
  dir_args = dirs.map {|d| d.sub("#{deploy_to}/", "") }.join(' ')
@@ -1,3 +1,3 @@
1
1
  module AlphaOmega
2
- Version = "0.0.23"
2
+ Version = "0.0.24"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 23
10
- version: 0.0.23
9
+ - 24
10
+ version: 0.0.24
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem