tengine_resource 0.5.13 → 0.5.14

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source "http://rubygems.org"
5
5
  # Example:
6
6
  # gem "activesupport", ">= 2.3.5"
7
7
 
8
- gem "tengine_support", "~> 0.3.24"
8
+ gem "tengine_support", "~> 0.3.27"
9
9
  gem "tengine_core", "~> 0.5.23"
10
10
 
11
11
  gem "wakame-adapters-tengine", "~> 0.0.0"
@@ -22,7 +22,7 @@ group :development do
22
22
  gem "rspec", "~> 2.6.0"
23
23
  gem "factory_girl", "~> 2.1.2"
24
24
  gem "yard", "~> 0.7.2"
25
- gem "bundler", "~> 1.0.18"
25
+ gem "bundler", "~> 1.1.3"
26
26
  gem "jeweler", "~> 1.6.4"
27
27
  # gem "rcov", ">= 0"
28
28
  gem "simplecov", "~> 0.5.3"
data/Gemfile.lock CHANGED
@@ -2,11 +2,11 @@ GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
4
  ZenTest (4.6.2)
5
- activemodel (3.1.3)
6
- activesupport (= 3.1.3)
5
+ activemodel (3.1.4)
6
+ activesupport (= 3.1.4)
7
7
  builder (~> 3.0.0)
8
8
  i18n (~> 0.6)
9
- activesupport (3.1.3)
9
+ activesupport (3.1.4)
10
10
  multi_json (~> 1.0)
11
11
  amq-client (0.8.7)
12
12
  amq-protocol (>= 0.8.4)
@@ -36,8 +36,8 @@ GEM
36
36
  systemu (>= 2.4.0)
37
37
  mongo (1.5.2)
38
38
  bson (= 1.5.2)
39
- mongoid (2.3.4)
40
- activemodel (~> 3.1)
39
+ mongoid (2.3.5)
40
+ activemodel (~> 3.1.0)
41
41
  mongo (~> 1.3)
42
42
  tzinfo (~> 0.3.22)
43
43
  multi_json (1.0.4)
@@ -60,8 +60,8 @@ GEM
60
60
  multi_json (~> 1.0.3)
61
61
  simplecov-html (~> 0.5.3)
62
62
  simplecov-html (0.5.3)
63
- systemu (2.4.2)
64
- tengine_core (0.5.28)
63
+ systemu (2.5.0)
64
+ tengine_core (0.5.38)
65
65
  activemodel (~> 3.1.0)
66
66
  activesupport (~> 3.1.0)
67
67
  bson (~> 1.5.2)
@@ -72,19 +72,19 @@ GEM
72
72
  selectable_attr (~> 0.3.15)
73
73
  tengine_event (~> 0.4.0)
74
74
  tengine_support (~> 0.3.12)
75
- tengine_event (0.4.6)
75
+ tengine_event (0.4.8)
76
76
  activesupport (>= 3.0.0)
77
77
  amqp (~> 0.8.0)
78
78
  tengine_support (>= 0.3.24)
79
79
  uuid (~> 2.3.4)
80
- tengine_support (0.3.24)
80
+ tengine_support (0.3.27)
81
81
  activesupport (>= 3.0.0)
82
- tzinfo (0.3.31)
82
+ tzinfo (0.3.32)
83
83
  uuid (2.3.5)
84
84
  macaddr (~> 1.0)
85
- wakame-adapters-tengine (0.0.6)
85
+ wakame-adapters-tengine (0.0.1)
86
86
  json
87
- right_aws (~> 2.1.0)
87
+ right_aws (= 2.1.0)
88
88
  rspec
89
89
  yard (0.7.5)
90
90
 
@@ -93,7 +93,7 @@ PLATFORMS
93
93
 
94
94
  DEPENDENCIES
95
95
  ZenTest (~> 4.6.2)
96
- bundler (~> 1.0.18)
96
+ bundler (~> 1.1.3)
97
97
  factory_girl (~> 2.1.2)
98
98
  jeweler (~> 1.6.4)
99
99
  net-ssh (~> 2.2.1)
@@ -101,6 +101,6 @@ DEPENDENCIES
101
101
  rspec (~> 2.6.0)
