public
Fork of jamis/capistrano
Description: Remote multi-server automation tool
Homepage: http://www.capify.org
Clone URL: git://github.com/rmm5t/capistrano.git
Search Repo:
Use Echoe for rakefile management.

This brings Capistrano into line with Net::SSH and it's sister
libraries. It also makes Capistrano::Version inherit from
Net::SSH::Version for more consistent Version behavior across
the libraries.
jamis (author)
Fri Jun 27 10:14:48 -0700 2008
commit  0d43efdbc1bc1eab84051f78b9a988c93189cbb6
tree    371113df73a9f5c4de88b342bdf2c51fa5a2123b
parent  babc48a04c799d21145f843080c57b91119fbae9
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
 
 
 
25
26
27
28
29
30
31
 
 
 
32
33
34
 
 
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
 
51
52
53
54
55
56
 
 
 
 
57
58
59
60
61
62
 
 
 
63
...
 
 
 
 
 
 
 
1
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
6
7
8
 
 
 
 
 
9
10
11
12
13
 
14
15
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
18
19
 
 
 
 
 
20
21
22
23
24
 
 
 
 
 
25
26
27
28
0
@@ -1,63 +1,28 @@
0
-require 'rake'
0
-require 'rake/testtask'
0
-require 'rake/rdoctask'
0
-require 'rake/packagetask'
0
-require 'rake/gempackagetask'
0
-require 'rake/contrib/rubyforgepublisher'
0
-
0
 require "./lib/capistrano/version"
0
 
0
-PKG_NAME = "capistrano"
0
-PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
0
-PKG_VERSION = Capistrano::Version::STRING + PKG_BUILD
0
-PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
0
-
0
-desc "Default task"
0
-task :default => [ :test ]
0
-
0
-desc "Build documentation"
0
-task :doc => [ :rdoc ]
0
-
0
-Rake::TestTask.new do |t|
0
- t.libs << "test"
0
- t.test_files = Dir["test/**/*_test.rb"]
0
- t.verbose = true
0
+begin
0
+ require 'echoe'
0
+rescue LoadError
0
+ abort "You'll need to have `echoe' installed to use Capistrano's Rakefile"
0
 end
0
 
0
-desc "Run code-coverage analysis using rcov"
0
-task :coverage do
0
- rm_rf "coverage"
0
- files = Dir["test/**/*_test.rb"]
0
- system "rcov --sort coverage -Ilib:test #{files.join(' ')}"
0
+version = Capistrano::Version::STRING.dup
0
+if ENV['SNAPSHOT'].to_i == 1
0
+ version << "." << Time.now.utc.strftime("%Y%m%d%H%M%S")
0
 end
0
 
0
-GEM_SPEC = eval(File.read("#{File.dirname(__FILE__)}/#{PKG_NAME}.gemspec"))
0
+Echoe.new('capistrano', version) do |p|
0
+ p.changelog = "CHANGELOG.rdoc"
0
 
0
-Rake::GemPackageTask.new(GEM_SPEC) do |p|
0
- p.gem_spec = GEM_SPEC
0
- p.need_tar = true
0
- p.need_zip = true
0
-end
0
-
0
-desc "Build the RDoc API documentation"
0
-Rake::RDocTask.new do |rdoc|
0
- rdoc.rdoc_dir = "doc"
0
- rdoc.title = "Capistrano -- A framework for remote command execution"
0
- rdoc.options += %w(--line-numbers --inline-source --main README)
0
- rdoc.rdoc_files.include 'README'
0
- rdoc.rdoc_files.include 'lib/**/*.rb'
0
- rdoc.template = "jamis"
0
-end
0
+ p.author = "Jamis Buck"
0
+ p.email = "jamis@jamisbuck.org"
0
 
0
-desc "Publish the beta gem"
0
-task :pgem => [:package] do
0
- Rake::SshFilePublisher.new("wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
0
- `ssh wrath.rubyonrails.org './gemupdate.sh'`
0
-end
0
+ p.summary = <<-DESC.strip.gsub(/\n\s+/, " ")
0
+ Capistrano is a utility and framework for executing commands in parallel
0
+ on multiple remote machines, via SSH.
0
+ DESC
0
 
0
-desc "Clean up generated directories and files"
0
-task :clean do
0
- rm_rf "pkg"
0
- rm_rf "doc"
0
- rm_rf "coverage"
0
+ p.url = "http://www.capify.org"
0
+ p.need_zip = true
0
+ p.rdoc_pattern = /^(lib|README.rdoc|CHANGELOG.rdoc)/
0
 end
...
 
 
1
2
 
 
 
3
4
5
6
7
 
 
 
 
 
8
 
9
...
1
2
3
 
4
5
6
7
8
9
10
 
11
12
13
14
15
16
17
18
0
@@ -1,9 +1,18 @@
0
+require 'net/ssh/version'
0
+
0
 module Capistrano
0
- module Version #:nodoc:
0
+
0
+ # Describes the current version of Capistrano.
0
+ class Version < Net::SSH::Version
0
     MAJOR = 2
0
     MINOR = 4
0
     TINY = 0
0
 
0
- STRING = [MAJOR, MINOR, TINY].join(".")
0
+ # The current version, as a Version instance
0
+ CURRENT = new(MAJOR, MINOR, TINY)
0
+
0
+ # The current version, as a String instance
0
+ STRING = CURRENT.to_s
0
   end
0
+
0
 end

Comments

    No one has commented yet.