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 CHANGED
@@ -1 +1 @@
1
- 0.0.8
1
+ 0.0.9
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.8"
8
+ s.version = "0.0.9"
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"]
@@ -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
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Zimmek