toquen 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toquen/aws.rb +18 -14
- data/lib/toquen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e35803c6014457d4b1865f9e08af7b8a50e6a04
|
4
|
+
data.tar.gz: 2c93235e6285491b42b7ff9d7763758ace466644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a596381ae877a688a92002902bfd3b8768de58bbb0c32d1738da439de32d40b4ed21c9f84a87aba022cb306fadd62bdad5a6ee4115e98870a7514ef9a04eaa
|
7
|
+
data.tar.gz: 10893f1b36c9e4422519f384f3d5cb638344412303d54a4fbf8bb9eabdfa883bfb11531ea201f7d3fbdf91ad28eb40d629e9e6f24c31e9348273bda4a56a749f
|
data/lib/toquen/aws.rb
CHANGED
@@ -60,8 +60,10 @@ module Toquen
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def get_security_groups(ids)
|
63
|
-
|
64
|
-
|
63
|
+
AWS.memoize do
|
64
|
+
ectwo = AWS::EC2.new
|
65
|
+
ids.map { |id| ectwo.security_groups[id] }
|
66
|
+
end
|
65
67
|
end
|
66
68
|
|
67
69
|
def authorize_ingress(secgroup, protocol, port, ip)
|
@@ -86,18 +88,20 @@ module Toquen
|
|
86
88
|
|
87
89
|
def server_details_in(region)
|
88
90
|
AWS.config(:access_key_id => @key_id, :secret_access_key => @key, :region => region)
|
89
|
-
AWS
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
91
|
+
AWS.memoize do
|
92
|
+
AWS::EC2.new.instances.map do |i|
|
93
|
+
{
|
94
|
+
:id => i.tags["Name"],
|
95
|
+
:internal_ip => i.private_ip_address,
|
96
|
+
:external_ip => i.public_ip_address,
|
97
|
+
:name => i.tags["Name"],
|
98
|
+
:roles => Toquen.config.aws_roles_extractor.call(i),
|
99
|
+
:type => i.instance_type,
|
100
|
+
:external_dns => i.public_dns_name,
|
101
|
+
:internal_dns => i.private_dns_name,
|
102
|
+
:security_groups => i.security_groups.to_a.map(&:id)
|
103
|
+
}
|
104
|
+
end
|
101
105
|
end
|
102
106
|
end
|
103
107
|
|
data/lib/toquen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toquen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Muller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|