cascading_configuration 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cascading_configuration/core/enable_module_support.rb +0 -1
- data/lib/cascading_configuration/core/instance_controller.rb +52 -114
- data/spec/cascading_configuration/array/sorted/unique_spec.rb +4 -4
- data/spec/cascading_configuration/array/sorted_spec.rb +4 -4
- data/spec/cascading_configuration/array/unique_spec.rb +4 -4
- data/spec/cascading_configuration/array_spec.rb +4 -4
- data/spec/cascading_configuration/core/instance_controller_spec.rb +0 -9
- data/spec/cascading_configuration/hash_spec.rb +4 -4
- data/spec/cascading_configuration/setting_spec.rb +4 -4
- metadata +2 -2
@@ -13,7 +13,6 @@ module ::CascadingConfiguration::Core::EnableModuleSupport
|
|
13
13
|
unless instance_controller = ::CascadingConfiguration::Core::InstanceController.instance_controller( instance )
|
14
14
|
instance_controller = ::CascadingConfiguration::Core::InstanceController.new( instance,
|
15
15
|
@default_encapsulation,
|
16
|
-
:Controller,
|
17
16
|
true )
|
18
17
|
end
|
19
18
|
|
@@ -1,8 +1,6 @@
|
|
1
1
|
|
2
2
|
class ::CascadingConfiguration::Core::InstanceController < ::Module
|
3
3
|
|
4
|
-
include ::ParallelAncestry::Inheritance
|
5
|
-
|
6
4
|
@instance_controller = { }
|
7
5
|
|
8
6
|
#####################################
|
@@ -12,7 +10,6 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
12
10
|
def self.create_instance_controller( instance,
|
13
11
|
default_encapsulation_or_name = ::CascadingConfiguration::Core::
|
14
12
|
Module::DefaultEncapsulation,
|
15
|
-
constant = :Controller,
|
16
13
|
extending = false )
|
17
14
|
|
18
15
|
instance_controller = nil
|
@@ -71,19 +68,12 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
71
68
|
|
72
69
|
def initialize( instance,
|
73
70
|
default_encapsulation_or_name = ::CascadingConfiguration::Core::Module::DefaultEncapsulation,
|
74
|
-
constant = :Controller,
|
75
71
|
extending = false )
|
76
72
|
|
77
|
-
|
78
|
-
super()
|
79
|
-
|
80
|
-
@instance = instance.extend( self )
|
73
|
+
@instance = instance.extend( ::Module::Cluster )
|
81
74
|
|
82
75
|
if @instance.is_a?( ::Module )
|
83
|
-
initialize_constant_in_instance
|
84
|
-
unless extending
|
85
|
-
initialize_inheritance( @instance )
|
86
|
-
end
|
76
|
+
initialize_constant_in_instance
|
87
77
|
else
|
88
78
|
initialize_constant_in_self
|
89
79
|
end
|
@@ -101,22 +91,22 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
101
91
|
# We also support arbitrary additional encapsulations.
|
102
92
|
@encapsulations = { }
|
103
93
|
|
104
|
-
@cascade_includes = ::Array::Unique.new( self )
|
105
|
-
@cascade_extends = ::Array::Unique.new( self )
|
106
|
-
|
107
94
|
@support_modules = { }
|
108
95
|
|
109
96
|
@extension_modules = { }
|
97
|
+
|
98
|
+
# create a cascading block to register configurations for parent at include/extend
|
99
|
+
initialize_inheritance_for_instance( @instance, extending )
|
110
100
|
|
111
101
|
end
|
112
|
-
|
102
|
+
|
113
103
|
#################################
|
114
104
|
# initialize_constant_in_self #
|
115
105
|
#################################
|
116
106
|
|
117
|
-
def initialize_constant_in_instance
|
107
|
+
def initialize_constant_in_instance
|
118
108
|
|
119
|
-
@instance.const_set(
|
109
|
+
@instance.const_set( :Controller, self )
|
120
110
|
|
121
111
|
end
|
122
112
|
|
@@ -133,103 +123,62 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
133
123
|
return self
|
134
124
|
|
135
125
|
end
|
136
|
-
|
137
|
-
####################################
|
138
|
-
# initialize_inheriting_instance #
|
139
|
-
####################################
|
140
|
-
|
141
|
-
def initialize_inheriting_instance( parent_instance, instance, for_subclass = false, is_extending = false )
|
142
126
|
|
143
|
-
|
127
|
+
#########################################
|
128
|
+
# initialize_inheritance_for_instance #
|
129
|
+
#########################################
|
130
|
+
|
131
|
+
def initialize_inheritance_for_instance( instance, extending = false )
|
144
132
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
133
|
+
unless instance.is_a?( ::Module::Cluster ) and instance.has_cluster?( :cascading_configuration_inheritance )
|
134
|
+
|
135
|
+
instance.extend( ::Module::Cluster )
|
136
|
+
|
137
|
+
reference_to_self = self
|
138
|
+
|
139
|
+
case instance
|
140
|
+
|
141
|
+
when ::Class
|
142
|
+
|
143
|
+
instance.cluster( :cascading_configuration_inheritance ).subclass do |inheriting_instance|
|
144
|
+
reference_to_self.initialize_inheriting_instance( self, inheriting_instance )
|
145
|
+
end
|
146
|
+
|
147
|
+
when ::Module
|
148
|
+
|
149
|
+
unless extending
|
156
150
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
def initialize_inheriting_instance_includes_extends( parent_instance, instance, is_extending = false )
|
151
|
+
instance.cluster( :cascading_configuration_inheritance ).after_include do |inheriting_instance|
|
152
|
+
reference_to_self.initialize_inheriting_instance( self, inheriting_instance )
|
153
|
+
reference_to_self.initialize_inheritance_for_instance( inheriting_instance )
|
154
|
+
end
|
162
155
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
unless @cascade_includes.empty?
|
156
|
+
instance.cluster( :cascading_configuration_inheritance ).after_extend do |inheriting_instance|
|
157
|
+
reference_to_self.initialize_inheriting_instance( self, inheriting_instance )
|
158
|
+
end
|
168
159
|
|
169
|
-
|
170
|
-
|
171
|
-
else
|
172
|
-
initialize_inheriting_instance_includes( parent_instance, instance )
|
160
|
+
end
|
161
|
+
|
173
162
|
end
|
174
163
|
|
175
164
|
end
|
176
165
|
|
177
166
|
end
|
167
|
+
|
168
|
+
####################################
|
169
|
+
# initialize_inheriting_instance #
|
170
|
+
####################################
|
178
171
|
|
179
|
-
|
180
|
-
# initialize_inheriting_instance_includes #
|
181
|
-
#############################################
|
182
|
-
|
183
|
-
def initialize_inheriting_instance_includes( parent_instance, instance )
|
172
|
+
def initialize_inheriting_instance( parent_instance, instance )
|
184
173
|
|
185
|
-
|
186
|
-
|
187
|
-
instance.module_eval do
|
188
|
-
# We collect cascade extends in accumulating order (oldest => youngest),
|
189
|
-
# which means we need to reverse prior to including/extending
|
190
|
-
# (we need youngest => oldest).
|
191
|
-
include( *cascade_includes.reverse )
|
192
|
-
end
|
193
|
-
|
194
|
-
end
|
195
|
-
|
196
|
-
############################################
|
197
|
-
# initialize_inheriting_instance_extends #
|
198
|
-
############################################
|
199
|
-
|
200
|
-
def initialize_inheriting_instance_extends( parent_instance, instance )
|
201
|
-
|
202
|
-
# We collect cascade extends in accumulating order (oldest => youngest),
|
203
|
-
# which means we need to reverse prior to including/extending
|
204
|
-
# (we need youngest => oldest).
|
205
|
-
instance.extend( *@cascade_extends.reverse )
|
206
|
-
|
207
|
-
end
|
208
|
-
|
209
|
-
##################################################################
|
210
|
-
# initialize_inheriting_instance_includes_for_extend_crossover #
|
211
|
-
##################################################################
|
212
|
-
|
213
|
-
###
|
214
|
-
# Normally we have module => module cascading where instance methods remain instance methods,
|
215
|
-
# and singleton methods remain singleton methods. When a module extends another, however,
|
216
|
-
# instance methods become singleton methods.
|
217
|
-
#
|
218
|
-
def initialize_inheriting_instance_includes_for_extend_crossover( parent_instance, instance )
|
174
|
+
initialize_encapsulation_for_inheriting_instance( @default_encapsulation, parent_instance, instance )
|
219
175
|
|
220
|
-
@
|
221
|
-
|
222
|
-
when ::Module
|
223
|
-
unless instance.ancestors.include?( this_include )
|
224
|
-
instance.extend( this_include )
|
225
|
-
end
|
226
|
-
else
|
227
|
-
instance.extend( this_include )
|
228
|
-
end
|
176
|
+
@encapsulations.each do |this_encapsulation_name, this_encapsulation|
|
177
|
+
initialize_encapsulations_for_inheriting_instance( this_encapsulation, parent_instance, instance )
|
229
178
|
end
|
230
179
|
|
231
180
|
end
|
232
|
-
|
181
|
+
|
233
182
|
######################################################
|
234
183
|
# initialize_encapsulation_for_inheriting_instance #
|
235
184
|
######################################################
|
@@ -252,18 +201,6 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
252
201
|
|
253
202
|
attr_reader :instance
|
254
203
|
|
255
|
-
######################
|
256
|
-
# cascade_includes #
|
257
|
-
######################
|
258
|
-
|
259
|
-
attr_reader :cascade_includes
|
260
|
-
|
261
|
-
#####################
|
262
|
-
# cascade_extends #
|
263
|
-
#####################
|
264
|
-
|
265
|
-
attr_reader :cascade_extends
|
266
|
-
|
267
204
|
###########################
|
268
205
|
# add_extension_modules #
|
269
206
|
###########################
|
@@ -383,11 +320,11 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
383
320
|
# Cascades
|
384
321
|
|
385
322
|
if should_cascade_includes
|
386
|
-
@
|
323
|
+
@instance.cluster( :cascading_configuration ).after_include.cascade.include( support_module_instance )
|
387
324
|
end
|
388
325
|
|
389
326
|
if should_cascade_extends
|
390
|
-
@
|
327
|
+
@instance.cluster( :cascading_configuration ).after_include.cascade.extend( support_module_instance )
|
391
328
|
end
|
392
329
|
|
393
330
|
# Includes/Extends
|
@@ -687,7 +624,8 @@ class ::CascadingConfiguration::Core::InstanceController < ::Module
|
|
687
624
|
|
688
625
|
def alias_local_instance_method( alias_name,
|
689
626
|
name,
|
690
|
-
encapsulation_or_name = ::CascadingConfiguration::Core::
|
627
|
+
encapsulation_or_name = ::CascadingConfiguration::Core::
|
628
|
+
Module::DefaultEncapsulation )
|
691
629
|
|
692
630
|
aliased_method = false
|
693
631
|
|
@@ -37,7 +37,7 @@ describe CascadingConfiguration::Array::Sorted::Unique do
|
|
37
37
|
module SubmoduleIncluding
|
38
38
|
include CascadingConfiguration::Array::Sorted::Unique::ConfigurationMockModuleExtended
|
39
39
|
method_defined?( :configuration_setting ).should == false
|
40
|
-
respond_to?( :configuration_setting ).should ==
|
40
|
+
respond_to?( :configuration_setting ).should == true
|
41
41
|
instance_variables.empty?.should == true
|
42
42
|
end
|
43
43
|
# => extending modules and classes get nothing
|
@@ -51,7 +51,7 @@ describe CascadingConfiguration::Array::Sorted::Unique do
|
|
51
51
|
class ClassIncluding
|
52
52
|
include CascadingConfiguration::Array::Sorted::Unique::ConfigurationMockModuleExtended
|
53
53
|
method_defined?( :configuration_setting ).should == false
|
54
|
-
respond_to?( :configuration_setting ).should ==
|
54
|
+
respond_to?( :configuration_setting ).should == true
|
55
55
|
instance_variables.empty?.should == true
|
56
56
|
end
|
57
57
|
class ClassExtending
|
@@ -215,7 +215,7 @@ describe CascadingConfiguration::Array::Sorted::Unique do
|
|
215
215
|
module SubmoduleIncluding
|
216
216
|
include CascadingConfiguration::Array::Sorted::Unique::ClassConfigurationMockModuleExtended
|
217
217
|
method_defined?( :configuration_setting ).should == false
|
218
|
-
respond_to?( :configuration_setting ).should ==
|
218
|
+
respond_to?( :configuration_setting ).should == true
|
219
219
|
instance_variables.empty?.should == true
|
220
220
|
end
|
221
221
|
# => extending modules and classes get nothing
|
@@ -229,7 +229,7 @@ describe CascadingConfiguration::Array::Sorted::Unique do
|
|
229
229
|
class ClassIncluding
|
230
230
|
include CascadingConfiguration::Array::Sorted::Unique::ClassConfigurationMockModuleExtended
|
231
231
|
method_defined?( :configuration_setting ).should == false
|
232
|
-
respond_to?( :configuration_setting ).should ==
|
232
|
+
respond_to?( :configuration_setting ).should == true
|
233
233
|
instance_variables.empty?.should == true
|
234
234
|
end
|
235
235
|
class ClassExtending
|
@@ -37,7 +37,7 @@ describe CascadingConfiguration::Array::Sorted do
|
|
37
37
|
module SubmoduleIncluding
|
38
38
|
include CascadingConfiguration::Array::Sorted::ConfigurationMockModuleExtended
|
39
39
|
method_defined?( :configuration_setting ).should == false
|
40
|
-
respond_to?( :configuration_setting ).should ==
|
40
|
+
respond_to?( :configuration_setting ).should == true
|
41
41
|
instance_variables.empty?.should == true
|
42
42
|
end
|
43
43
|
# => extending modules and classes get nothing
|
@@ -51,7 +51,7 @@ describe CascadingConfiguration::Array::Sorted do
|
|
51
51
|
class ClassIncluding
|
52
52
|
include CascadingConfiguration::Array::Sorted::ConfigurationMockModuleExtended
|
53
53
|
method_defined?( :configuration_setting ).should == false
|
54
|
-
respond_to?( :configuration_setting ).should ==
|
54
|
+
respond_to?( :configuration_setting ).should == true
|
55
55
|
instance_variables.empty?.should == true
|
56
56
|
end
|
57
57
|
class ClassExtending
|
@@ -215,7 +215,7 @@ describe CascadingConfiguration::Array::Sorted do
|
|
215
215
|
module SubmoduleIncluding
|
216
216
|
include CascadingConfiguration::Array::Sorted::ClassConfigurationMockModuleExtended
|
217
217
|
method_defined?( :configuration_setting ).should == false
|
218
|
-
respond_to?( :configuration_setting ).should ==
|
218
|
+
respond_to?( :configuration_setting ).should == true
|
219
219
|
instance_variables.empty?.should == true
|
220
220
|
end
|
221
221
|
# => extending modules and classes get nothing
|
@@ -229,7 +229,7 @@ describe CascadingConfiguration::Array::Sorted do
|
|
229
229
|
class ClassIncluding
|
230
230
|
include CascadingConfiguration::Array::Sorted::ClassConfigurationMockModuleExtended
|
231
231
|
method_defined?( :configuration_setting ).should == false
|
232
|
-
respond_to?( :configuration_setting ).should ==
|
232
|
+
respond_to?( :configuration_setting ).should == true
|
233
233
|
instance_variables.empty?.should == true
|
234
234
|
end
|
235
235
|
class ClassExtending
|
@@ -37,7 +37,7 @@ describe CascadingConfiguration::Array::Unique do
|
|
37
37
|
module SubmoduleIncluding
|
38
38
|
include CascadingConfiguration::Array::Unique::ConfigurationMockModuleExtended
|
39
39
|
method_defined?( :configuration_setting ).should == false
|
40
|
-
respond_to?( :configuration_setting ).should ==
|
40
|
+
respond_to?( :configuration_setting ).should == true
|
41
41
|
instance_variables.empty?.should == true
|
42
42
|
end
|
43
43
|
# => extending modules and classes get nothing
|
@@ -51,7 +51,7 @@ describe CascadingConfiguration::Array::Unique do
|
|
51
51
|
class ClassIncluding
|
52
52
|
include CascadingConfiguration::Array::Unique::ConfigurationMockModuleExtended
|
53
53
|
method_defined?( :configuration_setting ).should == false
|
54
|
-
respond_to?( :configuration_setting ).should ==
|
54
|
+
respond_to?( :configuration_setting ).should == true
|
55
55
|
instance_variables.empty?.should == true
|
56
56
|
end
|
57
57
|
class ClassExtending
|
@@ -219,7 +219,7 @@ describe CascadingConfiguration::Array::Unique do
|
|
219
219
|
module SubmoduleIncluding
|
220
220
|
include CascadingConfiguration::Array::Unique::ClassConfigurationMockModuleExtended
|
221
221
|
method_defined?( :configuration_setting ).should == false
|
222
|
-
respond_to?( :configuration_setting ).should ==
|
222
|
+
respond_to?( :configuration_setting ).should == true
|
223
223
|
instance_variables.empty?.should == true
|
224
224
|
end
|
225
225
|
# => extending modules and classes get nothing
|
@@ -233,7 +233,7 @@ describe CascadingConfiguration::Array::Unique do
|
|
233
233
|
class ClassIncluding
|
234
234
|
include CascadingConfiguration::Array::Unique::ClassConfigurationMockModuleExtended
|
235
235
|
method_defined?( :configuration_setting ).should == false
|
236
|
-
respond_to?( :configuration_setting ).should ==
|
236
|
+
respond_to?( :configuration_setting ).should == true
|
237
237
|
instance_variables.empty?.should == true
|
238
238
|
end
|
239
239
|
class ClassExtending
|
@@ -37,7 +37,7 @@ describe CascadingConfiguration::Array do
|
|
37
37
|
module SubmoduleIncluding
|
38
38
|
include CascadingConfiguration::Array::ConfigurationMockModuleExtended
|
39
39
|
method_defined?( :configuration_setting ).should == false
|
40
|
-
respond_to?( :configuration_setting ).should ==
|
40
|
+
respond_to?( :configuration_setting ).should == true
|
41
41
|
instance_variables.empty?.should == true
|
42
42
|
end
|
43
43
|
# => extending modules and classes get nothing
|
@@ -51,7 +51,7 @@ describe CascadingConfiguration::Array do
|
|
51
51
|
class ClassIncluding
|
52
52
|
include CascadingConfiguration::Array::ConfigurationMockModuleExtended
|
53
53
|
method_defined?( :configuration_setting ).should == false
|
54
|
-
respond_to?( :configuration_setting ).should ==
|
54
|
+
respond_to?( :configuration_setting ).should == true
|
55
55
|
instance_variables.empty?.should == true
|
56
56
|
end
|
57
57
|
class ClassExtending
|
@@ -215,7 +215,7 @@ describe CascadingConfiguration::Array do
|
|
215
215
|
module SubmoduleIncluding
|
216
216
|
include CascadingConfiguration::Array::ClassConfigurationMockModuleExtended
|
217
217
|
method_defined?( :configuration_setting ).should == false
|
218
|
-
respond_to?( :configuration_setting ).should ==
|
218
|
+
respond_to?( :configuration_setting ).should == true
|
219
219
|
instance_variables.empty?.should == true
|
220
220
|
end
|
221
221
|
# => extending modules and classes get nothing
|
@@ -229,7 +229,7 @@ describe CascadingConfiguration::Array do
|
|
229
229
|
class ClassIncluding
|
230
230
|
include CascadingConfiguration::Array::ClassConfigurationMockModuleExtended
|
231
231
|
method_defined?( :configuration_setting ).should == false
|
232
|
-
respond_to?( :configuration_setting ).should ==
|
232
|
+
respond_to?( :configuration_setting ).should == true
|
233
233
|
instance_variables.empty?.should == true
|
234
234
|
end
|
235
235
|
class ClassExtending
|
@@ -136,32 +136,24 @@ describe ::CascadingConfiguration::Core::InstanceController do
|
|
136
136
|
InstanceController.support( :include ).should == ModuleInstance_Include
|
137
137
|
ForInstance.ancestors.include?( ModuleInstance_Include ).should == true
|
138
138
|
ForInstance.is_a?( ModuleInstance_Include ).should == false
|
139
|
-
InstanceController.cascade_includes.include?( ModuleInstance_Include ).should == false
|
140
|
-
InstanceController.cascade_extends.include?( ModuleInstance_Include ).should == false
|
141
139
|
|
142
140
|
# should_extend
|
143
141
|
ModuleInstance_Extend = InstanceController.create_support( :extend, Encapsulation, false, nil, true, false, false )
|
144
142
|
InstanceController.support( :extend ).should == ModuleInstance_Extend
|
145
143
|
ForInstance.ancestors.include?( ModuleInstance_Extend ).should == false
|
146
144
|
ForInstance.is_a?( ModuleInstance_Extend ).should == true
|
147
|
-
InstanceController.cascade_includes.include?( ModuleInstance_Extend ).should == false
|
148
|
-
InstanceController.cascade_extends.include?( ModuleInstance_Extend ).should == false
|
149
145
|
|
150
146
|
# should_cascade_includes
|
151
147
|
ModuleInstance_CascadeIncludes = InstanceController.create_support( :cascade_includes, Encapsulation, false, nil, false, true, false )
|
152
148
|
InstanceController.support( :cascade_includes ).should == ModuleInstance_CascadeIncludes
|
153
149
|
ForInstance.ancestors.include?( ModuleInstance_CascadeIncludes ).should == false
|
154
150
|
ForInstance.is_a?( ModuleInstance_CascadeIncludes ).should == false
|
155
|
-
InstanceController.cascade_includes.include?( ModuleInstance_CascadeIncludes ).should == true
|
156
|
-
InstanceController.cascade_extends.include?( ModuleInstance_CascadeIncludes ).should == false
|
157
151
|
|
158
152
|
# should_cascade_extends
|
159
153
|
ModuleInstance_CascadeExtends = InstanceController.create_support( :cascade_extends, Encapsulation, nil, false, false, false, true )
|
160
154
|
InstanceController.support( :cascade_extends ).should == ModuleInstance_CascadeExtends
|
161
155
|
ForInstance.ancestors.include?( ModuleInstance_CascadeExtends ).should == false
|
162
156
|
ForInstance.is_a?( ModuleInstance_CascadeExtends ).should == false
|
163
|
-
InstanceController.cascade_includes.include?( ModuleInstance_CascadeExtends ).should == false
|
164
|
-
InstanceController.cascade_extends.include?( ModuleInstance_CascadeExtends ).should == true
|
165
157
|
|
166
158
|
AnotherModule_IncludeA = ::Module.new
|
167
159
|
AnotherModule_IncludeA.instance_eval do
|
@@ -197,7 +189,6 @@ describe ::CascadingConfiguration::Core::InstanceController do
|
|
197
189
|
extend ForInstance
|
198
190
|
eigenclass = class << self ; self ; end
|
199
191
|
eigenclass.ancestors.include?( ModuleInstance_CascadeExtends ).should == false
|
200
|
-
eigenclass.ancestors.include?( ModuleInstance_CascadeIncludes ).should == true
|
201
192
|
end
|
202
193
|
AnotherModule_ExtendB = ::Module.new
|
203
194
|
AnotherModule_ExtendB.instance_eval do
|
@@ -37,7 +37,7 @@ describe CascadingConfiguration::Hash do
|
|
37
37
|
module SubmoduleIncluding
|
38
38
|
include CascadingConfiguration::Hash::ConfigurationMockModuleExtended
|
39
39
|
method_defined?( :configuration_setting ).should == false
|
40
|
-
respond_to?( :configuration_setting ).should ==
|
40
|
+
respond_to?( :configuration_setting ).should == true
|
41
41
|
instance_variables.empty?.should == true
|
42
42
|
end
|
43
43
|
# => extending modules and classes get nothing
|
@@ -51,7 +51,7 @@ describe CascadingConfiguration::Hash do
|
|
51
51
|
class ClassIncluding
|
52
52
|
include CascadingConfiguration::Hash::ConfigurationMockModuleExtended
|
53
53
|
method_defined?( :configuration_setting ).should == false
|
54
|
-
respond_to?( :configuration_setting ).should ==
|
54
|
+
respond_to?( :configuration_setting ).should == true
|
55
55
|
instance_variables.empty?.should == true
|
56
56
|
end
|
57
57
|
class ClassExtending
|
@@ -273,7 +273,7 @@ describe CascadingConfiguration::Hash do
|
|
273
273
|
module SubmoduleIncluding
|
274
274
|
include CascadingConfiguration::Hash::ClassConfigurationMockModuleExtended
|
275
275
|
method_defined?( :configuration_setting ).should == false
|
276
|
-
respond_to?( :configuration_setting ).should ==
|
276
|
+
respond_to?( :configuration_setting ).should == true
|
277
277
|
instance_variables.empty?.should == true
|
278
278
|
end
|
279
279
|
# => extending modules and classes get nothing
|
@@ -287,7 +287,7 @@ describe CascadingConfiguration::Hash do
|
|
287
287
|
class ClassIncluding
|
288
288
|
include CascadingConfiguration::Hash::ClassConfigurationMockModuleExtended
|
289
289
|
method_defined?( :configuration_setting ).should == false
|
290
|
-
respond_to?( :configuration_setting ).should ==
|
290
|
+
respond_to?( :configuration_setting ).should == true
|
291
291
|
instance_variables.empty?.should == true
|
292
292
|
end
|
293
293
|
class ClassExtending
|
@@ -32,7 +32,7 @@ describe CascadingConfiguration::Setting do
|
|
32
32
|
module SubmoduleIncluding
|
33
33
|
include CascadingConfiguration::Setting::ConfigurationMockExtended
|
34
34
|
method_defined?( :some_configuration ).should == false
|
35
|
-
respond_to?( :some_configuration ).should ==
|
35
|
+
respond_to?( :some_configuration ).should == true
|
36
36
|
instance_variables.empty?.should == true
|
37
37
|
end
|
38
38
|
# => extending modules and classes get nothing
|
@@ -46,7 +46,7 @@ describe CascadingConfiguration::Setting do
|
|
46
46
|
class ClassIncluding
|
47
47
|
include CascadingConfiguration::Setting::ConfigurationMockExtended
|
48
48
|
method_defined?( :some_configuration ).should == false
|
49
|
-
respond_to?( :some_configuration ).should ==
|
49
|
+
respond_to?( :some_configuration ).should == true
|
50
50
|
instance_variables.empty?.should == true
|
51
51
|
end
|
52
52
|
class ClassExtending
|
@@ -194,7 +194,7 @@ describe CascadingConfiguration::Setting do
|
|
194
194
|
module SubmoduleIncluding
|
195
195
|
include CascadingConfiguration::Setting::ClassConfigurationMockExtended
|
196
196
|
method_defined?( :some_configuration ).should == false
|
197
|
-
respond_to?( :some_configuration ).should ==
|
197
|
+
respond_to?( :some_configuration ).should == true
|
198
198
|
instance_variables.empty?.should == true
|
199
199
|
end
|
200
200
|
# => extending modules and classes get nothing
|
@@ -208,7 +208,7 @@ describe CascadingConfiguration::Setting do
|
|
208
208
|
class ClassIncluding
|
209
209
|
include CascadingConfiguration::Setting::ClassConfigurationMockExtended
|
210
210
|
method_defined?( :some_configuration ).should == false
|
211
|
-
respond_to?( :some_configuration ).should ==
|
211
|
+
respond_to?( :some_configuration ).should == true
|
212
212
|
instance_variables.empty?.should == true
|
213
213
|
end
|
214
214
|
class ClassExtending
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cascading_configuration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: module-cluster
|