rumx 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/History.md +4 -0
  2. data/README.md +6 -0
  3. data/lib/rumx/bean.rb +23 -9
  4. metadata +1 -1
data/History.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Rumx Changelog
2
2
  =====================
3
3
 
4
+ 0.0.4
5
+
6
+ - Fix bug where embedded beans and bean-lists of base classes weren't included.
7
+
4
8
  0.0.3
5
9
 
6
10
  - Use msec instead of sec for Timer bean.
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
- bean_embeds << name.to_sym
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
- bean_embed_lists << name.to_sym
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
- @operations ||= []
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
- @attributes ||= []
105
- @attributes << attribute
103
+ bean_attributes_local << attribute
106
104
  end
107
105
 
108
106
  def bean_add_list_attribute(attribute)
109
- @list_attributes ||= []
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
- @embeds ||= []
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)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rumx
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brad Pardee