euca 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/euca/model.rb +15 -12
- data/lib/euca/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDE1ZjM4OGYwMGI1ODQ0ODk0NzY3NTFiMjMwZmUyYzJiMGMxNzllYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTVhY2U0ZjQ5NmE1NTFiYzMyODBmY2M5M2U3ZmQ5ZDAyNGVhMDlmNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Zjc1OGZjNGUwYWJkZGE0NDRjNTFhZTJiYzE1MDZkMDk2NzIxYTlmN2JlOTk2
|
10
|
+
OTA4ZDE4OWI4ZDhjNDIyZGZhYmI4YzcwZTY5NTI4OWU3NTBiNmU4Y2Q5OGRh
|
11
|
+
NzY2OTVjMzIwMjZlNmUwNmNjZGI5NDdmMzQ4OTMzNjQ4NDViMDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTRiYTJlYjRlOTJlOWFhNDFkOGVlOGRmMGNiOWQyNzc3ZjM2NzMyZGZmN2M5
|
14
|
+
ZDViMGNjYTczYWY2NjJiMGQ2ZDQxYmQ5NDQ0MzM1M2NhYmZmNzBlZGE3Yjll
|
15
|
+
YjhkZWEyODY1YmE0YzdlZDMyMDRhMzEwOTFlNGU1NjM1YTM2ODM=
|
data/lib/euca/model.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
require 'euca/wrapper'
|
2
2
|
require 'active_support/inflector'
|
3
|
+
require 'active_support/concern'
|
3
4
|
module Euca
|
4
5
|
module Model
|
5
6
|
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
6
9
|
module ClassMethods
|
7
10
|
|
8
11
|
def wrapper
|
@@ -40,22 +43,22 @@ module Euca
|
|
40
43
|
|
41
44
|
end
|
42
45
|
|
43
|
-
|
44
|
-
base.extend ClassMethods
|
45
|
-
end
|
46
|
+
included do
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
def persisted?
|
49
|
+
self.class.find(self.id)
|
50
|
+
end
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
|
52
|
+
def euca api, *args
|
53
|
+
wrapper.run api, *args
|
54
|
+
end
|
54
55
|
|
55
|
-
|
56
|
+
private
|
56
57
|
|
57
|
-
|
58
|
-
|
58
|
+
def wrapper
|
59
|
+
@wrapper ||= self.class.wrapper
|
60
|
+
end
|
61
|
+
|
59
62
|
end
|
60
63
|
|
61
64
|
end
|
data/lib/euca/version.rb
CHANGED