GoEC2 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/GoEC2.gemspec +12 -7
- data/README.markdown +6 -0
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/options.rb +1 -0
- data/lib/runner.rb +1 -1
- data/lib/utils.rb +2 -4
- metadata +7 -6
data/GoEC2.gemspec
CHANGED
@@ -1,22 +1,26 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{GoEC2}
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Within3", "Joe Fiorini", "Jonathan Penn"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-09-03}
|
13
13
|
s.default_executable = %q{goec2}
|
14
14
|
s.description = %q{Simple and opinionated helper for creating and managing Rubygem projects on GitHub}
|
15
15
|
s.email = %q{jfiorini@within3.com}
|
16
16
|
s.executables = ["goec2"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"README.markdown"
|
19
|
+
]
|
17
20
|
s.files = [
|
18
21
|
".gitignore",
|
19
22
|
"GoEC2.gemspec",
|
23
|
+
"README.markdown",
|
20
24
|
"Rakefile",
|
21
25
|
"VERSION",
|
22
26
|
"bin/goec2",
|
@@ -38,14 +42,15 @@ Gem::Specification.new do |s|
|
|
38
42
|
s.specification_version = 3
|
39
43
|
|
40
44
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
41
|
-
s.add_runtime_dependency(%q<
|
45
|
+
s.add_runtime_dependency(%q<forgery>, [">= 0.3.4"])
|
42
46
|
s.add_development_dependency(%q<jeweler>, [">= 1.2.1"])
|
43
47
|
else
|
44
|
-
s.add_dependency(%q<
|
48
|
+
s.add_dependency(%q<forgery>, [">= 0.3.4"])
|
45
49
|
s.add_dependency(%q<jeweler>, [">= 1.2.1"])
|
46
50
|
end
|
47
51
|
else
|
48
|
-
s.add_dependency(%q<
|
52
|
+
s.add_dependency(%q<forgery>, [">= 0.3.4"])
|
49
53
|
s.add_dependency(%q<jeweler>, [">= 1.2.1"])
|
50
54
|
end
|
51
55
|
end
|
56
|
+
|
data/README.markdown
ADDED
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ begin
|
|
7
7
|
gemspec.email = "jfiorini@within3.com"
|
8
8
|
gemspec.homepage = "http://github.com/faithfulgeek/goec2"
|
9
9
|
gemspec.authors = ["Within3", "Joe Fiorini", "Jonathan Penn"]
|
10
|
-
gemspec.add_dependency('
|
10
|
+
gemspec.add_dependency('forgery', '>=0.3.4')
|
11
11
|
gemspec.add_development_dependency('jeweler', '>=1.2.1')
|
12
12
|
end
|
13
13
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/options.rb
CHANGED
@@ -19,6 +19,7 @@ module Options
|
|
19
19
|
|
20
20
|
def parse_ssh_options(args, defaults={})
|
21
21
|
opts.on("-u", "--user [NAME]", "The user to pass to ssh") { |name| defaults[:user] = name }
|
22
|
+
opts.on("-i", "--private-key [KEY_PATH]", "The path to the SSH private key") { |name| defaults[:keypair_path] = name }
|
22
23
|
opts.banner = "Usage: goec2 ssh INSTANCE_NAME [options]"
|
23
24
|
opts.parse!(args)
|
24
25
|
defaults
|
data/lib/runner.rb
CHANGED
@@ -29,7 +29,7 @@ class Runner
|
|
29
29
|
raise "Need an instance name" unless instance_name
|
30
30
|
instance = get_instance(instance_name)
|
31
31
|
raise "Unknown instance name #{instance_name}" unless instance
|
32
|
-
options = parse_ssh_options(args, :user => 'w3dev')
|
32
|
+
options = parse_ssh_options(args, :user => 'w3dev', :keypair_path => EC2_KEYPAIR_PATH)
|
33
33
|
ssh instance.url, options
|
34
34
|
when /scp_up/
|
35
35
|
raise "Need an istance name" unless args[1]
|
data/lib/utils.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
require 'forgery'
|
2
|
-
require 'dictionaries'
|
1
|
+
require 'forgery/dictionaries'
|
3
2
|
require 'yaml'
|
4
3
|
require 'file_reader'
|
5
4
|
|
6
5
|
EC2_SSH_KEY_NAME = ENV['EC2_KEYPAIR_NAME'] || 'default'
|
7
6
|
EC2_SSH_KEY_PATH = ENV['EC2_KEYPAIR_PATH'] || '~/.ec2/default-key-pair.pem'
|
8
|
-
EC2_DEFAULT_KEY_PATH = '~/.ec2/default-key-pair.pem'
|
9
7
|
|
10
8
|
Instance = Struct.new(:line, :instance_id, :image, :status, :url, :name)
|
11
9
|
|
@@ -71,7 +69,7 @@ module Utils
|
|
71
69
|
|
72
70
|
def ssh(url, options={})
|
73
71
|
puts url
|
74
|
-
exec "ssh -i #{
|
72
|
+
exec "ssh -i #{options[:keypair_path]} #{options[:user]}@#{url}"
|
75
73
|
end
|
76
74
|
|
77
75
|
def scp_up instance, source, destination
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: GoEC2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Within3
|
@@ -11,18 +11,18 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date:
|
14
|
+
date: 2010-09-03 00:00:00 -04:00
|
15
15
|
default_executable: goec2
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
|
-
name:
|
18
|
+
name: forgery
|
19
19
|
type: :runtime
|
20
20
|
version_requirement:
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
23
|
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version: 0.
|
25
|
+
version: 0.3.4
|
26
26
|
version:
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jeweler
|
@@ -40,11 +40,12 @@ executables:
|
|
40
40
|
- goec2
|
41
41
|
extensions: []
|
42
42
|
|
43
|
-
extra_rdoc_files:
|
44
|
-
|
43
|
+
extra_rdoc_files:
|
44
|
+
- README.markdown
|
45
45
|
files:
|
46
46
|
- .gitignore
|
47
47
|
- GoEC2.gemspec
|
48
|
+
- README.markdown
|
48
49
|
- Rakefile
|
49
50
|
- VERSION
|
50
51
|
- bin/goec2
|