Skip to content
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

dir globs on uri classloader without the need of .jrubydir #3073

Merged
merged 6 commits into from
Jul 6, 2015

Conversation

mkristian
Copy link
Member

No description provided.

when using the uri:classloader: protocol and the lookup can be a directory
then to determine whether it is a directory or not the following sequence takes place

* look for my_directory/.jrubydir and if there use it
* if the url from the classloader is jar url, then see if the jar file
  has a directory entry and use it (zip files may or may not have such
  directory entries depending on how it got packed)
* if url from classloader is file url, then use the file on filesystem and
  check if it is a directory

using ClassLoader.getResources as well URLClassLoader.getURLs for finding directory entries.
no more custom url stream handler which some environments do not allow (i.e. java webstart)
and this compound stream handler did work only for jar protocol urls. any custom protocol handler
did not work like the ones from OSGi and some j2ee constainers (wlp, jboss). without the custom
stream handler there is no need to index compound urls
there are no tests for this OSGiScriptingContainer and the last test
did work for felix4 only. no equinox nor knoplerfish no felix3. regular
ScriptingContainer now works with all three osgi frameworks including
embedded gems, etc and has tests for all those frameworks.
@mkristian
Copy link
Member Author

@kares @ratnikov would you both have a look at those commits: 97e35b8 and d02e9ed

which is basically switching off the old LoadService and removing obsolete code.

@kares
Copy link
Member

kares commented Jun 23, 2015

looks good to me, but I'm not proficient in covering all possible cases 97e35b8 will face in real-world ... it's "only" 9K thus experimenting should be fajn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants