rubber 1.13.0 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,21 @@
1
+ 1.13.1
2
+ -----
3
+
4
+ allow specifying a common role dependency for all instances <f49b662> [Matt Conway]
5
+ allow one to specify HOSTand ROLES when testing rake rubber:config in dev <56b3c8c> [Matt Conway]
6
+ Merged pull request #57 from drync/no_rvmrc. <9aee319> [Matt Conway]
7
+ Exclude .rvmrc from NO_SCM deploys <3fa1502> [Savanah Cummings]
8
+
9
+ 1.13.0
10
+ -----
11
+
12
+ Forgot target roles for start/stop/restart <9b916e8> [Alex Kremer]
13
+ Fix enabling multiverse on newer canonical AMIs (ie Maverick) <dcf81fa> [Alex Kremer]
14
+ Initial commit of MongoDB Template <c4f7640> [Alex Kremer]
15
+ allow FORCE on destroy_all <0db9347> [Matt Conway]
16
+ Removing a function that wasn't meant to be committed :( <8538041> [Jordan Brock]
17
+ Added support for changing the region end point, using the EC2 gem "server" key. <326448f> [Jordan Brock]
18
+
1
19
  1.13.0
2
20
  -----
3
21
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.13.0
1
+ 1.13.1
@@ -6,7 +6,7 @@ on :load do
6
6
  set :application, rubber_env.app_name
7
7
  set :runner, rubber_env.app_user
8
8
  set :deploy_to, "/mnt/#{application}-#{RUBBER_ENV}"
9
- set :copy_exclude, [".git/*", ".bundle/*", "log/*"]
9
+ set :copy_exclude, [".git/*", ".bundle/*", "log/*", ".rvmrc"]
10
10
  end
11
11
 
12
12
  # Use a simple directory tree copy here to make demo easier.
@@ -6,7 +6,7 @@ on :load do
6
6
  set :application, rubber_env.app_name
7
7
  set :runner, rubber_env.app_user
8
8
  set :deploy_to, "/mnt/#{application}-#{RUBBER_ENV}"
9
- set :copy_exclude, [".git/*", ".bundle/*", "log/*"]
9
+ set :copy_exclude, [".git/*", ".bundle/*", "log/*", ".rvmrc"]
10
10
  end
11
11
 
12
12
  # Use a simple directory tree copy here to make demo easier.
@@ -155,6 +155,12 @@ module Rubber
155
155
 
156
156
  def self.expand_role_dependencies(roles, dependency_map, expanded=[])
157
157
  roles = Array(roles)
158
+
159
+ if expanded.size == 0
160
+ common_deps = dependency_map[RoleItem.new('common')]
161
+ roles.concat(common_deps)
162
+ end
163
+
158
164
  roles.each do |role|
159
165
  unless expanded.include?(role)
160
166
  expanded << role
@@ -162,6 +168,7 @@ module Rubber
162
168
  expand_role_dependencies(needed, dependency_map, expanded)
163
169
  end
164
170
  end
171
+
165
172
  return expanded
166
173
  end
167
174
 
@@ -32,7 +32,9 @@ namespace :rubber do
32
32
  env = cfg.environment.bind(roles, instance_alias)
33
33
  gen = Rubber::Configuration::Generator.new("#{RUBBER_ROOT}/config/rubber", roles, instance_alias)
34
34
  elsif ['development', 'test'].include?(Rubber.env)
35
- roles = cfg.environment.known_roles
35
+ instance_alias = ENV['HOST'] || instance_alias
36
+ roles = ENV['ROLES'].split(',') if ENV['ROLES']
37
+ roles ||= cfg.environment.known_roles
36
38
  role_items = roles.collect do |r|
37
39
  Rubber::Configuration::RoleItem.new(r, r == "db" ? {'primary' => true} : {})
38
40
  end
@@ -169,4 +169,12 @@ class InstanceTest < Test::Unit::TestCase
169
169
  RoleItem.expand_role_dependencies(RoleItem.new('db'), deps).sort
170
170
 
171
171
  end
172
+
173
+ def test_common_dependencies
174
+ deps = { RoleItem.new('a') => RoleItem.new('b'),
175
+ RoleItem.new('common') => [RoleItem.new('c')]}
176
+ roles = [RoleItem.new('a'), RoleItem.new('b'), RoleItem.new('c')]
177
+ assert_equal roles, RoleItem.expand_role_dependencies(RoleItem.new('a'), deps).sort
178
+ end
179
+
172
180
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubber
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.13.0
5
+ version: 1.13.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matt Conway
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-13 00:00:00 -04:00
13
+ date: 2011-05-16 00:00:00 -04:00
14
14
  default_executable: vulcanize
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency