railsless-deploy 1.1.0 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 44404d3ba6e97eca9c0ce0a5b9776354fa3cfd5c
4
+ data.tar.gz: 8e55136724a51f0db29a3696cc7d60b84b6b5f90
5
+ SHA512:
6
+ metadata.gz: aa720a4d5b546f91295ad03f2782a8d29f4190262394aea38dfd5cb0191fe66d71f67120f6af80b9a4e9c7715006441b5d587b511a8f42cb0c3150492b136f8a
7
+ data.tar.gz: ad4beba3001a37e439a0241a7ce8d6db1416b56cc42b8d0f6c3ceed936dfe8091ee43bac0f09e1ef8f5688df978ecf24600db589bf80e7742d0d9dbd1c5513c8
@@ -1,5 +1,14 @@
1
1
  # Lee Hambley's Railsless Deploy
2
2
 
3
+ ## 1.1.2 - May 28 2013
4
+
5
+ * Small change not to set latest_release if there are no old releases.
6
+
7
+ ## 1.1.1 - April 23rd 2013
8
+
9
+ * Various changes around linking of shared children, and changes to keep some
10
+ familiarity with the Capistrano main recipe structure.
11
+
3
12
  ## 0.0.15 - July 7th 2009
4
13
 
5
14
  * Removed `require 'yaml'` as we don't use it
@@ -24,4 +33,4 @@
24
33
 
25
34
  ## 0.0.10 - July 6th 2009
26
35
 
27
- * Initial release, GitHub gem enabled.
36
+ * Initial release, GitHub gem enabled.
@@ -28,21 +28,21 @@ You should then be able to proceed as you would usually, you may want to familia
28
28
 
29
29
  If you want to try before you buy, here's the list of tasks included with this version of the deploy recipe:
30
30
 
31
- cap deploy # Deploys your project.
32
- cap deploy:check # Test deployment dependencies.
33
- cap deploy:cleanup # Clean up old releases.
34
- cap deploy:cold # Deploys and starts a `cold' application.
35
- cap deploy:pending # Displays the commits since your last deploy.
36
- cap deploy:pending:diff # Displays the `diff' since your last deploy.
37
- cap deploy:rollback # Rolls back to a previous version and restarts.
38
- cap deploy:rollback:code # Rolls back to the previously deployed version.
39
- cap deploy:setup # Prepares one or more servers for deployment.
40
- cap deploy:symlink # Updates the symlink to the most recently deployed ...
41
- cap deploy:update # Copies your project and updates the symlink.
42
- cap deploy:update_code # Copies your project to the remote servers.
43
- cap deploy:upload # Copy files to the currently deployed version.
44
- cap invoke # Invoke a single command on the remote servers.
45
- cap shell # Begin an interactive Capistrano session.
31
+ cap deploy # Deploys your project.
32
+ cap deploy:check # Test deployment dependencies.
33
+ cap deploy:cleanup # Clean up old releases.
34
+ cap deploy:cold # Deploys and starts a `cold' application.
35
+ cap deploy:pending # Displays the commits since your last deploy.
36
+ cap deploy:pending:diff # Displays the `diff' since your last deploy.
37
+ cap deploy:rollback # Rolls back to a previous version and restarts.
38
+ cap deploy:rollback:code # Rolls back to the previously deployed version.
39
+ cap deploy:setup # Prepares one or more servers for deployment.
40
+ cap deploy:create_symlink # Updates the symlink to the most recently deployed ...
41
+ cap deploy:update # Copies your project and updates the symlink.
42
+ cap deploy:update_code # Copies your project to the remote servers.
43
+ cap deploy:upload # Copy files to the currently deployed version.
44
+ cap invoke # Invoke a single command on the remote servers.
45
+ cap shell # Begin an interactive Capistrano session.
46
46
 
47
47
 
48
48
  ## Bugs & Feedback
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.2
@@ -52,7 +52,7 @@ Capistrano::Configuration.instance(:must_exist).load do
52
52
  _cset(:release_path) { File.join(releases_path, release_name) }
53
53
 
54
54
  _cset(:releases) { capture("ls -xt #{releases_path}").split.reverse }
55
- _cset(:current_release) { File.join(releases_path, releases.last) }
55
+ _cset(:current_release) { releases.any? ? File.join(releases_path, releases.last) : nil }
56
56
  _cset(:previous_release) { releases.length > 1 ? File.join(releases_path, releases[-2]) : nil }
57
57
 
58
58
  _cset(:current_revision) { capture("cat #{current_path}/REVISION").chomp }
@@ -168,7 +168,7 @@ Capistrano::Configuration.instance(:must_exist).load do
168
168
  DESC
169
169
  task :setup, :except => { :no_release => true } do
170
170
  dirs = [deploy_to, releases_path, shared_path]
171
- dirs += shared_children.map { |d| File.join(shared_path, d) }
171
+ dirs += shared_children.map { |d| File.join(shared_path, d.split('/').last) }
172
172
  run "#{try_sudo} mkdir -p #{dirs.join(' ')} && #{try_sudo} chmod g+w #{dirs.join(' ')}"
173
173
  end
174
174
 
@@ -221,7 +221,25 @@ Capistrano::Configuration.instance(:must_exist).load do
221
221
  set to true, which is the default.
222
222
  DESC
223
223
  task :finalize_update, :except => { :no_release => true } do
224
+ # mkdir -p is making sure that the directories are there for some SCM's that don't
225
+ # save empty folders
226
+ shared_children.map do |d|
227
+ if (d.rindex('/')) then
228
+ run "rm -rf #{latest_release}/#{d} && mkdir -p #{latest_release}/#{d.slice(0..(d.rindex('/')))}"
229
+ else
230
+ run "rm -rf #{latest_release}/#{d}"
231
+ end
232
+ run "ln -s #{shared_path}/#{d.split('/').last} #{latest_release}/#{d}"
233
+ end
234
+
224
235
  run "chmod -R g+w #{latest_release}" if fetch(:group_writable, true)
236
+
237
+ shared_children.map do |d|
238
+ run <<-CMD
239
+ rm -rf #{latest_release}/#{d} &&
240
+ ln -s #{shared_path}/#{d.split('/').last} #{latest_release}/#{d}
241
+ CMD
242
+ end
225
243
  end
226
244
 
227
245
  desc <<-DESC
@@ -418,4 +436,4 @@ Capistrano::Configuration.instance(:must_exist).load do
418
436
 
419
437
  end
420
438
 
421
- end # Capistrano::Configuration.instance(:must_exist).load do
439
+ end # Capistrano::Configuration.instance(:must_exist).load do
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsless-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Lee Hambley
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-09-21 00:00:00.000000000 Z
11
+ date: 2013-04-23 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Replacement for the rails deploy strategy which ships with Capistrano,
15
14
  allows you to deploy any platform with ease; some people have had huge success with
@@ -30,25 +29,24 @@ files:
30
29
  - lib/railsless-deploy.rb
31
30
  homepage: http://github.com/leehambley/railsless-deploy/
32
31
  licenses: []
32
+ metadata: {}
33
33
  post_install_message:
34
34
  rdoc_options: []
35
35
  require_paths:
36
36
  - lib
37
37
  required_ruby_version: !ruby/object:Gem::Requirement
38
- none: false
39
38
  requirements:
40
- - - ! '>='
39
+ - - '>='
41
40
  - !ruby/object:Gem::Version
42
41
  version: '0'
43
42
  required_rubygems_version: !ruby/object:Gem::Requirement
44
- none: false
45
43
  requirements:
46
- - - ! '>='
44
+ - - '>='
47
45
  - !ruby/object:Gem::Version
48
46
  version: '0'
49
47
  requirements: []
50
48
  rubyforge_project:
51
- rubygems_version: 1.8.23
49
+ rubygems_version: 2.0.3
52
50
  signing_key:
53
51
  specification_version: 3
54
52
  summary: Replacement for the default Capistrano tasks, designed to make life easier