stem 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,7 @@ module Stem
20
20
  opts.separator " $ stem launch examples/lxc-server/lxc-server.json examples/lxc-server/"
21
21
  opts.separator " $ stem list"
22
22
  opts.separator " $ stem create ami-name instance-id ami_tag1,ami_tag2"
23
+ opts.separator " $ stem destroy ami-name"
23
24
 
24
25
  opts.separator " "
25
26
  opts.separator "Options:"
@@ -59,6 +59,16 @@ module Stem
59
59
  swirl.call "AuthorizeSecurityGroupIngress", args
60
60
  end
61
61
 
62
+ def revoke(name, rules)
63
+ index = 0
64
+ args = rules.inject({"GroupName" => name}) do |i,rule|
65
+ index += 1;
66
+ rule_hash = gen_authorize(index, rule)
67
+ i.merge(rule_hash)
68
+ end
69
+ swirl.call "RevokeSecurityGroupIngress", args
70
+ end
71
+
62
72
  def gen_authorize_target(index, target)
63
73
  if target =~ /^\d+\.\d+\.\d+.\d+\/\d+$/
64
74
  { "IpPermissions.#{index}.IpRanges.1.CidrIp" => target }
@@ -1,7 +1,7 @@
1
1
  module Stem
2
2
  module Util
3
3
  def swirl
4
- @swirl ||= Swirl::EC2.new load_config
4
+ @swirl ||= Swirl::AWS.new :ec2, load_config
5
5
  end
6
6
 
7
7
  def tagset_to_hash(tagset)
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: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter van Hardenberg
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-02-28 00:00:00 -08:00
20
+ date: 2011-03-02 00:00:00 -08:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -26,16 +26,112 @@ dependencies:
26
26
  requirement: &id001 !ruby/object:Gem::Requirement
27
27
  none: false
28
28
  requirements:
29
- - - "="
29
+ - - ~>
30
30
  - !ruby/object:Gem::Version
31
- hash: 13
31
+ hash: 1
32
32
  segments:
33
33
  - 1
34
34
  - 7
35
- - 3
36
- version: 1.7.3
35
+ - 5
36
+ version: 1.7.5
37
37
  type: :runtime
38
38
  version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
40
+ name: rspec
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ hash: 27
48
+ segments:
49
+ - 2
50
+ - 5
51
+ - 0
52
+ version: 2.5.0
53
+ type: :development
54
+ version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-core
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ hash: 27
64
+ segments:
65
+ - 2
66
+ - 5
67
+ - 0
68
+ version: 2.5.0
69
+ type: :development
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: rspec-expectations
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ hash: 27
80
+ segments:
81
+ - 2
82
+ - 5
83
+ - 0
84
+ version: 2.5.0
85
+ type: :development
86
+ version_requirements: *id004
87
+ - !ruby/object:Gem::Dependency
88
+ name: rspec-mocks
89
+ prerelease: false
90
+ requirement: &id005 !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ~>
94
+ - !ruby/object:Gem::Version
95
+ hash: 27
96
+ segments:
97
+ - 2
98
+ - 5
99
+ - 0
100
+ version: 2.5.0
101
+ type: :development
102
+ version_requirements: *id005
103
+ - !ruby/object:Gem::Dependency
104
+ name: vcr
105
+ prerelease: false
106
+ requirement: &id006 !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ~>
110
+ - !ruby/object:Gem::Version
111
+ hash: 15
112
+ segments:
113
+ - 1
114
+ - 6
115
+ - 0
116
+ version: 1.6.0
117
+ type: :development
118
+ version_requirements: *id006
119
+ - !ruby/object:Gem::Dependency
120
+ name: webmock
121
+ prerelease: false
122
+ requirement: &id007 !ruby/object:Gem::Requirement
123
+ none: false
124
+ requirements:
125
+ - - ~>
126
+ - !ruby/object:Gem::Version
127
+ hash: 11
128
+ segments:
129
+ - 1
130
+ - 6
131
+ - 2
132
+ version: 1.6.2
133
+ type: :development
134
+ version_requirements: *id007
39
135
  description: minimalist EC2 instance management
40
136
  email:
41
137
  - pvh@heroku.com