alpha_omega 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,3 +4,4 @@
4
4
  /releases
5
5
  /log
6
6
  /*.gem
7
+ /Capfile
File without changes
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source :rubygems
2
- gem "capistrano", "2.5.21"
3
- gem "capistrano_colors"
4
- gem "capistrano-log_with_awesome"
5
- gem "foreman"
6
- gem "grit"
2
+
3
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,3 +1,13 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ alpha_omega (0.0.4)
5
+ capistrano (= 2.5.21)
6
+ capistrano-log_with_awesome
7
+ capistrano_colors
8
+ foreman
9
+ grit
10
+
1
11
  GEM
2
12
  remote: http://rubygems.org/
3
13
  specs:
@@ -33,8 +43,4 @@ PLATFORMS
33
43
  ruby
34
44
 
35
45
  DEPENDENCIES
36
- capistrano (= 2.5.21)
37
- capistrano-log_with_awesome
38
- capistrano_colors
39
- foreman
40
- grit
46
+ alpha_omega!
data/README.mkd CHANGED
@@ -11,14 +11,16 @@ Getting Started
11
11
  figlet must be installed. Your local machine must let you ssh and run sudo
12
12
  without a password during the deploy.
13
13
 
14
- bin/deploy
15
- bin/deploy
16
- bin/deploy
17
- bin/deploy
18
- bin/rollback
19
- bin/stage
20
- bin/deploy
21
- bin/patch
14
+ Move the example Capfile.
15
+
16
+ mv Capfile.example Capfile
17
+
18
+ Run the deploy script.
19
+
20
+ bundle exec deploy
21
+ bundle exec deploy stage
22
+ bundle exec deploy
23
+ bundle exec deploy rollback
22
24
 
23
25
  LICENSE
24
26
  -------
data/bin/deploy CHANGED
@@ -1,3 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ unless ARGV.length > 0
4
+ ARGV << "deploy"
5
+ end
6
+
3
7
  system(File.expand_path(File.join(File.dirname(__FILE__),"..","libexec",ARGV[0])),*ARGV[1..-1])
@@ -48,10 +48,12 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
48
48
 
49
49
  _cset :version_dir, "releases"
50
50
  _cset :current_dir, "current"
51
+ _cset :service_dir, "service"
51
52
  _cset :releases, %w(alpha omega)
52
53
 
53
54
  _cset(:releases_path) { File.join(deploy_to, version_dir) }
54
55
  _cset(:current_path) { File.join(deploy_to, current_dir) }
56
+ _cset(:service_path) { File.join(deploy_to, service_dir) }
55
57
  _cset(:release_path) { File.join(releases_path, release_name) }
56
58
 
57
59
  _cset(:current_release) { release_path }
@@ -191,6 +193,13 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
191
193
  end
192
194
  end
193
195
 
196
+ task :bootstrap_code, :except => { :no_release => true } do
197
+ dirs = [ releases_path, service_path, "#{deploy_to}/log" ]
198
+ dir_args = dirs.map {|d| d.sub("#{deploy_to}/", "") }.join(' ')
199
+ run "#{try_sudo} install -d -m 0775 -o #{user} -g #{group} #{deploy_to}"
200
+ run "cd #{deploy_to} && install -d -m 0775 #{dir_args}"
201
+ end
202
+
194
203
  desc <<-DESC
195
204
  Copies your project to the remote servers. This is the first stage \
196
205
  of any deployment; moving your updated code and assets to the deployment \
@@ -199,10 +208,7 @@ Capistrano::Configuration.instance(:must_exist).load do |config|
199
208
  task (if you want to perform the `restart' task separately).
200
209
  DESC
201
210
  task :update_code, :except => { :no_release => true } do
202
- dirs = [ releases_path, "#{deploy_to}/log" ]
203
- dir_args = dirs.map {|d| d.sub("#{deploy_to}/", "") }.join(' ')
204
- run "#{try_sudo} install -d -m 0775 -o #{user} -g #{group} #{deploy_to}"
205
- run "cd #{deploy_to} && install -d -m 0775 #{dir_args}"
211
+ bootstrap_code
206
212
  strategy.deploy!
207
213
  end
208
214
 
@@ -1,3 +1,3 @@
1
1
  module AlphaOmega
2
- Version = "0.0.4"
2
+ Version = "0.0.5"
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem
@@ -103,7 +103,7 @@ extra_rdoc_files:
103
103
  - README.mkd
104
104
  files:
105
105
  - .gitignore
106
- - Capfile
106
+ - Capfile.example
107
107
  - Gemfile
108
108
  - Gemfile.lock
109
109
  - LICENSE