capify-ec2 1.5.0.pre2 → 1.5.0.pre3
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/Changelog.md +10 -0
- data/lib/capify-ec2.rb +2 -2
- data/lib/capify-ec2/capistrano.rb +8 -1
- data/lib/capify-ec2/version.rb +1 -1
- metadata +4 -4
data/Changelog.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 1.5.0.pre3 (Aug 6, 2013)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
|
5
|
+
- Capify-EC2 will now use the 'ssh_options[:keys]' setting in your 'deploy.rb' when connecting to an instance using the 'ec2:ssh' command.
|
6
|
+
|
7
|
+
Bugfixes:
|
8
|
+
|
9
|
+
- Fixed an exception when using the 'ec2:ssh' and 'ec2:status' commands with stages.
|
10
|
+
|
1
11
|
## 1.5.0.pre2 (Jul 23, 2013)
|
2
12
|
|
3
13
|
Bugfixes:
|
data/lib/capify-ec2.rb
CHANGED
@@ -100,7 +100,7 @@ class CapifyEc2
|
|
100
100
|
# Project and Stages info..
|
101
101
|
info_label_width = [@ec2_config[:aws_project_tag], @ec2_config[:aws_stages_tag]].map(&:length).max
|
102
102
|
puts "#{@ec2_config[:aws_project_tag].rjust( info_label_width ).bold}: #{@ec2_config[:project_tags].join(', ')}." if @ec2_config[:project_tags].any?
|
103
|
-
puts "#{@ec2_config[:aws_stages_tag].rjust( info_label_width ).bold}: #{@ec2_config[:stage]}." unless @ec2_config[:stage].empty?
|
103
|
+
puts "#{@ec2_config[:aws_stages_tag].rjust( info_label_width ).bold}: #{@ec2_config[:stage]}." unless @ec2_config[:stage].to_s.empty?
|
104
104
|
|
105
105
|
# Title row.
|
106
106
|
status_output = []
|
@@ -140,7 +140,7 @@ class CapifyEc2
|
|
140
140
|
|
141
141
|
def desired_instances(region = nil)
|
142
142
|
instances = @ec2_config[:project_tags].empty? ? @instances : project_instances
|
143
|
-
@ec2_config[:stage].empty? ? instances : get_instances_by_stage(instances)
|
143
|
+
@ec2_config[:stage].to_s.empty? ? instances : get_instances_by_stage(instances)
|
144
144
|
end
|
145
145
|
|
146
146
|
def get_instances_by_role(role)
|
@@ -39,13 +39,20 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
39
39
|
desc "Allows ssh to instance by id. cap ssh <INSTANCE NAME>"
|
40
40
|
task :ssh do
|
41
41
|
server = variables[:logger].instance_variable_get("@options")[:actions][1]
|
42
|
+
if "ec2:ssh" == server then
|
43
|
+
server = variables[:logger].instance_variable_get("@options")[:actions][2]
|
44
|
+
end
|
42
45
|
|
43
46
|
if server
|
44
47
|
instance = numeric?(server) ? capify_ec2.desired_instances[server.to_i] : capify_ec2.get_instance_by_name(server)
|
45
48
|
|
46
49
|
if instance and instance.contact_point then
|
47
50
|
port = ssh_options[:port] || 22
|
48
|
-
|
51
|
+
key = ""
|
52
|
+
if !ssh_options[:keys].to_s.empty?
|
53
|
+
key = "-i #{ssh_options[:keys]}"
|
54
|
+
end
|
55
|
+
command = "ssh -p #{port} #{key} #{user}@#{instance.contact_point}"
|
49
56
|
puts "Running `#{command}`"
|
50
57
|
exec(command)
|
51
58
|
else
|
data/lib/capify-ec2/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capify-ec2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -2435621208
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 0
|
10
10
|
- pre
|
11
|
-
-
|
12
|
-
version: 1.5.0.
|
11
|
+
- 3
|
12
|
+
version: 1.5.0.pre3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Noah Cantor
|
@@ -20,7 +20,7 @@ autorequire:
|
|
20
20
|
bindir: bin
|
21
21
|
cert_chain: []
|
22
22
|
|
23
|
-
date: 2013-
|
23
|
+
date: 2013-08-06 00:00:00 Z
|
24
24
|
dependencies:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: fog
|