102
102
  simplecov (~> 0.5.3)
103
103
  tengine_core (~> 0.5.23)
104
- tengine_support (~> 0.3.24)
104
+ tengine_support (~> 0.3.27)
105
105
  wakame-adapters-tengine (~> 0.0.0)
106
106
  yard (~> 0.7.2)
data/README.rdoc CHANGED
@@ -17,4 +17,4 @@ tengine_event is distributed under the MPL2.0 or LGPLv3 or the dual license of M
17
17
 
18
18
  == Copyright
19
19
 
20
- Copyright (c) 2011 nautilus-technologies.com
20
+ Copyright (c) 2012 Groovenauts, Inc.
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.license = "MPL2.0/LGPLv3"
20
20
  gem.summary = %Q{tengine_resource provides physical/virtual server management}
21
21
  gem.description = %Q{tengine_resource provides physical/virtual server management}
22
- gem.email = "tengine@nautilus-technologies.com"
22
+ gem.email = "tengine-info@groovenauts.jp"
23
23
  gem.authors = %w[taigou totty g-morita shyouhei akm hiroshinakao]
24
24
  # dependencies defined in Gemfile
25
25
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.13
1
+ 0.5.14
@@ -532,9 +532,32 @@ class Tengine::Resource::Provider::Wakame < Tengine::Resource::Provider::Ec2
532
532
  result = connect do |conn|
533
533
  conn.describe_instances(uuids)
534
534
  end
