capistrano 2.5.20 → 2.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ coverage
2
+ doc
3
+ pkg
4
+ *.swp
5
+ *.patch
6
+ *.gem
7
+ *.sh
8
+ .DS_Store
9
+ .bundle/*
10
+ Gemfile.lock
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use 1.8.7
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ ## 2.5.21 / April 6 2011
2
+
3
+ * Fixed to follow best-practice guidelines from Bundler (Ben Langfeld)
4
+ * No longer force a gemset for Capistrano development. (Ben Langfeld)
5
+
1
6
  ## 2.5.20 / March 16 2011
2
7
 
3
8
  * `deploy:migrations` will now always operate on the latest_release, not
data/Gemfile CHANGED
@@ -1,17 +1,4 @@
1
- #
2
- # This is the gemfile for local development
3
- # these are the requirements for running
4
- # the test suite.
5
- #
1
+ source "http://rubygems.org"
6
2
 
7
- source :gemcutter
8
-
9
- gem 'net-ssh'
10
- gem 'net-ssh-gateway'
11
- gem 'net-sftp'
12
- gem 'net-scp'
13
- gem 'highline'
14
-
15
- group :test do
16
- gem "mocha"
17
- end
3
+ # Specify your gem's dependencies in capistrano.gemspec
4
+ gemspec
data/Rakefile CHANGED
@@ -1,3 +1,6 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
1
4
  require 'rake/testtask'
2
5
  Rake::TestTask.new(:test) do |test|
3
6
  test.libs << 'lib' << 'test'
@@ -6,25 +9,3 @@ Rake::TestTask.new(:test) do |test|
6
9
  end
7
10
 
8
11
  task :default => :test
9
-
10
- begin
11
- require 'jeweler'
12
- Jeweler::Tasks.new do |gem|
13
- gem.version
14
- gem.name = "capistrano"
15
- gem.executables = %W(capify cap)
16
- gem.summary = %Q{Capistrano - Welcome to easy deployment with Ruby over SSH}
17
- gem.description = %Q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.}
18
- gem.homepage = "http://github.com/capistrano/capistrano"
19
- gem.email = [ "jamis@jamisbuck.org", "lee.hambley@gmail.com" ]
20
- gem.authors = [ "Jamis Buck", "Lee Hambley" ]
21
- gem.add_dependency "net-ssh", ">=2.0.14"
22
- gem.add_dependency "net-sftp", ">=2.0.0"
23
- gem.add_dependency "net-scp", ">=1.0.0"
24
- gem.add_dependency "net-ssh-gateway", ">=1.0.0"
25
- gem.add_dependency "highline"
26
- gem.add_development_dependency "mocha", ">= 0"
27
- end
28
- rescue LoadError
29
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
30
- end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.20
1
+ 2.5.21
@@ -0,0 +1,49 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "capistrano/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "capistrano"
7
+ s.version = Capistrano::Version.to_s
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Jamis Buck", "Lee Hambley"]
10
+ s.email = ["jamis@jamisbuck.org", "lee.hambley@gmail.com"]
11
+ s.homepage = "http://github.com/capistrano/capistrano"
12
+ s.summary = %q{Capistrano - Welcome to easy deployment with Ruby over SSH}
13
+ s.description = %q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.}
14
+ s.date = %q{2011-03-22}
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+ s.extra_rdoc_files = [
21
+ "README.mdown"
22
+ ]
23
+
24
+ if s.respond_to? :specification_version then
25
+ s.specification_version = 3
26
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
27
+ s.add_runtime_dependency(%q<highline>, [">= 0"])
28
+ s.add_runtime_dependency(%q<net-ssh>, [">= 2.0.14"])
29
+ s.add_runtime_dependency(%q<net-sftp>, [">= 2.0.0"])
30
+ s.add_runtime_dependency(%q<net-scp>, [">= 1.0.0"])
31
+ s.add_runtime_dependency(%q<net-ssh-gateway>, [">= 1.0.0"])
32
+ s.add_development_dependency(%q<mocha>, [">= 0"])
33
+ else
34
+ s.add_dependency(%q<net-ssh>, [">= 2.0.14"])
35
+ s.add_dependency(%q<net-sftp>, [">= 2.0.0"])
36
+ s.add_dependency(%q<net-scp>, [">= 1.0.0"])
37
+ s.add_dependency(%q<net-ssh-gateway>, [">= 1.0.0"])
38
+ s.add_dependency(%q<highline>, [">= 0"])
39
+ s.add_dependency(%q<mocha>, [">= 0"])
40
+ end
41
+ else
42
+ s.add_dependency(%q<net-ssh>, [">= 2.0.14"])
43
+ s.add_dependency(%q<net-sftp>, [">= 2.0.0"])
44
+ s.add_dependency(%q<net-scp>, [">= 1.0.0"])
45
+ s.add_dependency(%q<net-ssh-gateway>, [">= 1.0.0"])
46
+ s.add_dependency(%q<highline>, [">= 0"])
47
+ s.add_dependency(%q<mocha>, [">= 0"])
48
+ end
49
+ end
@@ -112,7 +112,7 @@ module Capistrano
112
112
  private :protect
113
113
 
114
114
  def respond_to_with_variables?(sym, include_priv=false) #:nodoc:
115
- @variables.has_key?(sym) || respond_to_without_variables?(sym, include_priv)
115
+ @variables.has_key?(sym.to_sym) || respond_to_without_variables?(sym, include_priv)
116
116
  end
117
117
 
118
118
  def method_missing_with_variables(sym, *args, &block) #:nodoc:
@@ -124,4 +124,4 @@ module Capistrano
124
124
  end
125
125
  end
126
126
  end
127
- end
127
+ end
@@ -140,11 +140,7 @@ module Capistrano
140
140
  end
141
141
 
142
142
  execute = []
143
- if args.empty?
144
- execute << "#{git} clone #{verbose} #{variable(:repository)} #{destination}"
145
- else
146
- execute << "#{git} clone #{verbose} #{args.join(' ')} #{variable(:repository)} #{destination}"
147
- end
143
+ execute << "#{git} clone #{verbose} #{args.join(' ')} #{variable(:repository)} #{destination}"
148
144
 
149
145
  # checkout into a local branch rather than a detached HEAD
150
146
  execute << "cd #{destination} && #{git} checkout #{verbose} -b deploy #{revision}"
@@ -69,6 +69,8 @@ module Capistrano
69
69
  # Once we've loaded the config, we don't need Net::SSH to do it again.
70
70
  ssh_options[:config] = false
71
71
 
72
+ ssh_options[:verbose] = :debug if options[:verbose] && options[:verbose] > 0
73
+
72
74
  user = server.user || options[:user] || ssh_options[:username] ||
73
75
  ssh_options[:user] || ServerDefinition.default_user
74
76
  port = server.port || options[:port] || ssh_options[:port]
@@ -0,0 +1 @@
1
+ rvm use 1.8.7@capistrano-devel --create
@@ -54,6 +54,12 @@ class ConfigurationVariablesTest < Test::Unit::TestCase
54
54
  assert @config.respond_to?(:sample)
55
55
  end
56
56
 
57
+ def test_respond_to_should_be_true_when_passed_a_string
58
+ assert !@config.respond_to?('sample')
59
+ @config[:sample] = :value
60
+ assert @config.respond_to?('sample')
61
+ end
62
+
57
63
  def test_respond_to_with_include_priv_paramter
58
64
  assert !@config.respond_to?(:sample, true)
59
65
  end
@@ -31,16 +31,16 @@ class DeploySCMGitTest < Test::Unit::TestCase
31
31
  @config[:repository] = "git@somehost.com:project.git"
32
32
  dest = "/var/www"
33
33
  rev = 'c2d9e79'
34
- assert_equal "git clone -q git@somehost.com:project.git /var/www && cd /var/www && git checkout -q -b deploy #{rev}", @source.checkout(rev, dest)
34
+ assert_equal "git clone -q git@somehost.com:project.git /var/www && cd /var/www && git checkout -q -b deploy #{rev}", @source.checkout(rev, dest)
35
35
 
36
36
  # With :scm_command
37
37
  git = "/opt/local/bin/git"
38
38
  @config[:scm_command] = git
39
- assert_equal "#{git} clone -q git@somehost.com:project.git /var/www && cd /var/www && #{git} checkout -q -b deploy #{rev}", @source.checkout(rev, dest)
39
+ assert_equal "#{git} clone -q git@somehost.com:project.git /var/www && cd /var/www && #{git} checkout -q -b deploy #{rev}", @source.checkout(rev, dest).gsub(/\s+/, ' ')
40
40
 
41
41
  # with submodules
42
42
  @config[:git_enable_submodules] = true
43
- assert_equal "#{git} clone -q git@somehost.com:project.git /var/www && cd /var/www && #{git} checkout -q -b deploy #{rev} && #{git} submodule -q init && #{git} submodule -q sync && #{git} submodule -q update --recursive", @source.checkout(rev, dest)
43
+ assert_equal "#{git} clone -q git@somehost.com:project.git /var/www && cd /var/www && #{git} checkout -q -b deploy #{rev} && #{git} submodule -q init && #{git} submodule -q sync && #{git} submodule -q update --recursive", @source.checkout(rev, dest).gsub(/\s+/, ' ')
44
44
  end
45
45
 
46
46
  def test_checkout_with_verbose_should_not_use_q_switch
@@ -48,7 +48,7 @@ class DeploySCMGitTest < Test::Unit::TestCase
48
48
  @config[:scm_verbose] = true
49
49
  dest = "/var/www"
50
50
  rev = 'c2d9e79'
51
- assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy #{rev}", @source.checkout(rev, dest)
51
+ assert_equal "git clone git@somehost.com:project.git /var/www && cd /var/www && git checkout -b deploy #{rev}", @source.checkout(rev, dest)
52
52
  end
53
53
 
54
54
  def test_diff
@@ -82,6 +82,15 @@ class SSHTest < Test::Unit::TestCase
82
82
  assert_equal success, Capistrano::SSH.connect(@server, :ssh_options => ssh_options, :user => "jamis", :port => 1235)
83
83
  end
84
84
 
85
+ def test_connect_with_verbose_option_should_set_verbose_option_on_ssh
86
+ Net::SSH.expects(:start).with(@server.host, "default-user", @options).returns(success = Object.new)
87
+ assert_equal success, Capistrano::SSH.connect(@server, :verbose => 0)
88
+ Net::SSH.expects(:start).with(@server.host, "default-user", @options.merge(:verbose => :debug)).returns(success = Object.new)
89
+ assert_equal success, Capistrano::SSH.connect(@server, :verbose => 1)
90
+ Net::SSH.expects(:start).with(@server.host, "default-user", @options.merge(:verbose => :debug)).returns(success = Object.new)
91
+ assert_equal success, Capistrano::SSH.connect(@server, :verbose => 2)
92
+ end
93
+
85
94
  def test_connect_with_ssh_options_should_see_server_options_override_ssh_options
86
95
  ssh_options = { :username => "JamisMan", :port => 8125, :forward_agent => true }
87
96
  server = server("jamis@capistrano:1235")
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
5
- prerelease: false
4
+ hash: 49
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 5
9
- - 20
10
- version: 2.5.20
9
+ - 21
10
+ version: 2.5.21
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jamis Buck
@@ -16,41 +16,13 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-03-16 00:00:00 +01:00
19
+ date: 2011-03-22 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
- type: :runtime
24
- prerelease: false
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
34
- name: net-ssh
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- name: net-ssh-gateway
49
- requirement: *id002
50
- - !ruby/object:Gem::Dependency
51
- type: :runtime
23
+ name: highline
52
24
  prerelease: false
53
- version_requirements: &id003 !ruby/object:Gem::Requirement
25
+ requirement: &id001 !ruby/object:Gem::Requirement
54
26
  none: false
55
27
  requirements:
56
28
  - - ">="
@@ -59,40 +31,12 @@ dependencies:
59
31
  segments:
60
32
  - 0
61
33
  version: "0"
62
- name: net-sftp
63
- requirement: *id003
64
- - !ruby/object:Gem::Dependency
65
34
  type: :runtime
66
- prerelease: false
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
70
- - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
76
- name: net-scp
77
- requirement: *id004
35
+ version_requirements: *id001
78
36
  - !ruby/object:Gem::Dependency
79
- type: :runtime
80
- prerelease: false
81
- version_requirements: &id005 !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
90
- name: highline
91
- requirement: *id005
92
- - !ruby/object:Gem::Dependency
93
- type: :runtime
37
+ name: net-ssh
94
38
  prerelease: false
95
- version_requirements: &id006 !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
96
40
  none: false
97
41
  requirements:
98
42
  - - ">="
@@ -103,12 +47,12 @@ dependencies:
103
47
  - 0
104
48
  - 14
105
49
  version: 2.0.14
106
- name: net-ssh
107
- requirement: *id006
108
- - !ruby/object:Gem::Dependency
109
50
  type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: net-sftp
110
54
  prerelease: false
111
- version_requirements: &id007 !ruby/object:Gem::Requirement
55
+ requirement: &id003 !ruby/object:Gem::Requirement
112
56
  none: false
113
57
  requirements:
114
58
  - - ">="
@@ -119,12 +63,12 @@ dependencies:
119
63
  - 0
120
64
  - 0
121
65
  version: 2.0.0
122
- name: net-sftp
123
- requirement: *id007
124
- - !ruby/object:Gem::Dependency
125
66
  type: :runtime
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: net-scp
126
70
  prerelease: false
127
- version_requirements: &id008 !ruby/object:Gem::Requirement
71
+ requirement: &id004 !ruby/object:Gem::Requirement
128
72
  none: false
129
73
  requirements:
130
74
  - - ">="
@@ -135,12 +79,12 @@ dependencies:
135
79
  - 0
136
80
  - 0
137
81
  version: 1.0.0
138
- name: net-scp
139
- requirement: *id008
140
- - !ruby/object:Gem::Dependency
141
82
  type: :runtime
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ name: net-ssh-gateway
142
86
  prerelease: false
143
- version_requirements: &id009 !ruby/object:Gem::Requirement
87
+ requirement: &id005 !ruby/object:Gem::Requirement
144
88
  none: false
145
89
  requirements:
146
90
  - - ">="
@@ -151,26 +95,12 @@ dependencies:
151
95
  - 0
152
96
  - 0
153
97
  version: 1.0.0
154
- name: net-ssh-gateway
155
- requirement: *id009
156
- - !ruby/object:Gem::Dependency
157
98
  type: :runtime
158
- prerelease: false
159
- version_requirements: &id010 !ruby/object:Gem::Requirement
160
- none: false
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- hash: 3
165
- segments:
166
- - 0
167
- version: "0"
168
- name: highline
169
- requirement: *id010
99
+ version_requirements: *id005
170
100
  - !ruby/object:Gem::Dependency
171
- type: :development
101
+ name: mocha
172
102
  prerelease: false
173
- version_requirements: &id011 !ruby/object:Gem::Requirement
103
+ requirement: &id006 !ruby/object:Gem::Requirement
174
104
  none: false
175
105
  requirements:
176
106
  - - ">="
@@ -179,20 +109,22 @@ dependencies:
179
109
  segments:
180
110
  - 0
181
111
  version: "0"
182
- name: mocha
183
- requirement: *id011
112
+ type: :development
113
+ version_requirements: *id006
184
114
  description: Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.
185
115
  email:
186
116
  - jamis@jamisbuck.org
187
117
  - lee.hambley@gmail.com
188
118
  executables:
189
- - capify
190
119
  - cap
120
+ - capify
191
121
  extensions: []
192
122
 
193
123
  extra_rdoc_files:
194
124
  - README.mdown
195
125
  files:
126
+ - .gitignore
127
+ - .rvmrc
196
128
  - CHANGELOG
197
129
  - Gemfile
198
130
  - README.mdown
@@ -200,6 +132,7 @@ files:
200
132
  - VERSION
201
133
  - bin/cap
202
134
  - bin/capify
135
+ - capistrano.gemspec
203
136
  - lib/capistrano.rb
204
137
  - lib/capistrano/callback.rb
205
138
  - lib/capistrano/cli.rb
@@ -258,6 +191,7 @@ files:
258
191
  - lib/capistrano/task_definition.rb
259
192
  - lib/capistrano/transfer.rb
260
193
  - lib/capistrano/version.rb
194
+ - rvmrc.sample
261
195
  - test/cli/execute_test.rb
262
196
  - test/cli/help_test.rb
263
197
  - test/cli/options_test.rb
@@ -329,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
263
  requirements: []
330
264
 
331
265
  rubyforge_project:
332
- rubygems_version: 1.3.7
266
+ rubygems_version: 1.6.2
333
267
  signing_key:
334
268
  specification_version: 3
335
269
  summary: Capistrano - Welcome to easy deployment with Ruby over SSH