jzimmek-ec2 0.0.9 → 0.0.10

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
data/ec2.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ec2}
8
- s.version = "0.0.9"
8
+ s.version = "0.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jan Zimmek"]
@@ -67,6 +67,10 @@ module Ec2
67
67
  !instance.nil?
68
68
  end
69
69
 
70
+ def associate_address(ip)
71
+ @ws.associate_address(:instance_id => @id, :public_ip => ip)
72
+ end
73
+
70
74
  def instance
71
75
  @cloud.instances.find{|it| it.name == @hostname}
72
76
  end
data/lib/ec2/manager.rb CHANGED
@@ -36,7 +36,12 @@ module Ec2
36
36
 
37
37
  next unless state == :running
38
38
 
39
- binding = InstanceBinding.new(@cloud, @ws, id, launch_time, public_dns_name, private_dns_name)
39
+ begin
40
+ binding = InstanceBinding.new(@cloud, @ws, id, launch_time, public_dns_name, private_dns_name)
41
+ rescue Exception => e
42
+ puts "instance #{id} failed to bind: #{e}"
43
+ next
44
+ end
40
45
 
41
46
  hostname = binding.hostname
42
47
 
@@ -85,8 +90,13 @@ module Ec2
85
90
  bindings = instance_bindings
86
91
 
87
92
  bindings.each_pair do |hostname, binding|
88
- yield(binding)
89
- binding.disconnect!
93
+ begin
94
+ yield(binding)
95
+ rescue Exception => e
96
+ puts e
97
+ ensure
98
+ binding.disconnect!
99
+ end
90
100
  end
91
101
 
92
102
  @cloud.instances.each do |instance|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jzimmek-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Zimmek
@@ -37,7 +37,6 @@ files:
37
37
  - test/test_helper.rb
38
38
  has_rdoc: false
39
39
  homepage: http://github.com/jzimmek/ec2
40
- licenses:
41
40
  post_install_message:
42
41
  rdoc_options:
43
42
  - --charset=UTF-8
@@ -58,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
57
  requirements: []
59
58
 
60
59
  rubyforge_project:
61
- rubygems_version: 1.3.5
60
+ rubygems_version: 1.2.0
62
61
  signing_key:
63
62
  specification_version: 3
64
63
  summary: Management tool for EC2 clouds