auser-poolparty 0.2.25 → 0.2.26

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,7 +50,7 @@ module PoolParty
50
50
  @cloud = cloud
51
51
 
52
52
  options(cloud.options) if cloud && cloud.respond_to?(:options)
53
- set_vars_from_options(instance.options) unless instance.nil? || !instance.options.empty?
53
+ set_vars_from_options(instance.options) unless instance.nil? || !instance.options || !instance.options.empty?
54
54
  options(instance.options) if instance.respond_to?(:options)
55
55
 
56
56
  @os = os.to_s.downcase.to_sym
@@ -176,13 +176,17 @@ module PoolParty
176
176
  # get go
177
177
  def expand_cloud_if_necessary(force=false)
178
178
  if can_start_a_new_instance? && should_expand_cloud?(force)
179
- @out = request_launch_new_instances(1)
179
+ @num = 1
180
+ @out = request_launch_new_instances(@num)
180
181
 
181
182
  reset!
182
183
  when_no_pending_instances do
183
184
  wait "20.seconds" # Give some time for ssh to startup
184
- last_instance = nonmaster_nonterminated_instances.last
185
- PoolParty::Provisioner.provision_slave(last_instance, self)
185
+ @num_instances = nonmaster_nonterminated_instances.size
186
+ last_instances = nonmaster_nonterminated_instances[(@num_instances - @num)..(@num_instances)]
187
+ last_instances.each do |inst|
188
+ PoolParty::Provisioner.provision_slave(inst, self)
189
+ end
186
190
  PoolParty::Provisioner.reconfigure_master(self, force)
187
191
  # prepare_reconfiguration
188
192
  end
@@ -2,7 +2,7 @@ module PoolParty
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- TINY = 25
5
+ TINY = 26
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poolparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner
@@ -196,7 +196,7 @@ describe "Remote" do
196
196
  @tc.stub!(:prepare_reconfiguration).and_return "full"
197
197
  PoolParty::Provisioner.stub!(:reconfigure_master).and_return true
198
198
  @tc.stub!(:wait).and_return true
199
- @tc.stub!(:nonmaster_nonterminated_instances).and_return true
199
+ @tc.stub!(:nonmaster_nonterminated_instances).and_return response_list_of_instances
200
200
  @inst = stub_instance(9, "running")
201
201
  @tc.nonmaster_nonterminated_instances.stub!(:last).and_return @inst
202
202
  @inst.stub!(:options).and_return({:name => "red"})
@@ -34,7 +34,7 @@
34
34
  <h1>PoolParty</h1>
35
35
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/poolparty"; return false'>
36
36
  <p>Get Version</p>
37
- <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.25</a>
37
+ <a href="http://rubyforge.org/projects/poolparty" class="numbers">0.2.26</a>
38
38
  </div>
39
39
  <h1>&#8216;Easy cloud computing&#8217;</h1>
40
40
  <h2>What</h2>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auser-poolparty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Lerner