stem 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stem.rb +1 -0
- data/lib/stem/instance_types.rb +29 -0
- data/lib/stem/util.rb +7 -1
- metadata +4 -3
data/lib/stem.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
module Stem
|
2
|
+
module Instance
|
3
|
+
Types =
|
4
|
+
{"m1.small" => {
|
5
|
+
"architecture" => "i386"},
|
6
|
+
"m1.large" => {
|
7
|
+
"architecture" => "i386"},
|
8
|
+
"m1.xlarge" => {
|
9
|
+
"architecture" => "x86_64"},
|
10
|
+
"t1.micro" => {
|
11
|
+
"architecture" => "i386"},
|
12
|
+
"m2.xlarge" => {
|
13
|
+
"architecture" => "x86_64"},
|
14
|
+
"m2.2xlarge" => {
|
15
|
+
"architecture" => "x86_64"},
|
16
|
+
"m2.4xlarge" => {
|
17
|
+
"architecture" => "x86_64"},
|
18
|
+
"c1.medium" => {
|
19
|
+
"architecture" => "i386"},
|
20
|
+
"c1.xlarge" => {
|
21
|
+
"architecture" => "x86_64"},
|
22
|
+
"cc1.4xlarge" => {
|
23
|
+
"architecture" => "x86_64"},
|
24
|
+
"cg1.4xlarge" => {
|
25
|
+
"architecture" => "x86_64"}
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
data/lib/stem/util.rb
CHANGED
@@ -25,7 +25,13 @@ module Stem
|
|
25
25
|
|
26
26
|
def tags_to_filter(tags)
|
27
27
|
if tags.is_a? Hash
|
28
|
-
|
28
|
+
tags = tags.inject({}) do |h, (k, v)|
|
29
|
+
# this is really awful. how can i make this non-awful?
|
30
|
+
k = "tag:#{k}" unless k.to_s == "architecture"
|
31
|
+
h[k.to_s] = v
|
32
|
+
h
|
33
|
+
end
|
34
|
+
get_filter_opts(tags)
|
29
35
|
elsif tags.is_a? Array
|
30
36
|
get_filter_opts( { "tag-key" => tags.map(&:to_s) })
|
31
37
|
else
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 4
|
10
|
+
version: 0.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Peter van Hardenberg
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- lib/stem/group.rb
|
53
53
|
- lib/stem/image.rb
|
54
54
|
- lib/stem/instance.rb
|
55
|
+
- lib/stem/instance_types.rb
|
55
56
|
- lib/stem/ip.rb
|
56
57
|
- lib/stem/tag.rb
|
57
58
|
- lib/stem/userdata.rb
|