ftl 0.1.0 → 0.1.1

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.1.0
1
+ 0.1.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ftl}
8
- s.version = "0.1.0"
8
+ s.version = "0.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 = ["Matt Petty"]
12
- s.date = %q{2010-07-29}
12
+ s.date = %q{2010-08-16}
13
13
  s.default_executable = %q{ftl}
14
14
  s.description = %q{FTL spins up and down Amazon EC2 instances for pair programming}
15
15
  s.email = %q{matt@kizmeta.com}
@@ -111,6 +111,21 @@ module FTL
111
111
  end
112
112
  end
113
113
 
114
+ def help(*args)
115
+ puts "Usage: ftl <command> <options>"
116
+ puts " commands: start kill list connect"
117
+ puts " examples:"
118
+ puts " ftl start ninja # starts an instance named 'ninja'"
119
+ puts " ftl list # shows running instances and status"
120
+ puts " ftl connect # connects to instance if only one is running"
121
+ puts " ftl connect ninja # connects to instance named 'ninja'"
122
+ puts " ftl kill nin # kills all instances matching /nin/"
123
+ end
124
+
125
+ def method_missing(*args)
126
+ help
127
+ end
128
+
114
129
  end
115
130
 
116
131
  end
@@ -43,7 +43,11 @@ module FTL
43
43
  pm = PairingMachine.new(params)
44
44
  pm[:instance_type] ||= 'c1.medium'
45
45
  ec2 = Aws::Ec2.new(ACCESS_KEY_ID, SECRET_ACCESS_KEY)
46
- instance_script = URI.parse(INSTANCE_SCRIPT).read || '#!'
46
+ if INSTANCE_SCRIPT.nil?
47
+ instance_script = '#!'
48
+ else
49
+ instance_script = INSTANCE_SCRIPT[/^#!/] ? INSTANCE_SCRIPT : URI.parse(INSTANCE_SCRIPT).read
50
+ end
47
51
  i = ec2.launch_instances(params[:ami], :user_data => instance_script, :instance_type => pm[:instance_type])[0]
48
52
  pm[:aws_instance_id] = i[:aws_instance_id]
49
53
  pm[:dns_name] = i[:dns_name]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Petty
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-29 00:00:00 -05:00
17
+ date: 2010-08-16 00:00:00 -05:00
18
18
  default_executable: ftl
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency