Is there any way to get the Directory Ratpack.groovy is in?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there any way to get the Directory Ratpack.groovy is in?

uris77
I have some configuration files living under src/ratpack/config . These contain database names, ports, etc. I also have modules for DAO that take these files as arguments. They are working fine, but now I want to add tests for the APIs and it can't find the test because the baseDir changes to src/test. Is there anyway we can either get the root directory (i.e. src) or get the directory for Ratpack.groovy?

I tried launchConfig.getBaseDir() but that directory changes when running tests.
Reply | Threaded
Open this post in threaded view
|

Re: Is there any way to get the Directory Ratpack.groovy is in?

uris77
Nevermind, figured it out.