rumx 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.md +4 -0
- data/README.md +6 -0
- data/lib/rumx/bean.rb +23 -9
- metadata +1 -1
data/History.md
CHANGED
data/README.md
CHANGED
@@ -94,6 +94,12 @@ so well. Volunteers anyone?
|
|
94
94
|
|
95
95
|
Need tests! So far just doing Example Driven Development.
|
96
96
|
|
97
|
+
Bridge to JMX?
|
98
|
+
|
99
|
+
Allow validations in attribute declarations?
|
100
|
+
|
101
|
+
New types :date and :datetime?
|
102
|
+
|
97
103
|
Build in optional authentication or just let user extend Rumx::Server?
|
98
104
|
|
99
105
|
Railtie it.
|
data/lib/rumx/bean.rb
CHANGED
@@ -64,7 +64,7 @@ module Rumx
|
|
64
64
|
|
65
65
|
def bean_embed(name, description)
|
66
66
|
# We're going to ignore description (for now)
|
67
|
-
|
67
|
+
bean_embeds_local << name.to_sym
|
68
68
|
end
|
69
69
|
|
70
70
|
def bean_attr_embed(name, description)
|
@@ -74,7 +74,7 @@ module Rumx
|
|
74
74
|
|
75
75
|
def bean_embed_list(name, description)
|
76
76
|
# We're going to ignore description (for now)
|
77
|
-
|
77
|
+
bean_embed_lists_local << name.to_sym
|
78
78
|
end
|
79
79
|
|
80
80
|
def bean_attr_embed_list(name, description)
|
@@ -92,8 +92,7 @@ module Rumx
|
|
92
92
|
raise 'Invalid bean_operation format' unless arg.kind_of?(Array) && arg.size == 3
|
93
93
|
Argument.new(*arg)
|
94
94
|
end
|
95
|
-
|
96
|
-
@operations << Operation.new(name, type, description, arguments)
|
95
|
+
bean_operations_local << Operation.new(name, type, description, arguments)
|
97
96
|
end
|
98
97
|
|
99
98
|
#######
|
@@ -101,13 +100,11 @@ module Rumx
|
|
101
100
|
#######
|
102
101
|
|
103
102
|
def bean_add_attribute(attribute)
|
104
|
-
|
105
|
-
@attributes << attribute
|
103
|
+
bean_attributes_local << attribute
|
106
104
|
end
|
107
105
|
|
108
106
|
def bean_add_list_attribute(attribute)
|
109
|
-
|
110
|
-
@list_attributes << attribute
|
107
|
+
bean_list_attributes_local << attribute
|
111
108
|
end
|
112
109
|
|
113
110
|
def bean_attributes
|
@@ -147,12 +144,29 @@ module Rumx
|
|
147
144
|
end
|
148
145
|
|
149
146
|
def bean_embeds
|
150
|
-
|
147
|
+
embeds = []
|
148
|
+
self.ancestors.reverse_each do |mod|
|
149
|
+
embeds += mod.bean_embeds_local if mod.include?(Rumx::Bean)
|
150
|
+
end
|
151
|
+
return embeds
|
151
152
|
end
|
152
153
|
|
153
154
|
def bean_embed_lists
|
155
|
+
embed_lists = []
|
156
|
+
self.ancestors.reverse_each do |mod|
|
157
|
+
embed_lists += mod.bean_embed_lists_local if mod.include?(Rumx::Bean)
|
158
|
+
end
|
159
|
+
return embed_lists
|
160
|
+
end
|
161
|
+
|
162
|
+
def bean_embeds_local
|
163
|
+
@embeds ||= []
|
164
|
+
end
|
165
|
+
|
166
|
+
def bean_embed_lists_local
|
154
167
|
@embed_lists ||= []
|
155
168
|
end
|
169
|
+
|
156
170
|
end
|
157
171
|
|
158
172
|
def self.included(base)
|