capistrano-ext 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,43 @@
1
+ unless Capistrano::Configuration.respond_to?(:instance)
2
+ abort "capistrano/ext/multistage requires Capistrano 2"
3
+ end
4
+
5
+ Capistrano::Configuration.instance.load do
6
+ stages = fetch(:stages, %w(staging production))
7
+ location = fetch(:stage_dir, "config/deploy")
8
+
9
+ stages.each do |name|
10
+ desc "Set the target stage to `#{name}'."
11
+ task(name) do
12
+ set :stage, name.to_sym
13
+ load "#{location}/#{stage}"
14
+ end
15
+ end
16
+
17
+ namespace :multistage do
18
+ desc "[internal] Ensure that a stage has been selected."
19
+ task :ensure do
20
+ if !exists?(:stage)
21
+ if exists?(:default_stage)
22
+ logger.important "Defaulting to `#{default_stage}'"
23
+ find_and_execute_task(default_stage)
24
+ else
25
+ abort "No stage specified. Please specify one of: #{stages.join(', ')} (e.g. `cap #{stages.first} #{ARGV.last}')"
26
+ end
27
+ end
28
+ end
29
+
30
+ desc "Stub out the staging config files."
31
+ task :prepare do
32
+ FileUtils.mkdir_p(location)
33
+ stages.each do |name|
34
+ File.open("#{location}/#{name}.rb", "w") do |f|
35
+ f.puts "# #{name.upcase}-specific deployment configuration"
36
+ f.puts "# please put general deployment config in config/deploy.rb"
37
+ end
38
+ end
39
+ end
40
+ end
41
+
42
+ on :start, "multistage:ensure", :except => stages
43
+ end
@@ -2,8 +2,8 @@ module Capistrano
2
2
  module Ext
3
3
  module Version #:nodoc:
4
4
  MAJOR = 1
5
- MINOR = 1
6
- TINY = 1
5
+ MINOR = 2
6
+ TINY = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join(".")
9
9
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.3
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: capistrano-ext
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.1
7
- date: 2007-05-12 00:00:00 -06:00
6
+ version: 1.2.0
7
+ date: 2007-07-06 00:00:00 -06:00
8
8
  summary: Capistrano Extensions is a set of useful task libraries and methods that other developers may reference in their own recipe files.
9
9
  require_paths:
10
10
  - lib
11
11
  email: jamis@37signals.com
12
- homepage: http://www.rubyonrails.com
12
+ homepage: http://www.capify.com
13
13
  rubyforge_project:
14
14
  description:
15
15
  autorequire:
@@ -34,6 +34,7 @@ files:
34
34
  - lib/capistrano/ext/assets
35
35
  - lib/capistrano/ext/assets/request-counter.rb
36
36
  - lib/capistrano/ext/monitor.rb
37
+ - lib/capistrano/ext/multistage.rb
37
38
  - lib/capistrano/ext/version.rb
38
39
  test_files: []
39
40