jzimmek-ec2 0.0.8 → 0.0.9
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 +1 -1
- data/ec2.gemspec +1 -1
- data/lib/ec2/instance_binding.rb +7 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/ec2.gemspec
CHANGED
data/lib/ec2/instance_binding.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'active_support'
|
3
3
|
require 'net/ssh'
|
4
|
+
require 'net/scp'
|
4
5
|
|
5
6
|
module Ec2
|
6
7
|
class InstanceBinding
|
@@ -97,6 +98,12 @@ module Ec2
|
|
97
98
|
value
|
98
99
|
end
|
99
100
|
|
101
|
+
def upload_file(local, remote)
|
102
|
+
Net::SCP.start(@public_dns_name, "root", :keys => [@cloud.ssh_key_file], :paranoid => false) do |scp|
|
103
|
+
scp.upload!(local, remote)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
100
107
|
def write_to_file(file, text)
|
101
108
|
puts "write to #{file}: #{text}"
|
102
109
|
cmd = <<-EOF
|