-
Notifications
You must be signed in to change notification settings - Fork 66
Fixing Issue #223 Capture modules for any app type #356
Fixing Issue #223 Capture modules for any app type #356
Conversation
Currently Capture was only supporting capturing modules for REST applications. I have added the ability to capture modules for any application type to ML7 and taken the protection off which will allow to capture modules for any application type in ML5,6, and 7. For ML7 if it’s a REST application, REST will still be used to perform the capture since it’s faster than the query based method. The query based method used for ML5,6, and ML7 (non-REST) only grabs text based files (xqy, html,…) it does not correctly capture other types of files in the modules database such as images since it’s doing an fn:doc on the URI to get the content.
The changes look good. I'll try to test asap.. |
|
||
if (port != nil) | ||
# set up the options | ||
FileUtils.cp_r( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm hitting issue #298, or something very similar. If you start with mvc app-type, the rest-api dir doesn't exist yet. There is code mentioned in the ticket that you could include here to get the dir created.
You could also argue that you might want to throw an error telling that you are capturing REST modules into a non-REST project. That might even be better, as rewriter settings will be off..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like throwing the error idea, that way the user does not end up with something unexpected. I have implemented this and will be committing momentarily. I will note that it also fixes issue #298 since "capture" will no longer try to save REST configuration if the folder does not exists in the project.
…Issue marklogic-community#298 Improved the fix for Issue marklogic-community#223 based on feedback received. Also fixes Issue marklogic-community#298 since it protects against the error condition. In addition some of the Capture help content was clarified to reflect the implementation.
Committed changes based on feedback. |
The indentation of the help looks a little garbled, but otherwise ok. I'll merge, we can touch help later.. |
Sorry, I think I meant to merge, but clicked Close-n-comment instead.. |
Fixing Issue #223 Capture modules for any app type
Currently Capture was only supporting capturing modules for
REST applications. I have added the ability to capture modules
for any application type to ML7 and taken the protection off
which will allow to capture modules for any application type in
ML5,6, and 7. For ML7 if it’s a REST application, REST will still be
used to perform the capture since it’s faster than the query
based method. The query based method used for ML5,6, and
ML7 (non-REST) only grabs text based files (xqy, html,…) it does
not correctly capture other types of files in the modules database
such as images since it’s doing an fn:doc on the URI to get the
content.