jzimmek-ec2 0.0.5 → 0.0.7

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.5
1
+ 0.0.7
data/ec2.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ec2}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.7"
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"]
12
- s.date = %q{2009-09-14}
12
+ s.date = %q{2009-09-15}
13
13
  s.email = %q{jan.zimmek@web.de}
14
14
  s.extra_rdoc_files = [
15
15
  "README"
data/lib/ec2/dsl/group.rb CHANGED
@@ -14,6 +14,7 @@ module Ec2
14
14
  attribute :keypair, :inheritable => true
15
15
  attribute :security_group, :inheritable => true
16
16
  attribute :availability_zone, :inheritable => true
17
+ attribute :domain, :inheritable => true
17
18
  attribute :userdata, :inheritable => true, :base64 => true, :strip => true
18
19
 
19
20
  end
@@ -13,6 +13,7 @@ module Ec2
13
13
  attribute :availability_zone, :inheritable => true
14
14
  attribute :userdata, :inheritable => true, :base64 => true, :strip => true
15
15
  attribute :elastic_ip, :inheritable => true
16
+ attribute :domain, :inheritable => true
16
17
  end
17
18
  end
18
19
  end
@@ -63,6 +63,10 @@ module Ec2
63
63
  end
64
64
 
65
65
  def valid?
66
+ !instance.nil?
67
+ end
68
+
69
+ def instance
66
70
  @cloud.instances.find{|it| it.name == @hostname}
67
71
  end
68
72
 
@@ -95,8 +99,11 @@ module Ec2
95
99
 
96
100
  def write_to_file(file, text)
97
101
  puts "write to #{file}: #{text}"
98
- cmd = "cat >#{file} <<EOS
99
- #{text}EOS"
102
+ cmd = <<-EOF
103
+ cat >#{file} <<\\EOS
104
+ #{text}
105
+ EOS
106
+ EOF
100
107
  @ssh.exec!(cmd)
101
108
  end
102
109
  end
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.5
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Zimmek
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-14 00:00:00 -07:00
12
+ date: 2009-09-15 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15