Skip to content

Commit

Permalink
Merge pull request marklogic-community#372 from joemfb/ml8-rewriter
Browse files Browse the repository at this point in the history
adds support for the ml8 REST rewriter
  • Loading branch information
dmcassel committed Feb 12, 2015
2 parents 3048508 + 1f4fa6c commit 930b3a8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ def self.init
properties_file.gsub!(/rewrite-resolves-globally=/, "rewrite-resolves-globally=true")
end

# rest applications don't use Roxy's MVC structure, so they can use MarkLogic's rewriter and error handler
if app_type == "rest"
# rest applications don't use Roxy's MVC structure, so they can use MarkLogic's rewriter and error handler
properties_file.gsub!(/url-rewriter=\/roxy\/rewrite.xqy/, "url-rewriter=/MarkLogic/rest-api/rewriter.xqy")
# ML8 rest uses the new native rewriter
rewriter_name = (server_version == "8") ? "rewriter.xml" : "rewriter.xqy"
properties_file.gsub!(/url-rewriter=\/roxy\/rewrite.xqy/, "url-rewriter=/MarkLogic/rest-api/" + rewriter_name)
properties_file.gsub!(/error-handler=\/roxy\/error.xqy/, "error-handler=/MarkLogic/rest-api/error-handler.xqy")
end

Expand Down Expand Up @@ -1020,7 +1022,7 @@ def settings
}
end
end

private

def save_files_to_fs(target_db, target_dir)
Expand Down Expand Up @@ -1185,7 +1187,7 @@ def deploy_src
logger.info "Skipping deployment of src to #{dest_db}.."
break
end

ignore_us = []
ignore_us << "^#{test_dir}.*$" unless test_dir.blank? || deploy_tests?(dest_db)
ignore_us << "^#{app_config_file}$"
Expand Down

0 comments on commit 930b3a8

Please sign in to comment.