We are trying to build a system based on calabash. We noticed that when the user has a custom .calabash in their home directory it clashes with our configuration files. In order to solve this I've introduced three system properties which are checked before loading the jar config fle, the home config file and the cwd cofig file.
A pull request is being submitted in case you're interested in adding this feature.
The text was updated successfully, but these errors were encountered:
Flags to suppress the ~/.calabash and ./.calabash configuration files seem reasonable, I guess. Though I'm tempted to make properties that contain the names of the files. So, maybe com.xmlcalabash.config.user which defaults to ~/.calabash if it isn't set and com.xmlcalabash.config.local which defaults to ./.calabash. Setting them to the empty string would suppress them.
I'm a little surprised by the requirement to be able to suppress the configuration file from the jar. Do you need to specify an alternate configuration? If you don't load something, you won't have implementations for any of the steps!
Thanks for the reply. Having both ~/.calabash and ./.calabash as you described is exactly what we were looking for . I don't have a strong point of view regarding the configuration file from the jar, it's true that you need all the declarations for steps, but they can be also feed from another configuration file or dynamically allowing clients of calabash gain more control over the internals. Anyway, that's beside the point of the reason of the patch ...
thanks a million
If the global property is set, its value is treated as a filename and
the global configuration will be read from that file instead of from
the configuration stored in the jar file. (This is not recommended.)
The global property value is resolved relative to the current working
If the user property is set, its value is treated as a filename and
the user configuration will be read from that file. If it is not set,
the value ".calabash" is assumed. The user property value is resolved
relative to the user's home directory. If the user property is the
empty string, no user configuration is loaded.
The local property is interpreted the same way as the user property
except that it is resolved relative to the current working directory.