capistrano 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,6 +1,13 @@
1
+ *unreleased*
2
+
3
+ * Add an explicit dependency on Net::SSH and Net::SFTP versions less than 1.99.0 so that cap1 can coexist with net-ssh v2 [Jamis Buck]
4
+
5
+ * Don't send no-auth-cache if no auth credentials are given [Jonathan Younger]
6
+
7
+
1
8
  *1.4.1* (February 24, 2007)
2
9
 
3
- * Use the no-auth-cache option with subversion so that username/password tokens do not get cached by capistrano usage [jonathan]
10
+ * Use the no-auth-cache option with subversion so that username/password tokens do not get cached by capistrano usage [Jonathan Younger]
4
11
 
5
12
  * Deprecated upper-cased variables [Jamis Buck]
6
13
 
data/bin/cap CHANGED
File without changes
@@ -80,7 +80,8 @@ module Capistrano
80
80
  def authorization
81
81
  username = configuration[:svn_username] ? "--username #{configuration[:svn_username]}" : ""
82
82
  password = configuration[:svn_password] ? "--password #{configuration[:svn_password]}" : ""
83
- "--no-auth-cache #{username} #{password}"
83
+ no_auth_cache = configuration[:svn_username] || configuration[:svn_password] ? "--no-auth-cache" : ""
84
+ "#{no_auth_cache} #{username} #{password}"
84
85
  end
85
86
 
86
87
  def svn_log(path)
@@ -1,3 +1,9 @@
1
+ begin
2
+ require 'rubygems'
3
+ gem 'net-ssh', '< 1.99.0'
4
+ rescue LoadError, NameError
5
+ end
6
+
1
7
  require 'net/ssh'
2
8
 
3
9
  module Capistrano
@@ -5,8 +11,8 @@ module Capistrano
5
11
  require 'capistrano/version'
6
12
  require 'net/ssh/version'
7
13
  ssh_version = [Net::SSH::Version::MAJOR, Net::SSH::Version::MINOR, Net::SSH::Version::TINY]
8
- if !Version.check(Version::SSH_REQUIRED, ssh_version)
9
- raise "You have Net::SSH #{ssh_version.join(".")}, but you need at least #{Version::SSH_REQUIRED.join(".")}"
14
+ if !Version.check(ssh_version, Version::MINIMUM_SSH_REQUIRED, Version::MAXIMUM_SSH_REQUIRED)
15
+ raise "You have Net::SSH #{ssh_version.join(".")}, but you need a version between #{Version::MINIMUM_SSH_REQUIRED.join(".")}...#{Version::MAXIMUM_SSH_REQUIRED.join(".")}"
10
16
  end
11
17
  end
12
18
 
@@ -1,11 +1,18 @@
1
1
  begin
2
2
  require 'capistrano/version'
3
+
4
+ begin
5
+ require 'rubygems'
6
+ gem 'net-sftp', '< 1.99.0'
7
+ rescue LoadError, NameError
8
+ end
9
+
3
10
  require 'net/sftp'
4
11
  require 'net/sftp/version'
12
+
5
13
  sftp_version = [Net::SFTP::Version::MAJOR, Net::SFTP::Version::MINOR, Net::SFTP::Version::TINY]
6
- required_version = [1,1,0]
7
- if !Capistrano::Version.check(required_version, sftp_version)
8
- warn "You have Net::SFTP #{sftp_version.join(".")}, but you need at least #{required_version.join(".")}. Net::SFTP will not be used."
14
+ if !Capistrano::Version.check(sftp_version, Capistrano::Version::MINIMUM_SFTP_REQUIRED, Capistrano::Version::MAXIMUM_SFTP_REQUIRED)
15
+ warn "You have Net::SFTP #{sftp_version.join(".")}, but you need between #{Capistrano::Version::MINIMUM_SFTP_REQUIRED.join('.')}...#{Capistrano::Version::MAXIMUM_SFTP_REQUIRED.join('.')}. Net::SFTP will not be used."
9
16
  Capistrano::SFTP = false
10
17
  else
11
18
  Capistrano::SFTP = true
@@ -1,30 +1,26 @@
1
1
  module Capistrano
2
2
  module Version #:nodoc:
3
- # A method for comparing versions of required modules. It expects two
4
- # arrays as parameters, and returns true if the first is no more than the
5
- # second.
6
- def self.check(expected, actual) #:nodoc:
7
- good = false
8
- if actual[0] > expected[0]
9
- good = true
10
- elsif actual[0] == expected[0]
11
- if actual[1] > expected[1]
12
- good = true
13
- elsif actual[1] == expected[1] && actual[2] >= expected[2]
14
- good = true
15
- end
16
- end
17
-
18
- good
3
+ # A method for comparing versions of required modules. It expects
4
+ # arrays as parameters, and returns true if the first is no less than the
5
+ # second, and strictly less than the third.
6
+ def self.check(actual, minimum, maximum) #:nodoc:
7
+ actual = actual[0] * 1_000_000 + actual[1] * 1_000 + actual[2]
8
+ minimum = minimum[0] * 1_000_000 + minimum[1] * 1_000 + minimum[2]
9
+ maximum = maximum[0] * 1_000_000 + maximum[1] * 1_000 + maximum[2]
10
+
11
+ return actual >= minimum && actual < maximum
19
12
  end
20
13
 
21
14
  MAJOR = 1
22
15
  MINOR = 4
23
- TINY = 1
16
+ TINY = 2
24
17
 
25
18
  STRING = [MAJOR, MINOR, TINY].join(".")
26
19
 
27
- SSH_REQUIRED = [1,0,10]
28
- SFTP_REQUIRED = [1,1,0]
20
+ MINIMUM_SSH_REQUIRED = [1,0,10]
21
+ MAXIMUM_SSH_REQUIRED = [1,99,0]
22
+
23
+ MINIMUM_SFTP_REQUIRED = [1,1,0]
24
+ MAXIMUM_SFTP_REQUIRED = [1,99,0]
29
25
  end
30
26
  end
@@ -134,4 +134,12 @@ MSG
134
134
  assert_nil @actor.channels.last.sent_data
135
135
  assert_match %r{/path/to/svn\b.*\bco\b.* --username turtledove}, @actor.command
136
136
  end
137
+
138
+ def test_svn_no_auth_cache
139
+ @actor.story = []
140
+ @config[:svn_username] = "turtledove"
141
+ assert_nothing_raised { @scm.checkout(@actor) }
142
+ assert_nil @actor.channels.last.sent_data
143
+ assert_match %r{/path/to/svn\b.*\bco\b.* --no-auth-cache --username turtledove}, @actor.command
144
+ end
137
145
  end
metadata CHANGED
@@ -1,37 +1,61 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
3
- specification_version: 1
4
2
  name: capistrano
5
3
  version: !ruby/object:Gem::Version
6
- version: 1.4.1
7
- date: 2007-02-24 00:00:00 -07:00
8
- summary: Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications.
9
- require_paths:
10
- - lib
11
- email: jamis@37signals.com
12
- homepage: http://www.rubyonrails.org
13
- rubyforge_project:
14
- description:
15
- autorequire: capistrano
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: false
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
4
+ version: 1.4.2
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Jamis Buck
8
+ autorequire: capistrano
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-04-29 00:00:00 -06:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.7.0
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: net-ssh
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.0.10
32
+ - - <
33
+ - !ruby/object:Gem::Version
34
+ version: 1.99.0
35
+ version:
36
+ - !ruby/object:Gem::Dependency
37
+ name: net-sftp
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.1.0
44
+ - - <
45
+ - !ruby/object:Gem::Version
46
+ version: 1.99.0
47
+ version:
48
+ description:
49
+ email: jamis@37signals.com
50
+ executables:
51
+ - cap
52
+ extensions: []
53
+
54
+ extra_rdoc_files: []
55
+
31
56
  files:
32
57
  - bin/cap
33
58
  - lib/capistrano
34
- - lib/capistrano.rb
35
59
  - lib/capistrano/actor.rb
36
60
  - lib/capistrano/cli.rb
37
61
  - lib/capistrano/command.rb
@@ -39,24 +63,19 @@ files:
39
63
  - lib/capistrano/extensions.rb
