cascading_configuration 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +40 -0
- data/README.md +211 -0
- data/lib/cascading_configuration/array/sorted/unique.rb +110 -0
- data/lib/cascading_configuration/array/sorted.rb +106 -0
- data/lib/cascading_configuration/array/unique.rb +106 -0
- data/lib/cascading_configuration/array.rb +103 -0
- data/lib/cascading_configuration/core/enable_instance_support.rb +22 -0
- data/lib/cascading_configuration/core/enable_module_support.rb +24 -0
- data/lib/cascading_configuration/core/encapsulation.rb +343 -0
- data/lib/cascading_configuration/core/instance_controller/extension_module.rb +38 -0
- data/lib/cascading_configuration/core/instance_controller/support_module/instance_support_module.rb +21 -0
- data/lib/cascading_configuration/core/instance_controller/support_module/singleton_support_module.rb +21 -0
- data/lib/cascading_configuration/core/instance_controller/support_module.rb +253 -0
- data/lib/cascading_configuration/core/instance_controller.rb +840 -0
- data/lib/cascading_configuration/core/module/block_configurations/cascading_variables.rb +129 -0
- data/lib/cascading_configuration/core/module/block_configurations.rb +15 -0
- data/lib/cascading_configuration/core/module/extended_configurations/compositing_objects.rb +173 -0
- data/lib/cascading_configuration/core/module/extended_configurations.rb +65 -0
- data/lib/cascading_configuration/core/module/inheriting_values.rb +64 -0
- data/lib/cascading_configuration/core/module.rb +284 -0
- data/lib/cascading_configuration/core.rb +23 -0
- data/lib/cascading_configuration/hash.rb +103 -0
- data/lib/cascading_configuration/setting.rb +87 -0
- data/lib/cascading_configuration.rb +47 -0
- data/lib/namespaces.rb +9 -0
- data/lib/requires.rb +46 -0
- data/spec/cascading_configuration/array/sorted/unique_spec.rb +742 -0
- data/spec/cascading_configuration/array/sorted_spec.rb +741 -0
- data/spec/cascading_configuration/array/unique_spec.rb +746 -0
- data/spec/cascading_configuration/array_spec.rb +768 -0
- data/spec/cascading_configuration/core/encapsulation_spec.rb +208 -0
- data/spec/cascading_configuration/core/instance_controller/extension_module_spec.rb +26 -0
- data/spec/cascading_configuration/core/instance_controller/support_module_spec.rb +269 -0
- data/spec/cascading_configuration/core/instance_controller_spec.rb +273 -0
- data/spec/cascading_configuration/core/module/block_configurations/cascading_variables_spec.rb +17 -0
- data/spec/cascading_configuration/core/module/extended_configurations/compositing_objects_spec.rb +127 -0
- data/spec/cascading_configuration/core/module/extended_configurations_spec.rb +37 -0
- data/spec/cascading_configuration/core/module/inheriting_values_spec.rb +87 -0
- data/spec/cascading_configuration/core/module_spec.rb +491 -0
- data/spec/cascading_configuration/hash_spec.rb +826 -0
- data/spec/cascading_configuration/setting_spec.rb +687 -0
- data/spec/cascading_configuration_spec.rb +58 -0
- metadata +185 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
|
2
|
+
require_relative '../lib/cascading_configuration.rb'
|
3
|
+
|
4
|
+
describe ::CascadingConfiguration do
|
5
|
+
|
6
|
+
it 'acts as a cluster' do
|
7
|
+
|
8
|
+
module ::CascadingConfiguration::ClusterIncludeMock
|
9
|
+
|
10
|
+
include ::CascadingConfiguration
|
11
|
+
|
12
|
+
ancestors.include?( ::CascadingConfiguration::Setting ).should == true
|
13
|
+
is_a?( ::CascadingConfiguration::Setting::ClassInstance ).should == true
|
14
|
+
|
15
|
+
ancestors.include?( ::CascadingConfiguration::Hash ).should == true
|
16
|
+
is_a?( ::CascadingConfiguration::Hash::ClassInstance ).should == true
|
17
|
+
|
18
|
+
ancestors.include?( ::CascadingConfiguration::Array ).should == true
|
19
|
+
is_a?( ::CascadingConfiguration::Array::ClassInstance ).should == true
|
20
|
+
|
21
|
+
ancestors.include?( ::CascadingConfiguration::Array::Unique ).should == true
|
22
|
+
is_a?( ::CascadingConfiguration::Array::Unique::ClassInstance ).should == true
|
23
|
+
|
24
|
+
ancestors.include?( ::CascadingConfiguration::Array::Sorted ).should == true
|
25
|
+
is_a?( ::CascadingConfiguration::Array::Sorted::ClassInstance ).should == true
|
26
|
+
|
27
|
+
ancestors.include?( ::CascadingConfiguration::Array::Sorted::Unique ).should == true
|
28
|
+
is_a?( ::CascadingConfiguration::Array::Sorted::Unique::ClassInstance ).should == true
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
module ::CascadingConfiguration::ClusterExtendMock
|
33
|
+
|
34
|
+
extend ::CascadingConfiguration
|
35
|
+
|
36
|
+
is_a?( ::CascadingConfiguration::Setting ).should == true
|
37
|
+
is_a?( ::CascadingConfiguration::Setting::ClassInstance ).should == true
|
38
|
+
|
39
|
+
is_a?( ::CascadingConfiguration::Hash ).should == true
|
40
|
+
is_a?( ::CascadingConfiguration::Hash::ClassInstance ).should == true
|
41
|
+
|
42
|
+
is_a?( ::CascadingConfiguration::Array ).should == true
|
43
|
+
is_a?( ::CascadingConfiguration::Array::ClassInstance ).should == true
|
44
|
+
|
45
|
+
is_a?( ::CascadingConfiguration::Array::Unique ).should == true
|
46
|
+
is_a?( ::CascadingConfiguration::Array::Unique::ClassInstance ).should == true
|
47
|
+
|
48
|
+
is_a?( ::CascadingConfiguration::Array::Sorted ).should == true
|
49
|
+
is_a?( ::CascadingConfiguration::Array::Sorted::ClassInstance ).should == true
|
50
|
+
|
51
|
+
is_a?( ::CascadingConfiguration::Array::Sorted::Unique ).should == true
|
52
|
+
is_a?( ::CascadingConfiguration::Array::Sorted::Unique::ClassInstance ).should == true
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cascading_configuration
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Asher
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-06-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: module-cluster
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: to_camel_case
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: accessor-utilities
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: parallel-ancestry
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: compositing-hash
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :runtime
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: compositing-array-sorted-unique
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
description: Inheritable Objects and Downward-Compositing Hashes and Arrays; Downward-Transforming
|
111
|
+
Values coming soon.
|
112
|
+
email: asher@ridiculouspower.com
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- lib/cascading_configuration/array/sorted/unique.rb
|
118
|
+
- lib/cascading_configuration/array/sorted.rb
|
119
|
+
- lib/cascading_configuration/array/unique.rb
|
120
|
+
- lib/cascading_configuration/array.rb
|
121
|
+
- lib/cascading_configuration/core/enable_instance_support.rb
|
122
|
+
- lib/cascading_configuration/core/enable_module_support.rb
|
123
|
+
- lib/cascading_configuration/core/encapsulation.rb
|
124
|
+
- lib/cascading_configuration/core/instance_controller/extension_module.rb
|
125
|
+
- lib/cascading_configuration/core/instance_controller/support_module/instance_support_module.rb
|
126
|
+
- lib/cascading_configuration/core/instance_controller/support_module/singleton_support_module.rb
|
127
|
+
- lib/cascading_configuration/core/instance_controller/support_module.rb
|
128
|
+
- lib/cascading_configuration/core/instance_controller.rb
|
129
|
+
- lib/cascading_configuration/core/module/block_configurations/cascading_variables.rb
|
130
|
+
- lib/cascading_configuration/core/module/block_configurations.rb
|
131
|
+
- lib/cascading_configuration/core/module/extended_configurations/compositing_objects.rb
|
132
|
+
- lib/cascading_configuration/core/module/extended_configurations.rb
|
133
|
+
- lib/cascading_configuration/core/module/inheriting_values.rb
|
134
|
+
- lib/cascading_configuration/core/module.rb
|
135
|
+
- lib/cascading_configuration/core.rb
|
136
|
+
- lib/cascading_configuration/hash.rb
|
137
|
+
- lib/cascading_configuration/setting.rb
|
138
|
+
- lib/cascading_configuration.rb
|
139
|
+
- lib/namespaces.rb
|
140
|
+
- lib/requires.rb
|
141
|
+
- spec/cascading_configuration/array/sorted/unique_spec.rb
|
142
|
+
- spec/cascading_configuration/array/sorted_spec.rb
|
143
|
+
- spec/cascading_configuration/array/unique_spec.rb
|
144
|
+
- spec/cascading_configuration/array_spec.rb
|
145
|
+
- spec/cascading_configuration/core/encapsulation_spec.rb
|
146
|
+
- spec/cascading_configuration/core/instance_controller/extension_module_spec.rb
|
147
|
+
- spec/cascading_configuration/core/instance_controller/support_module_spec.rb
|
148
|
+
- spec/cascading_configuration/core/instance_controller_spec.rb
|
149
|
+
- spec/cascading_configuration/core/module/block_configurations/cascading_variables_spec.rb
|
150
|
+
- spec/cascading_configuration/core/module/extended_configurations/compositing_objects_spec.rb
|
151
|
+
- spec/cascading_configuration/core/module/extended_configurations_spec.rb
|
152
|
+
- spec/cascading_configuration/core/module/inheriting_values_spec.rb
|
153
|
+
- spec/cascading_configuration/core/module_spec.rb
|
154
|
+
- spec/cascading_configuration/hash_spec.rb
|
155
|
+
- spec/cascading_configuration/setting_spec.rb
|
156
|
+
- spec/cascading_configuration_spec.rb
|
157
|
+
- README.md
|
158
|
+
- CHANGELOG.md
|
159
|
+
homepage: http://rubygems.org/gems/cascading_configuration
|
160
|
+
licenses: []
|
161
|
+
post_install_message:
|
162
|
+
rdoc_options: []
|
163
|
+
require_paths:
|
164
|
+
- lib
|
165
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
166
|
+
none: false
|
167
|
+
requirements:
|
168
|
+
- - ! '>='
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
|
+
none: false
|
173
|
+
requirements:
|
174
|
+
- - ! '>='
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
requirements: []
|
178
|
+
rubyforge_project: cascading_configuration
|
179
|
+
rubygems_version: 1.8.23
|
180
|
+
signing_key:
|
181
|
+
specification_version: 3
|
182
|
+
summary: Provides inheritable values across Ruby inheritance hierarchy or across arbitrary
|
183
|
+
declared inheritance relations.
|
184
|
+
test_files: []
|
185
|
+
has_rdoc:
|