-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow uri-like pathes for app.root and gem.path #191
Conversation
@mkristian interesting thanks, while I appreciate the new direction this is getting super-ugly uri: special handling now leaking on 3 places ... will give it some more thoughts later. |
a |
9ce72ce
to
2963f1d
Compare
@kares I did reduce the patch to something generic ;) |
looks better - thanks! but I'm not sure if it will pass the tests (will get 1.1-stable green just bare with me), the what I'm thinking as an alternative (please let me know what you think) ... is introducing another layout since when all is under |
yes, indeed a new layout will be the better way. even with the current |
2963f1d
to
e8536e7
Compare
@kares this a new layout - so there are no side effects for existing apps. any idea how to get rid off: <context-param>
<param-name>rackup</param-name>
<param-value>eval File.read( 'uri:classloader://config.ru' )</param-value>
</context-param> when running jetty or tomcat without packing a war then there is no WEB-INF/classes - the classes directory is somewhere else and jruby-rack does not find the config.ru !? |
looks good to me (assuming it works with the class-loader) that WebInf in the name evokes smt "special" about the layout ... have you considered something like that |
…under WEB-INF/classes when the app.root points to uri:classloader:// the rack-application can be packed one-to-one into WEB-INF/classes. similar for setting gem.path to uri:classloader:// allows to embed the gems in WEB-INF/classes.
e8536e7
to
a5e9e39
Compare
so I did change the classname ;) and added the search on context-classloader as last place to search for config.ru |
a5e9e39
to
8b0073f
Compare
@kares so from my side: I am excited. well, if this goes into 1.1-stable then I would add a small IT on jruby itself for it - it makes it easy to bundle a rack application with maven. |
@mkristian looks good to go, I'll sure get this into 1.1.18 (will do some testing myself) ... I'll just need to figure out something around the |
…path configured closes #191 as merged
on 1.1-stable with a cherry on top, thanks! |
when the app.root points to uri:classlaoder:// the rack-application can be packed one-to-one into WEB-INF/classes.
similar for setting gem.path to uri:classloader:// allows to embed the gems in WEB-INF/classes.
setting the gem.path is only needed for jruby-1.7.x and app.root only works with the 1.7.19+. all this allows a simplified packaging: https://github.com/mkristian/jruby-pack#packing-jarwar-files-of-ruby-application
and bypasses all the need of real-path.