vlad 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
File without changes
@@ -1,3 +1,18 @@
1
+ === 2.2.0 / 2011-02-18
2
+
3
+ * 5 minor enhancements:
4
+
5
+ * Added support for setting owner and group of deploy. (RichGuk)
6
+ * Allow shared_paths, mkdirs, and symlinks to be excluded (RichGuk/zaius)
7
+ * Cleaned up update task to correspond to rake-remote-task changes. (RichGuk)
8
+ * Do not run symlink commands if there are no operations to run. (jsmecham)
9
+ * Obey the umask across the board. (RichGuk)
10
+
11
+ * 2 bug fixes:
12
+
13
+ * Fixed migrate task shell cmd. (cheba)
14
+ * Fixed passenger touch file location. (richinsr)
15
+
1
16
  === 2.1.0 / 2010-07-15
2
17
 
3
18
  * 1 major enhancement:
@@ -21,7 +21,7 @@ module Vlad
21
21
 
22
22
  ##
23
23
  # This is the version of Vlad you are running.
24
- VERSION = '2.1.0'
24
+ VERSION = '2.2.0'
25
25
 
26
26
  ##
27
27
  # Loads tasks file +tasks_file+ and various recipe styles as a hash
@@ -41,7 +41,16 @@ namespace :vlad do
41
41
  remote_task :setup_app, :roles => :app do
42
42
  dirs = [deploy_to, releases_path, scm_path, shared_path]
43
43
  dirs += shared_paths.keys.map { |d| File.join(shared_path, d) }
44
- run "umask #{umask} && mkdir -p #{dirs.join(' ')}"
44
+ dirs = dirs.join(' ')
45
+
46
+ commands = [
47
+ "umask #{umask}",
48
+ "mkdir -p #{dirs}"
49
+ ]
50
+ commands << "chown #{perm_owner} #{dirs}" if perm_owner
51
+ commands << "chgrp #{perm_group} #{dirs}" if perm_group
52
+
53
+ run commands.join(' && ')
45
54
  end
46
55
 
47
56
  desc "Updates your application server to the latest revision. Syncs
@@ -52,19 +61,40 @@ namespace :vlad do
52
61
  remote_task :update, :roles => :app do
53
62
  symlink = false
54
63
  begin
55
- run [ "cd #{scm_path}",
56
- "#{source.checkout revision, scm_path}",
57
- "#{source.export revision, release_path}",
58
- "chmod -R g+w #{latest_release}",
59
- "rm -rf #{shared_paths.values.map { |p| File.join(latest_release, p) }.join(' ')}",
60
- "mkdir -p #{mkdirs.map { |d| File.join(latest_release, d) }.join(' ')}"
61
- ].join(" && ")
64
+ commands = [
65
+ "umask #{umask}",
66
+ "cd #{scm_path}",
67
+ "#{source.checkout revision, scm_path}",
68
+ "#{source.export revision, release_path}",
69
+ "chmod -R g+w #{latest_release}",
70
+ ]
71
+ unless shared_paths.empty?
72
+ commands << "rm -rf #{shared_paths.values.map { |p| File.join(latest_release, p) }.join(' ')}"
73
+ end
74
+ unless mkdirs.empty?
75
+ dirs = mkdirs.map { |d| File.join(latest_release, d) }.join(' ')
76
+ commands << "mkdir -p #{dirs}"
77
+ commands << "chown -R #{perm_owner} #{dirs}" if perm_owner
78
+ commands << "chgrp -R #{perm_group} #{dirs}" if perm_group
79
+ end
80
+
81
+ commands << "chown -R #{perm_owner} #{latest_release}" if perm_owner
82
+ commands << "chgrp -R #{perm_group} #{latest_release}" if perm_group
83
+
84
+ run commands.join(" && ")
62
85
  Rake::Task['vlad:update_symlinks'].invoke
63
86
 
64
87
  symlink = true
65
- run "rm -f #{current_path} && ln -s #{latest_release} #{current_path}"
66
-
67
- run "echo #{now} $USER #{revision} #{File.basename release_path} >> #{deploy_to}/revisions.log"
88
+ commands = [
89
+ "umask #{umask}",
90
+ "rm -f #{current_path}",
91
+ "ln -s #{latest_release} #{current_path}",
92
+ "echo #{now} $USER #{revision} #{File.basename(release_path)} >> #{deploy_to}/revisions.log"
93
+ ]
94
+ commands << "chown #{perm_owner} #{deploy_to}/revisions.log" if perm_owner
95
+ commands << "chgrp #{perm_group} #{deploy_to}/revisions.log" if perm_group
96
+
97
+ run commands.join(' && ')
68
98
  rescue => e