535
- hash_key_convert(result, option[:convert])
535
+ result = hash_key_convert(result, option[:convert])
536
+ result.each do |r|
537
+ replace_value_of_hash(r, :private_ip_address) do |v|
538
+ v.first if v.is_a?(Array)
539
+ end
540
+ replace_value_of_hash(r, :ip_address) do |v|
541
+ "nw-data\=#{$1}" if (v =~ /^nw\-data\=\[\"(.+)\"\]$/)
542
+ end
543
+ end
544
+ result
545
+ end
546
+
547
+ private
548
+ def replace_value_of_hash(hash, key)
549
+ [key, key.to_s].each do |k|
550
+ if value = hash[k]
551
+ if result = yield(value)
552
+ hash[k] = result
553
+ return
554
+ end
555
+ end
556
+ end
536
557
  end
537
558
 
559
+ public
560
+
538
561
  def describe_images_for_api(uuids = [], option = {})
539
562
  result = connect do |conn|
540
563
  conn.describe_images(uuids)
@@ -0,0 +1,48 @@
1
+ en:
2
+ mongoid:
3
+ errors:
4
+ messages:
5
+ taken:
6
+ is already taken
7
+ document_not_found:
8
+ Document not found for class %{klass} with id(s) %{identifiers}.
9
+ invalid_database:
10
+ "Database should be a Mongo::DB, not %{name}."
11
+ invalid_options:
12
+ "Invalid option :%{invalid} provided to relation :%{name}. Valid options
13
+ are: %{valid}."
14
+ invalid_type:
15
+ Field was defined as a(n) %{klass}, but received a %{other} with
16
+ the value %{value}.
17
+ unsupported_version:
18
+ MongoDB %{version} not supported, please upgrade
19
+ to %{mongo_version}.
20
+ validations:
21
+ Validation failed - %{errors}.
22
+ invalid_collection:
23
+ Access to the collection for %{klass} is not allowed since it
24
+ is an embedded document, please access a collection from
25
+ the root document.
26
+ invalid_field:
27
+ Defining a field named %{name} is not allowed. Do not define
28
+ fields that conflict with Mongoid internal attributes or method
29
+ names. Use Mongoid.destructive_fields to see what names this includes.
30
+ too_many_nested_attribute_records:
31
+ Accepting nested attributes for %{association} is limited
32
+ to %{limit} records.
33
+ embedded_in_must_have_inverse_of:
34
+ Options for embedded_in association must include inverse_of.
35
+ dependent_only_references_one_or_many:
36
+ The dependent => destroy|delete option that was supplied
37
+ is only valid on references_one or references_many associations.
38
+ association_cant_have_inverse_of:
39
+ Defining an inverse_of on this association is not allowed. Only
40
+ use this option on embedded_in or references_many as array.
41
+ calling_document_find_with_nil_is_invalid:
42
+ Calling Document#find with nil is invalid
43
+ unsaved_document:
44
+ "You cannot call create or create! through a relational association
45
+ relation (%{document}) who's parent (%{base}) is not already saved."
46
+ mixed_relations:
47
+ Referencing a(n) %{embedded} document from the %{root} document via a
48
+ relational association is not allowed since the %{embedded} is embedded.
data/spec/spec_helper.rb CHANGED
@@ -14,6 +14,9 @@ require 'mongoid'
14
14
  Mongoid.load!(File.expand_path('mongoid.yml', File.dirname(__FILE__)))
15
15
  Mongoid.database.connection.drop_database(Mongoid.database.name)
16
16
 
17
+ I18n.backend = I18n::Backend::Simple.new
18
+ I18n.backend.load_translations(File.expand_path('mongoid_en.yml', File.dirname(__FILE__)))
19
+
17
20
  # Requires supporting files with custom matchers and macros, etc,
18
21
  # in ./support/ and its subdirectories.
19
22
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
@@ -13,6 +13,7 @@ describe Tengine::Resource::Watcher do
13
13
  :connection => {
14
14
  :host => "localhost", :port => 5672, :vhost => "/",
15
15
  :user => "guest", :pass => "guest", :logging => false,
16
+ :heartbeat_interval => 0,
16
17
  :insist => false, :auto_reconnect_delay => 1
17
18
  },
18
19
  :exchange => {
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tengine_resource"
8
- s.version = "0.5.13"
8
+ s.version = "0.5.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["taigou", "totty", "g-morita", "shyouhei", "akm", "hiroshinakao"]
12
- s.date = "2012-02-09"
12
+ s.date = "2012-05-02"
13
13
  s.description = "tengine_resource provides physical/virtual server management"
14
- s.email = "tengine@nautilus-technologies.com"
14
+ s.email = "tengine-info@groovenauts.jp"
15
15
  s.executables = ["tengine_resource_watchd"]
16
16
  s.extra_rdoc_files = [
17
17
  "README.rdoc"
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
49
49
  "lib/tengine_resource.rb",
50
50
  "spec/fixtures/goku_at_ec2_ap_northeast.rb",
51
51
  "spec/mongoid.yml",
52
+ "spec/mongoid_en.yml",
52
53
  "spec/spec_helper.rb",
53
54
  "spec/support/ec2.rb",
54
55
  "spec/support/mongo_index_key_log.rb",
@@ -127,7 +128,7 @@ Gem::Specification.new do |s|
127
128
  s.specification_version = 3
128
129
 
129
130
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
130
- s.add_runtime_dependency(%q<tengine_support>, ["~> 0.3.24"])
131
+ s.add_runtime_dependency(%q<tengine_support>, ["~> 0.3.27"])
131
132
  s.add_runtime_dependency(%q<tengine_core>, ["~> 0.5.23"])
132
133
  s.add_runtime_dependency(%q<wakame-adapters-tengine>, ["~> 0.0.0"])
133
134
  s.add_runtime_dependency(%q<right_aws>, ["~> 2.1.0"])
@@ -135,12 +136,12 @@ Gem::Specification.new do |s|
135
136
  s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
136
137
  s.add_development_dependency(%q<factory_girl>, ["~> 2.1.2"])
137
138
  s.add_development_dependency(%q<yard>, ["~> 0.7.2"])
138
- s.add_development_dependency(%q<bundler>, ["~> 1.0.18"])
139
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.3"])
139
140
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
140
141
  s.add_development_dependency(%q<simplecov>, ["~> 0.5.3"])
141
142
  s.add_development_dependency(%q<ZenTest>, ["~> 4.6.2"])
142
143
  else
143
- s.add_dependency(%q<tengine_support>, ["~> 0.3.24"])
144
+ s.add_dependency(%q<tengine_support>, ["~> 0.3.27"])
144
145
  s.add_dependency(%q<tengine_core>, ["~> 0.5.23"])
145
146
  s.add_dependency(%q<wakame-adapters-tengine>, ["~> 0.0.0"])
146
147
  s.add_dependency(%q<right_aws>, ["~> 2.1.0"])
@@ -148,13 +149,13 @@ Gem::Specification.new do |s|
148
149
  s.add_dependency(%q<rspec>, ["~> 2.6.0"])
149
150
  s.add_dependency(%q<factory_girl>, ["~> 2.1.2"])
150
151
  s.add_dependency(%q<yard>, ["~> 0.7.2"])
151
- s.add_dependency(%q<bundler>, ["~> 1.0.18"])
152
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
152
153
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
153
154
  s.add_dependency(%q<simplecov>, ["~> 0.5.3"])
154
155
  s.add_dependency(%q<ZenTest>, ["~> 4.6.2"])
155
156
  end
156
157
  else
157
- s.add_dependency(%q<tengine_support>, ["~> 0.3.24"])
158
+ s.add_dependency(%q<tengine_support>, ["~> 0.3.27"])
158
159
  s.add_dependency(%q<tengine_core>, ["~> 0.5.23"])
159
160
  s.add_dependency(%q<wakame-adapters-tengine>, ["~> 0.0.0"])
160
161
  s.add_dependency(%q<right_aws>, ["~> 2.1.0"])
@@ -162,7 +163,7 @@ Gem::Specification.new do |s|
162
163
  s.add_dependency(%q<rspec>, ["~> 2.6.0"])
163
164
  s.add_dependency(%q<factory_girl>, ["~> 2.1.2"])
164
165
  s.add_dependency(%q<yard>, ["~> 0.7.2"])
165
- s.add_dependency(%q<bundler>, ["~> 1.0.18"])
166
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
166
167
  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
167
168
  s.add_dependency(%q<simplecov>, ["~> 0.5.3"])
168
169
  s.add_dependency(%q<ZenTest>, ["~> 4.6.2"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tengine_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.13
4
+ version: 0.5.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,22 +14,22 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2012-02-09 00:00:00.000000000Z
17
+ date: 2012-05-02 00:00:00.000000000Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: tengine_support
21
- requirement: &2166822140 !ruby/object:Gem::Requirement
21
+ requirement: &2154181620 !ruby/object:Gem::Requirement
22
22
  none: false
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.24
26
+ version: 0.3.27
27
27
  type: :runtime
28
28
  prerelease: false
29
- version_requirements: *2166822140
29
+ version_requirements: *2154181620
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: tengine_core
32
- requirement: &2166821160 !ruby/object:Gem::Requirement
32
+ requirement: &2154180540 !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
35
35
  - - ~>
@@ -37,10 +37,10 @@ dependencies:
37
37
  version: 0.5.23
38
38
  type: :runtime
39
39
  prerelease: false
40
- version_requirements: *2166821160
40
+ version_requirements: *2154180540
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: wakame-adapters-tengine
43
- requirement: &2166819080 !ruby/object:Gem::Requirement
43
+ requirement: &2154179720 !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements:
46
46
  - - ~>
@@ -48,10 +48,10 @@ dependencies:
48
48
  version: 0.0.0
49
49
  type: :runtime
50
50
  prerelease: false
51
- version_requirements: *2166819080
51
+ version_requirements: *2154179720
52
52
  - !ruby/object:Gem::Dependency
53
53
  name: right_aws
54
- requirement: &2166818080 !ruby/object:Gem::Requirement
54
+ requirement: &2154178940 !ruby/object:Gem::Requirement
55
55
  none: false
56
56
  requirements:
57
57
  - - ~>
@@ -59,10 +59,10 @@ dependencies:
59
59
  version: 2.1.0
60
60
  type: :runtime
61
61
  prerelease: false
62
- version_requirements: *2166818080
62
+ version_requirements: *2154178940
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: net-ssh
65
- requirement: &2166816880 !ruby/object:Gem::Requirement
65
+ requirement: &2154178000 !ruby/object:Gem::Requirement
66
66
  none: false
67
67
  requirements:
68
68
  - - ~>
@@ -70,10 +70,10 @@ dependencies:
70
70
  version: 2.2.1
71
71
  type: :runtime
72
72
  prerelease: false
73
- version_requirements: *2166816880
73
+ version_requirements: *2154178000
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: rspec
76
- requirement: &2166815800 !ruby/object:Gem::Requirement
76
+ requirement: &2154177380 !ruby/object:Gem::Requirement
77
77
  none: false
78
78
  requirements:
79
79
  - - ~>
@@ -81,10 +81,10 @@ dependencies:
81
81
  version: 2.6.0
82
82
  type: :development
83
83
  prerelease: false
84
- version_requirements: *2166815800
84
+ version_requirements: *2154177380
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: factory_girl
87
- requirement: &2166815240 !ruby/object:Gem::Requirement
87
+ requirement: &2154176700 !ruby/object:Gem::Requirement
88
88
  none: false
89
89
  requirements:
90
90
  - - ~>
@@ -92,10 +92,10 @@ dependencies:
92
92
  version: 2.1.2
93
93
  type: :development
94
94
  prerelease: false
95
- version_requirements: *2166815240
95
+ version_requirements: *2154176700
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: yard
98
- requirement: &2166814600 !ruby/object:Gem::Requirement
98
+ requirement: &2154174100 !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
101
101
  - - ~>
@@ -103,21 +103,21 @@ dependencies:
103
103
  version: 0.7.2
104
104
  type: :development
105
105
  prerelease: false
106
- version_requirements: *2166814600
106
+ version_requirements: *2154174100
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: bundler
109
- requirement: &2166805000 !ruby/object:Gem::Requirement
109
+ requirement: &2154173140 !ruby/object:Gem::Requirement
110
110
  none: false
111
111
  requirements:
112
112
  - - ~>
113
113
  - !ruby/object:Gem::Version
114
- version: 1.0.18
114
+ version: 1.1.3
115
115
  type: :development
116
116
  prerelease: false
117
- version_requirements: *2166805000
117
+ version_requirements: *2154173140
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: jeweler
120
- requirement: &2166802400 !ruby/object:Gem::Requirement
120
+ requirement: &2154172400 !ruby/object:Gem::Requirement
121
121
  none: false
122
122
  requirements:
123
123
  - - ~>
@@ -125,10 +125,10 @@ dependencies:
125
125
  version: 1.6.4
126
126
  type: :development
127
127
  prerelease: false
128
- version_requirements: *2166802400
128
+ version_requirements: *2154172400
129
129
  - !ruby/object:Gem::Dependency
130
130
  name: simplecov
131
- requirement: &2166801200 !ruby/object:Gem::Requirement
131
+ requirement: &2154170820 !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements:
134
134
  - - ~>
@@ -136,10 +136,10 @@ dependencies:
136
136
  version: 0.5.3
137
137
  type: :development
138
138
  prerelease: false
139
- version_requirements: *2166801200
139
+ version_requirements: *2154170820
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: ZenTest
142
- requirement: &2166799720 !ruby/object:Gem::Requirement
142
+ requirement: &2154169680 !ruby/object:Gem::Requirement
143
143
  none: false
144
144
  requirements:
145
145
  - - ~>
@@ -147,9 +147,9 @@ dependencies:
147
147
  version: 4.6.2
148
148
  type: :development
149
149
  prerelease: false
150
- version_requirements: *2166799720
150
+ version_requirements: *2154169680
151
151
  description: tengine_resource provides physical/virtual server management
152
- email: tengine@nautilus-technologies.com
152
+ email: tengine-info@groovenauts.jp
153
153
  executables:
154
154
  - tengine_resource_watchd
155
155
  extensions: []
@@ -188,6 +188,7 @@ files:
188
188
  - lib/tengine_resource.rb
189
189
  - spec/fixtures/goku_at_ec2_ap_northeast.rb
190
190
  - spec/mongoid.yml
191
+ - spec/mongoid_en.yml
191
192
  - spec/spec_helper.rb
192
193
  - spec/support/ec2.rb
193
194
  - spec/support/mongo_index_key_log.rb
@@ -270,7 +271,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
271
  version: '0'
271
272
  segments:
272
273
  - 0
273
- hash: 1325199428952747449
274
+ hash: -1693079788214414263
274
275
  required_rubygems_version: !ruby/object:Gem::Requirement
275
276
  none: false
276
277
  requirements: