capistrano 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,44 @@
1
+ ## 2.8.0 / August 3 2011
2
+
3
+ A short release, after the last. Announcing Rails 3.1 asset pipeline support.
4
+
5
+ The asset pipeline support requires an additiona `load` in your `Capfile`.
6
+
7
+ You can see information pertaining to the pull request, including the inline
8
+ comments here: https://github.com/capistrano/capistrano/pull/35
9
+
10
+ Documentation will be available soon in the wiki.
11
+
12
+ * Drop-In Rails 3.1 asset pipeline support. (Chris Griego)
13
+
14
+ ## 2.7.0 / August 3 2011
15
+
16
+ A fairly substantial release. There are fixes so that current_release works
17
+ during dry-runs, (although, apparently still not with bundler.)
18
+
19
+ The test-suite was also modified to work with Ruby 1.9.2, except in one case
20
+ where Ruby 1.9.x calls `to_ary` and `to_a` on mocks, which still makes an
21
+ error. 1.9.x has always been supported, but due to lack of maintenance on my
22
+ part the tests didn't ever pass.
23
+
24
+ The `start`, `stop` and `restart` tasks have been reduced to mere hooks into
25
+ which extensions can define their own functionality.
26
+
27
+ The `readme` was also slightly improved, simply tweaks to express how best to
28
+ run the test suite.
29
+
30
+ * Ensure dry-run works with `:current_release` variable (Carol Nichols)
31
+ * Added a new variable `:git_submodules_recursive`, setting the value to false
32
+ will ensure Git doesn't recursively initialize and checkout submodules. (Konstantin Kudryashov)
33
+ * Added an additional task option, `:on_no_matching_servers`, setting the
34
+ value to `:continue` will ensure tasks with no matched servers continue
35
+ without error, instead of raising `Capistrano::NoMatchingServersError` as was
36
+ the previous behaviour. (Chris Griego)
37
+
38
+ A huge thanks to all contributors, as always!
39
+
40
+ Remember: @capistranorb on twitter for news.
41
+
1
42
  ## 2.6.1 / June 25 2011
2
43
 
3
44
  A short maintenance release, Some fixes to the verbose flag inside the Git SCM
data/bin/capify CHANGED
@@ -38,6 +38,10 @@ end
38
38
  files = {
39
39
  "Capfile" => unindent(<<-FILE),
40
40
  load 'deploy' if respond_to?(:namespace) # cap2 differentiator
41
+
42
+ # Uncomment if you are using Rails' asset pipeline
43
+ # load 'deploy/assets'
44
+
41
45
  Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
42
46
 
43
47
  load 'config/deploy' # remove this line to skip loading any of the default tasks
@@ -28,7 +28,9 @@ _cset :deploy_via, :checkout
28
28
  _cset(:deploy_to) { "/u/apps/#{application}" }
29
29
  _cset(:revision) { source.head }
30
30
 
31
- # Maintenance base filename
31
+ _cset :rails_env, "production"
32
+ _cset :rake, "rake"
33
+
32
34
  _cset :maintenance_basename, "maintenance"
33
35
 
34
36
  # =========================================================================
@@ -373,8 +375,6 @@ namespace :deploy do
373
375
  set :migrate_target, :latest
374
376
  DESC
375
377
  task :migrate, :roles => :db, :only => { :primary => true } do
376
- rake = fetch(:rake, "rake")
377
- rails_env = fetch(:rails_env, "production")
378
378
  migrate_env = fetch(:migrate_env, "")
379
379
  migrate_target = fetch(:migrate_target, :latest)
380
380
 
@@ -384,7 +384,7 @@ namespace :deploy do
384
384
  else raise ArgumentError, "unknown migration target #{migrate_target.inspect}"
385
385
  end
386
386
 
387
- run "cd #{directory}; #{rake} RAILS_ENV=#{rails_env} #{migrate_env} db:migrate"
387
+ run "cd #{directory} && #{rake} RAILS_ENV=#{rails_env} #{migrate_env} db:migrate"
388
388
  end
389
389
 
390
390
  desc <<-DESC
@@ -0,0 +1,57 @@
1
+ load 'deploy' unless defined?(_cset)
2
+
3
+ _cset :asset_env, "RAILS_GROUPS=assets"
4
+ _cset :assets_prefix, "assets"
5
+
6
+ before 'deploy:finalize_update', 'deploy:assets:symlink'
7
+ after 'deploy:update_code', 'deploy:assets:precompile'
8
+
9
+ namespace :deploy do
10
+ namespace :assets do
11
+ desc <<-DESC
12
+ [internal] This task will set up a symlink to the shared directory \
13
+ for the assets directory. Assets are shared across deploys to avoid \
14
+ mid-deploy mismatches between old application html asking for assets \
15
+ and getting a 404 file not found error. The assets cache is shared \
16
+ for efficiency. If you cutomize the assets path prefix, override the \
17
+ :assets_prefix variable to match.
18
+ DESC
19
+ task :symlink, :roles => :web, :except => { :no_release => true } do
20
+ run <<-CMD
21
+ rm -rf #{latest_release}/public/#{assets_prefix} &&
22
+ mkdir -p #{latest_release}/public &&
23
+ mkdir -p #{shared_path}/assets &&
24
+ ln -s #{shared_path}/assets #{latest_release}/public/#{assets_prefix}
25
+ CMD
26
+ end
27
+
28
+ desc <<-DESC
29
+ Run the asset precompilation rake task. You can specify the full path \
30
+ to the rake executable by setting the rake variable. You can also \
31
+ specify additional environment variables to pass to rake via the \
32
+ asset_env variable. The defaults are:
33
+
34
+ set :rake, "rake"
35
+ set :rails_env, "production"
36
+ set :asset_env, "RAILS_GROUPS=assets"
37
+ DESC
38
+ task :precompile, :roles => :web, :except => { :no_release => true } do
39
+ run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:precompile"
40
+ end
41
+
42
+ desc <<-DESC
43
+ Run the asset clean rake task. Use with caution, this will delete \
44
+ all of your compiled assets. You can specify the full path \
45
+ to the rake executable by setting the rake variable. You can also \
46
+ specify additional environment variables to pass to rake via the \
47
+ asset_env variable. The defaults are:
48
+
49
+ set :rake, "rake"
50
+ set :rails_env, "production"
51
+ set :asset_env, "RAILS_GROUPS=assets"
52
+ DESC
53
+ task :clean, :roles => :web, :except => { :no_release => true } do
54
+ run "cd #{latest_release} && #{rake} RAILS_ENV=#{rails_env} #{asset_env} assets:clean"
55
+ end
56
+ end
57
+ end
@@ -4,7 +4,7 @@ module Capistrano
4
4
  class Version
5
5
 
6
6
  MAJOR = 2
7
- MINOR = 7
7
+ MINOR = 8
8
8
  PATCH = 0
9
9
 
10
10
  def self.to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -15,7 +15,7 @@ default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: highline
18
- requirement: &2157549420 !ruby/object:Gem::Requirement
18
+ requirement: &2165629280 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2157549420
26
+ version_requirements: *2165629280
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: net-ssh
29
- requirement: &2157642760 !ruby/object:Gem::Requirement
29
+ requirement: &2165744820 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 2.0.14
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2157642760
37
+ version_requirements: *2165744820
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: net-sftp
40
- requirement: &2157664760 !ruby/object:Gem::Requirement
40
+ requirement: &2165744300 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 2.0.0
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2157664760
48
+ version_requirements: *2165744300
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: net-scp
51
- requirement: &2157664160 !ruby/object:Gem::Requirement
51
+ requirement: &2165743700 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 1.0.0
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *2157664160
59
+ version_requirements: *2165743700
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: net-ssh-gateway
62
- requirement: &2157663580 !ruby/object:Gem::Requirement
62
+ requirement: &2165743120 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.1.0
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *2157663580
70
+ version_requirements: *2165743120
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: mocha
73
- requirement: &2157663000 !ruby/object:Gem::Requirement
73
+ requirement: &2165742540 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ! '>='
@@ -78,7 +78,7 @@ dependencies:
78
78
  version: '0'
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2157663000
81
+ version_requirements: *2165742540
82
82
  description: Capistrano is a utility and framework for executing commands in parallel
83
83
  on multiple remote machines, via SSH.
84
84
  email:
@@ -128,6 +128,7 @@ files:
128
128
  - lib/capistrano/processable.rb
129
129
  - lib/capistrano/recipes/compat.rb
130
130
  - lib/capistrano/recipes/deploy.rb
131
+ - lib/capistrano/recipes/deploy/assets.rb
131
132
  - lib/capistrano/recipes/deploy/dependencies.rb
132
133
  - lib/capistrano/recipes/deploy/local_dependency.rb
133
134
  - lib/capistrano/recipes/deploy/remote_dependency.rb