Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Fixing Issue #223 Capture modules for any app type #356

Merged

Conversation

alencruz
Copy link
Contributor

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.

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.
@grtjn
Copy link
Contributor

grtjn commented Feb 4, 2015

The changes look good. I'll try to test asap..

@joemfb joemfb closed this Feb 9, 2015
@joemfb joemfb reopened this Feb 9, 2015

if (port != nil)
# set up the options
FileUtils.cp_r(
Copy link
Contributor

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..

Copy link
Contributor Author

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.
@alencruz
Copy link
Contributor Author

Committed changes based on feedback.

@grtjn
Copy link
Contributor

grtjn commented Apr 14, 2015

The indentation of the help looks a little garbled, but otherwise ok. I'll merge, we can touch help later..

@grtjn grtjn closed this Apr 14, 2015
@grtjn grtjn reopened this Apr 14, 2015
@grtjn
Copy link
Contributor

grtjn commented Apr 14, 2015

Sorry, I think I meant to merge, but clicked Close-n-comment instead..

grtjn added a commit that referenced this pull request Apr 14, 2015
Fixing Issue #223 Capture modules for any app type
@grtjn grtjn merged commit deac106 into marklogic-community:dev Apr 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants