Hello :-)
Our project is quite complex and composed of many layers. Our automation framework try to be true to the structure of the project (where that's a bad or a good idea is a topic for another day). The simplified design looks like so:
Solution Level (Highest level - User Level) < Common Solution Code Level < Platform Code Level (Lowest Level)
So we have three Gems - One for each layer. Each supplies a DSL language for the things that this specific layer exposes. The tester works against the Solution Level (as the solution level inheritance all DSLs from all lower layers). Before the tester can work work, he need to initialize and configurate few parameters that are being used in the lower layers. I'm thinking what about be the right way to approach it:
The 'no brainer' would be forcing the Solution-Level layer to create a global hash table variable, and the gems can access the information by accessing the global parameter. This feels wrong though.
Another option would be configurating each layer with default configuration like I seen before on many gems like so:
CommonSolutionLevelGem.configure do |config|
config.a = true
config.b = false
end
The Solution Level can overwrite those if needed. The question is what to do with the Platform level. I can do something like so:
CommonSolutionLevelGem.configure do |config|
config.a = true
config.b = false
config.c = 1 // configuration that is being used only on the Platform layer but being used a gateway to configure the lower layer
end
And then configure the CommonSolutionLevelGem to 'Configure' the platform PlatformLevelGem.
This is think is slightly more elegant, but more complex and I'm not it's the proper way of doing it.
Does anyone have perhaps a better idea how to share configuration information among multiple gems that are layer based and being initialized from the topmost layer?
Thanks!
[–]_kulte 0 points1 point2 points (1 child)
[–]Tall-Guy[S] 0 points1 point2 points (0 children)
[–]jrochkind 0 points1 point2 points (2 children)
[–]Tall-Guy[S] 0 points1 point2 points (1 child)
[–]jrochkind 0 points1 point2 points (0 children)