40
64
  - lib/capistrano/gateway.rb
41
65
  - lib/capistrano/generators
42
- - lib/capistrano/logger.rb
43
- - lib/capistrano/recipes
44
- - lib/capistrano/scm
45
- - lib/capistrano/shell.rb
46
- - lib/capistrano/ssh.rb
47
- - lib/capistrano/transfer.rb
48
- - lib/capistrano/utils.rb
49
- - lib/capistrano/version.rb
50
66
  - lib/capistrano/generators/rails
51
67
  - lib/capistrano/generators/rails/deployment
52
- - lib/capistrano/generators/rails/loader.rb
53
68
  - lib/capistrano/generators/rails/deployment/deployment_generator.rb
54
69
  - lib/capistrano/generators/rails/deployment/templates
55
70
  - lib/capistrano/generators/rails/deployment/templates/capistrano.rake
56
71
  - lib/capistrano/generators/rails/deployment/templates/deploy.rb
72
+ - lib/capistrano/generators/rails/loader.rb
73
+ - lib/capistrano/logger.rb
74
+ - lib/capistrano/recipes
57
75
  - lib/capistrano/recipes/standard.rb
58
76
  - lib/capistrano/recipes/templates
59
77
  - lib/capistrano/recipes/templates/maintenance.rhtml
78
+ - lib/capistrano/scm
60
79
  - lib/capistrano/scm/base.rb
61
80
  - lib/capistrano/scm/baz.rb
62
81
  - lib/capistrano/scm/bzr.rb
@@ -65,59 +84,53 @@ files:
65
84
  - lib/capistrano/scm/mercurial.rb
66
85
  - lib/capistrano/scm/perforce.rb
67
86
  - lib/capistrano/scm/subversion.rb
87
+ - lib/capistrano/shell.rb
88
+ - lib/capistrano/ssh.rb
89
+ - lib/capistrano/transfer.rb
90
+ - lib/capistrano/utils.rb
91
+ - lib/capistrano/version.rb
92
+ - lib/capistrano.rb
68
93
  - examples/sample.rb
69
94
  - test/actor_test.rb
70
95
  - test/command_test.rb
71
96
  - test/configuration_test.rb
72
97
  - test/fixtures
73
- - test/scm
74
- - test/ssh_test.rb
75
- - test/utils.rb
76
98
  - test/fixtures/config.rb
77
99
  - test/fixtures/custom.rb
100
+ - test/scm
78
101
  - test/scm/cvs_test.rb
79
102
  - test/scm/subversion_test.rb
103
+ - test/ssh_test.rb
104
+ - test/utils.rb
80
105
  - README
81
106
  - MIT-LICENSE
82
107
  - CHANGELOG
83
108
  - THANKS
84
- test_files: []
85
-
109
+ has_rdoc: false
110
+ homepage: http://www.rubyonrails.org
111
+ post_install_message:
86
112
  rdoc_options: []
87
113
 
88
- extra_rdoc_files: []
89
-
90
- executables:
91
- - cap
92
- extensions: []
93
-
114
+ require_paths:
115
+ - lib
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: "0"
121
+ version:
122
+ required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: "0"
127
+ version:
94
128
  requirements: []
95
129
 
96
- dependencies:
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
- version_requirement:
100
- version_requirements: !ruby/object:Gem::Version::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 0.7.0
105
- version:
106
- - !ruby/object:Gem::Dependency
107
- name: net-ssh
108
- version_requirement:
109
- version_requirements: !ruby/object:Gem::Version::Requirement
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: 1.0.10
114
- version:
115
- - !ruby/object:Gem::Dependency
116
- name: net-sftp
117
- version_requirement:
118
- version_requirements: !ruby/object:Gem::Version::Requirement
119
- requirements:
120
- - - ">="
121
- - !ruby/object:Gem::Version
122
- version: 1.1.0
123
- version:
130
+ rubyforge_project:
131
+ rubygems_version: 1.1.1
132
+ signing_key:
133
+ specification_version: 2
134
+ summary: Capistrano is a framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications.
135
+ test_files: []
136
+