69
99
  run "rm -f #{current_path} && ln -s #{previous_release} #{current_path}" if
70
100
  symlink
@@ -76,10 +106,12 @@ namespace :vlad do
76
106
  desc "Updates the symlinks for shared paths".cleanup
77
107
 
78
108
  remote_task :update_symlinks, :roles => :app do
79
- ops = shared_paths.map do |sp, rp|
80
- "ln -s #{shared_path}/#{sp} #{latest_release}/#{rp}"
109
+ unless shared_paths.empty?
110
+ ops = shared_paths.map do |sp, rp|
111
+ "ln -s #{shared_path}/#{sp} #{latest_release}/#{rp}"
112
+ end
113
+ run ops.join(' && ') unless ops.empty?
81
114
  end
82
- run ops.join(' && ')
83
115
  end
84
116
 
85
117
  desc "Invoke a single command on every remote server. This is useful for
@@ -3,6 +3,6 @@ require 'vlad'
3
3
  namespace :vlad do
4
4
  desc 'Restart Passenger'
5
5
  remote_task :start_app, :roles => :app do
6
- run "touch #{latest_release}/tmp/restart.txt"
6
+ run "touch #{current_release}/tmp/restart.txt"
7
7
  end
8
8
  end
@@ -29,6 +29,6 @@ namespace :vlad do
29
29
 
30
30
  run ["cd #{directory}",
31
31
  "#{rake_cmd} RAILS_ENV=#{rails_env} db:migrate #{migrate_args}"
32
- ].join(" ")
32
+ ].join(" && ")
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vlad
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 2.1.0
10
+ version: 2.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Davis
@@ -38,7 +38,7 @@ cert_chain:
38
38
  FBHgymkyj/AOSqKRIpXPhjC6
39
39
  -----END CERTIFICATE-----
40
40
 
41
- date: 2010-07-15 00:00:00 -07:00
41
+ date: 2011-02-18 00:00:00 -08:00
42
42
  default_executable:
43
43
  dependencies:
44
44
  - !ruby/object:Gem::Dependency
@@ -89,53 +89,37 @@ dependencies:
89
89
  type: :runtime
90
90
  version_requirements: *id003
91
91
  - !ruby/object:Gem::Dependency
92
- name: rubyforge
92
+ name: minitest
93
93
  prerelease: false
94
94
  requirement: &id004 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- hash: 7
99
+ hash: 11
100
100
  segments:
101
101
  - 2
102
102
  - 0
103
- - 4
104
- version: 2.0.4
103
+ - 2
104
+ version: 2.0.2
105
105
  type: :development
106
106
  version_requirements: *id004
107
- - !ruby/object:Gem::Dependency
108
- name: minitest
109
- prerelease: false
110
- requirement: &id005 !ruby/object:Gem::Requirement
111
- none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- hash: 11
116
- segments:
117
- - 1
118
- - 7
119
- - 0
120
- version: 1.7.0
121
- type: :development
122
- version_requirements: *id005
123
107
  - !ruby/object:Gem::Dependency
124
108
  name: hoe
125
109
  prerelease: false
126
- requirement: &id006 !ruby/object:Gem::Requirement
110
+ requirement: &id005 !ruby/object:Gem::Requirement
127
111
  none: false
128
112
  requirements:
129
113
  - - ">="
130
114
  - !ruby/object:Gem::Version
131
- hash: 21
115
+ hash: 41
132
116
  segments:
133
117
  - 2
134
- - 6
118
+ - 9
135
119
  - 1
136
- version: 2.6.1
120
+ version: 2.9.1
137
121
  type: :development
138
- version_requirements: *id006
122
+ version_requirements: *id005
139
123
  description: |-
140
124
  Vlad the Deployer is pragmatic application deployment automation,
141
125
  without mercy. Much like Capistrano, but with 1/10th the
@@ -187,6 +171,7 @@ files:
187
171
  - test/test_vlad.rb
188
172
  - test/test_vlad_subversion.rb
189
173
  - vladdemo.sh
174
+ - .gemtest
190
175
  has_rdoc: true
191
176
  homepage: http://rubyhitsquad.com/
192
177
  licenses: []
@@ -218,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
203
  requirements: []
219
204
 
220
205
  rubyforge_project: hitsquad
221
- rubygems_version: 1.3.7
206
+ rubygems_version: 1.4.2
222
207
  signing_key:
223
208
  specification_version: 3
224
209
  summary: Vlad the Deployer is pragmatic application deployment automation, without mercy
metadata.gz.sig CHANGED
Binary file