capistrano 2.5.4 → 2.5.5

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.
@@ -1,3 +1,8 @@
1
+ == 2.5.5 / 24 Feb 2009
2
+
3
+ * Make sure role(:foo) actually declares an (empty) role for :foo, even without server arguments [Jamis Buck]
4
+
5
+
1
6
  == 2.5.4 / 4 Feb 2009
2
7
 
3
8
  * When using rsync with the remote_cache strategy include -t switch to preserve file times [Kevin McCarthy]
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{capistrano}
3
- s.version = "2.5.4"
3
+ s.version = "2.5.5"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Jamis Buck"]
7
- s.date = %q{2009-02-04}
7
+ s.date = %q{2009-02-24}
8
8
  s.description = %q{Capistrano is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.}
9
9
  s.email = %q{jamis@jamisbuck.org}
10
10
  s.executables = ["cap", "capify"]
@@ -45,6 +45,14 @@ module Capistrano
45
45
  def role(which, *args, &block)
46
46
  options = args.last.is_a?(Hash) ? args.pop : {}
47
47
  which = which.to_sym
48
+
49
+ # The roles Hash is defined so that unrecognized keys always auto-initialize
50
+ # to a new Role instance (see the assignment in the initialize_with_roles method,
51
+ # above). However, we explicitly assign here so that role declarations will
52
+ # vivify the role object even if there are no server arguments. (Otherwise,
53
+ # role(:app) won't actually instantiate a Role object for :app.)
54
+ roles[which] ||= Role.new
55
+
48
56
  roles[which].push(block, options) if block_given?
49
57
  args.each { |host| roles[which] << ServerDefinition.new(host, options) }
50
58
  end
@@ -6,7 +6,7 @@ module Capistrano
6
6
  class Version < Net::SSH::Version
7
7
  MAJOR = 2
8
8
  MINOR = 5
9
- TINY = 4
9
+ TINY = 5
10
10
 
11
11
  # The current version, as a Version instance
12
12
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -24,6 +24,7 @@ class ConfigurationRolesTest < Test::Unit::TestCase
24
24
 
25
25
  def test_role_should_allow_empty_list
26
26
  @config.role :app
27
+ assert @config.roles.keys.include?(:app)
27
28
  assert @config.roles[:app].empty?
28
29
  end
29
30
 
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.5.4
4
+ version: 2.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-04 00:00:00 -07:00
12
+ date: 2009-02-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency