euca 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/euca/api/tag.rb +14 -6
- data/lib/euca/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzQzOWEwYzMzM2NlOTAzMTFlZjNjOTVmODliZTVkODM5M2ZhNzA1Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Yjk0MTMyNGJhNGYzZjQzOTE5NWFkM2EwNjVlYTIyOGM4OTIxNTYyMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmM2MDQzOWUyOWY4M2MwMzBjZGMxODg0Zjc2MDkxZmFkMjUwY2U5MTExOTE0
|
10
|
+
YjE0ZDY2ODdmMWZjNDI3NmViNjc4YTAyMmZlYzU4ZDE0MzdiNjFlOTdlZjk5
|
11
|
+
MWJlZDZhYjk4NmI0NzM4OTMwNjg0NzI3YTI1ZDNiNGFjMWI4NDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjcxM2Y4OTM1NDFlZGM1ZDNkM2NjYWFiMmQzOWQzYmUzNjZlZGVkMjIxMGNm
|
14
|
+
ZmNmYjdlMTU1OWQzZWI5NGRjNDcxOWQ2NjYxNjQ5NWVmYTRkOTBlZGFlOTE4
|
15
|
+
Y2ViZDU4ZTBmYmQwYmFkNjg1MDQ5YmI2YWNkY2NmMzE4NGJhZGI=
|
data/lib/euca/api/tag.rb
CHANGED
@@ -5,14 +5,22 @@ module Euca
|
|
5
5
|
include Euca::Filterable
|
6
6
|
|
7
7
|
TYPE_ID = "tag"
|
8
|
-
TYPE_ATTRS = %w(type instance_id key value)
|
8
|
+
TYPE_ATTRS = %w(type instance_id instance_type key value)
|
9
9
|
|
10
10
|
def self.create key, value, instance_id = nil
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
11
|
+
result = begin
|
12
|
+
if key.is_a? Hash
|
13
|
+
euca("create-tags", key.map{|key,value| "--tag #{key}=#{value}" }.join(" ") , value).first
|
14
|
+
else
|
15
|
+
return nil if instance_id.nil?
|
16
|
+
euca("create-tags", "--tag #{key}=#{value}", instance_id).first
|
17
|
+
end
|
18
|
+
end
|
19
|
+
if result
|
20
|
+
result['value']=result['key']
|
21
|
+
result['key']=result['instance_type']
|
22
|
+
result.delete('instance_type')
|
23
|
+
result
|
16
24
|
end
|
17
25
|
end
|
18
26
|
|
data/lib/euca/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: euca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onur Uyar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|