stem 0.4.3 → 0.4.4

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.
@@ -8,6 +8,7 @@ require 'stem/util'
8
8
  require 'stem/group'
9
9
  require 'stem/userdata'
10
10
  require 'stem/instance'
11
+ require 'stem/instance_types'
11
12
  require 'stem/image'
12
13
  require 'stem/ip'
13
14
  require 'stem/tag'
@@ -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
+
@@ -25,7 +25,13 @@ module Stem
25
25
 
26
26
  def tags_to_filter(tags)
27
27
  if tags.is_a? Hash
28
- get_filter_opts( tags.inject({}) {|h, (k, v)| h["tag:#{k}"] = v; h })
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: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
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