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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NmYwNWFjNWNkYmMzZTZhYjJhY2QwMDAzNDgwZWZhZmZmM2Y3ODU1ZA==
4
+ MzQzOWEwYzMzM2NlOTAzMTFlZjNjOTVmODliZTVkODM5M2ZhNzA1Yg==
5
5
  data.tar.gz: !binary |-
6
- MWZlOTljOTk5YzMxZmM3NmNkMDE5ZGJkMmIzNDdiYzg1Zjg4YTE5ZA==
6
+ Yjk0MTMyNGJhNGYzZjQzOTE5NWFkM2EwNjVlYTIyOGM4OTIxNTYyMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDZlYjUzNjQyNjk3Y2JiM2QyZjUwYWMyODMxOTZiOTcwNTQ5YmU2NjJmMzAx
10
- M2M4ODg2M2JjY2YwNDMzM2UwZDQ5NmQ4YTYxYWVmYzMxMGYwODc4Zjg1OTVm
11
- MThmOTQwZDQ4YTZhYTdiMGIzZDBhNjM4Zjc3Nzc2ZDM3MjdhYzg=
9
+ NmM2MDQzOWUyOWY4M2MwMzBjZGMxODg0Zjc2MDkxZmFkMjUwY2U5MTExOTE0
10
+ YjE0ZDY2ODdmMWZjNDI3NmViNjc4YTAyMmZlYzU4ZDE0MzdiNjFlOTdlZjk5
11
+ MWJlZDZhYjk4NmI0NzM4OTMwNjg0NzI3YTI1ZDNiNGFjMWI4NDQ=
12
12
  data.tar.gz: !binary |-
13
- MTkyMjU2MmQzNjFmNTgzY2Q5ZTY4MjE1NDdiY2NiMjFiZDkyZjg2M2IxZWM5
14
- MzZmOTVkNDZkN2M2OWUzMzkxM2UwM2Q1MWEwNGI5MTExMjU0NTY0MjFhYjYx
15
- ZThhMzQyYjZjODczMzJmZmM5YmY3YTQ3Y2FiMjliNmEzYTAxN2Q=
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
- if key.is_a? Hash
12
- euca("create-tags", key.map{|key,value| "--tag #{key}=#{value}" }.join(" ") , value).first
13
- else
14
- return nil if instance_id.nil?
15
- euca("create-tags", "--tag #{key}=#{value}", instance_id).first
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
@@ -1,3 +1,3 @@
1
1
  module Euca
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
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.11
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-25 00:00:00.000000000 Z
11
+ date: 2014-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler