mirror of https://gitee.com/bigwinds/arangodb
commit
0e6acc4b7a
|
@ -1,6 +1,8 @@
|
|||
v1.0.1 (2012-XX-XX)
|
||||
v1.0.1 (2012-09-30)
|
||||
-------------------
|
||||
|
||||
* darft for issue #165: front-end application howto
|
||||
|
||||
* updated mruby to cf8fdea4a6598aa470e698e8cbc9b9b492319d
|
||||
|
||||
* fix for issue #190: install doesn't create log directory
|
||||
|
|
|
@ -1 +1,7 @@
|
|||
<style type="text/css">
|
||||
div.line{
|
||||
font-family:monospace;
|
||||
white-space:pre;
|
||||
}
|
||||
</style>
|
||||
<?php include "../include/header.php" ?>
|
||||
|
|
|
@ -1550,7 +1550,7 @@ HIDE_UNDOC_RELATIONS = YES
|
|||
# toolkit from AT&T and Lucent Bell Labs. The other options in this section
|
||||
# have no effect if this option is set to NO (the default)
|
||||
|
||||
HAVE_DOT = NO
|
||||
HAVE_DOT = YES
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
|
||||
# allowed to run in parallel. When set to 0 (the default) doxygen will
|
||||
|
|
341
Makefile.in
341
Makefile.in
|
@ -1,9 +1,8 @@
|
|||
# Makefile.in generated by automake 1.12 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.12.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -369,9 +368,7 @@ ARFLAGS = cru
|
|||
AM_V_AR = $(am__v_AR_@AM_V@)
|
||||
am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
|
||||
am__v_AR_0 = @echo " AR " $@;
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_AR_1 =
|
||||
lib_libarango_a_AR = $(AR) $(ARFLAGS)
|
||||
lib_libarango_a_LIBADD =
|
||||
am__lib_libarango_a_SOURCES_DIST = lib/Basics/ConditionLocker.cpp \
|
||||
|
@ -800,6 +797,18 @@ bin_zclient_DEPENDENCIES = $(am__DEPENDENCIES_2)
|
|||
am_bin_zserver_OBJECTS = PerfTests/bin_zserver-zserver.$(OBJEXT)
|
||||
bin_zserver_OBJECTS = $(am_bin_zserver_OBJECTS)
|
||||
bin_zserver_DEPENDENCIES = $(am__DEPENDENCIES_2)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config -I$(top_builddir)/lib/BasicsC
|
||||
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
|
@ -807,30 +816,32 @@ am__mv = mv -f
|
|||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
am__v_CXX_1 =
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(lib_libarango_a_SOURCES) $(lib_libarango_client_a_SOURCES) \
|
||||
$(lib_libarango_fe_a_SOURCES) $(lib_libarango_mruby_a_SOURCES) \
|
||||
$(lib_libarango_v8_a_SOURCES) \
|
||||
|
@ -1657,7 +1668,9 @@ SHELL_COMMON = @srcdir@/js/common/tests/shell-document.js \
|
|||
@srcdir@/js/common/tests/shell-unique-constraint.js \
|
||||
@srcdir@/js/common/tests/shell-hash-index.js
|
||||
|
||||
SHELL_SERVER = $(SHELL_COMMON)
|
||||
SHELL_SERVER = $(SHELL_COMMON) \
|
||||
@srcdir@/js/server/tests/routing.js
|
||||
|
||||
UNITTESTS_SERVER = $(addprefix --javascript.unit-tests ,$(SHELL_SERVER))
|
||||
|
||||
################################################################################
|
||||
|
@ -2837,261 +2850,51 @@ bin/zserver$(EXEEXT): $(bin_zserver_OBJECTS) $(bin_zserver_DEPENDENCIES) $(EXTRA
|
|||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f PerfTests/bin_zclient-zclient.$(OBJEXT)
|
||||
-rm -f PerfTests/bin_zserver-zserver.$(OBJEXT)
|
||||
-rm -f UnitTests/Cambridge/UnitTests_geo_suite-Runner.$(OBJEXT)
|
||||
-rm -f UnitTests/Cambridge/UnitTests_geo_suite-georeg.$(OBJEXT)
|
||||
-rm -f UnitTests/Jutland/StringBufferTest.$(OBJEXT)
|
||||
-rm -f UnitTests/Jutland/StringUtilsTest.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/associative-pointer-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/hashes-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/json-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/json-utilities-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/string-buffer-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/string-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/string-utf8-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/vector-pointer-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/vector-test.$(OBJEXT)
|
||||
-rm -f UnitTests/Runner.$(OBJEXT)
|
||||
-rm -f arangod/Actions/bin_arangod-ActionDispatcherThread.$(OBJEXT)
|
||||
-rm -f arangod/Actions/bin_arangod-RestActionHandler.$(OBJEXT)
|
||||
-rm -f arangod/Actions/bin_arangod-actions.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-access-optimiser.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-ast-node.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-bind-parameter.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-codegen.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-collections.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-context.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-conversions.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-error.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-explain.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-functions.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-grammar.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-index.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-node.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-optimiser.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-parser-functions.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-parser.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-result.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-scope.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-statement-dump.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-statement-walker.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-statementlist.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-tokens.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/bin_arangod-ahuacatl-variable.$(OBJEXT)
|
||||
-rm -f arangod/BitIndexes/bin_arangod-bitarray.$(OBJEXT)
|
||||
-rm -f arangod/BitIndexes/bin_arangod-bitarrayIndex.$(OBJEXT)
|
||||
-rm -f arangod/GeoIndex/UnitTests_geo_suite-GeoIndex.$(OBJEXT)
|
||||
-rm -f arangod/GeoIndex/bin_arangod-GeoIndex.$(OBJEXT)
|
||||
-rm -f arangod/HashIndex/bin_arangod-hasharray.$(OBJEXT)
|
||||
-rm -f arangod/HashIndex/bin_arangod-hashindex.$(OBJEXT)
|
||||
-rm -f arangod/IndexIterators/bin_arangod-index-iterator.$(OBJEXT)
|
||||
-rm -f arangod/IndexOperators/bin_arangod-index-operator.$(OBJEXT)
|
||||
-rm -f arangod/MRServer/bin_arangod-ApplicationMR.$(OBJEXT)
|
||||
-rm -f arangod/MRServer/bin_arangod-mr-actions.$(OBJEXT)
|
||||
-rm -f arangod/PriorityQueue/bin_arangod-pqueueindex.$(OBJEXT)
|
||||
-rm -f arangod/PriorityQueue/bin_arangod-priorityqueue.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/bin_arangod-RestBatchHandler.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/bin_arangod-RestDocumentHandler.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/bin_arangod-RestEdgeHandler.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/bin_arangod-RestImportHandler.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/bin_arangod-RestVocbaseBaseHandler.$(OBJEXT)
|
||||
-rm -f arangod/RestServer/bin_arangod-ArangoHttpServer.$(OBJEXT)
|
||||
-rm -f arangod/RestServer/bin_arangod-ArangoServer.$(OBJEXT)
|
||||
-rm -f arangod/RestServer/bin_arangod-arango.$(OBJEXT)
|
||||
-rm -f arangod/SkipLists/bin_arangod-skiplist.$(OBJEXT)
|
||||
-rm -f arangod/SkipLists/bin_arangod-skiplistIndex.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/bin_arangod-ApplicationV8.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/bin_arangod-v8-actions.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/bin_arangod-v8-objects.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/bin_arangod-v8-query.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/bin_arangod-v8-vocbase.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-auth.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-barrier.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-blob-collection.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-collection.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-compactor.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-datafile.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-document-collection.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-general-cursor.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-headers.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-index.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-shadow-data.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-simple-collection.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-synchroniser.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-voc-shaper.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/bin_arangod-vocbase.$(OBJEXT)
|
||||
-rm -f arangoirb/MRClient/bin_arangoirb-MRubyClientConnection.$(OBJEXT)
|
||||
-rm -f arangoirb/MRClient/bin_arangoirb-arangoirb.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangoimp-ImportHelper.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangoimp-V8ClientConnection.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangoimp-arangoimp.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangosh-ImportHelper.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangosh-V8ClientConnection.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/bin_arangosh-arangosh.$(OBJEXT)
|
||||
-rm -f lib/Admin/ApplicationAdminServer.$(OBJEXT)
|
||||
-rm -f lib/Admin/RestAdminBaseHandler.$(OBJEXT)
|
||||
-rm -f lib/Admin/RestAdminFeConfigurationHandler.$(OBJEXT)
|
||||
-rm -f lib/Admin/RestAdminLogHandler.$(OBJEXT)
|
||||
-rm -f lib/Admin/RestBaseHandler.$(OBJEXT)
|
||||
-rm -f lib/Admin/RestVersionHandler.$(OBJEXT)
|
||||
-rm -f lib/ApplicationServer/ApplicationFeature.$(OBJEXT)
|
||||
-rm -f lib/ApplicationServer/ApplicationServer.$(OBJEXT)
|
||||
-rm -f lib/Basics/ConditionLocker.$(OBJEXT)
|
||||
-rm -f lib/Basics/ConditionVariable.$(OBJEXT)
|
||||
-rm -f lib/Basics/FileUtils.$(OBJEXT)
|
||||
-rm -f lib/Basics/Initialise.$(OBJEXT)
|
||||
-rm -f lib/Basics/LibraryLoader.$(OBJEXT)
|
||||
-rm -f lib/Basics/Mutex.$(OBJEXT)
|
||||
-rm -f lib/Basics/MutexLocker.$(OBJEXT)
|
||||
-rm -f lib/Basics/ProgramOptions.$(OBJEXT)
|
||||
-rm -f lib/Basics/ProgramOptionsDescription.$(OBJEXT)
|
||||
-rm -f lib/Basics/Random.$(OBJEXT)
|
||||
-rm -f lib/Basics/ReadLocker.$(OBJEXT)
|
||||
-rm -f lib/Basics/ReadUnlocker.$(OBJEXT)
|
||||
-rm -f lib/Basics/ReadWriteLock.$(OBJEXT)
|
||||
-rm -f lib/Basics/StringUtils.$(OBJEXT)
|
||||
-rm -f lib/Basics/Thread.$(OBJEXT)
|
||||
-rm -f lib/Basics/Timing.$(OBJEXT)
|
||||
-rm -f lib/Basics/WriteLocker.$(OBJEXT)
|
||||
-rm -f lib/Basics/WriteUnlocker.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/associative-multi.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/associative.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/conversions.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/csv.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/error.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/files.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/hashes.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/init.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/json-utilities.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/json.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/linked-list.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/locks-macos.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/locks-posix.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/logging.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/memory.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/process-utils.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/random.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/socket-utils.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/string-buffer.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/strings.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/structures.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/system-functions.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/terminal-utils-ncurses.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/terminal-utils.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/threads-posix.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/vector.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/voc-errors.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/ApplicationDispatcher.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/Dispatcher.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/DispatcherQueue.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/DispatcherThread.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/Job.$(OBJEXT)
|
||||
-rm -f lib/GeneralServer/GeneralFigures.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/ApplicationHttpServer.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/HttpCommTask.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/HttpHandler.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/HttpHandlerFactory.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/HttpServer.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/PathHandler.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/RedirectHandler.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/ServiceUnavailableHandler.$(OBJEXT)
|
||||
-rm -f lib/HttpsServer/ApplicationHttpsServer.$(OBJEXT)
|
||||
-rm -f lib/HttpsServer/HttpsAsyncCommTask.$(OBJEXT)
|
||||
-rm -f lib/HttpsServer/HttpsServer.$(OBJEXT)
|
||||
-rm -f lib/JsonParser/json-parser.$(OBJEXT)
|
||||
-rm -f lib/JsonParserX/InputParser.$(OBJEXT)
|
||||
-rm -f lib/JsonParserX/JsonParserX.$(OBJEXT)
|
||||
-rm -f lib/JsonParserX/JsonParserXDriver.$(OBJEXT)
|
||||
-rm -f lib/JsonParserX/JsonScannerX.$(OBJEXT)
|
||||
-rm -f lib/Logger/Logger.$(OBJEXT)
|
||||
-rm -f lib/Logger/LoggerData.$(OBJEXT)
|
||||
-rm -f lib/Logger/LoggerInfo.$(OBJEXT)
|
||||
-rm -f lib/Logger/LoggerStream.$(OBJEXT)
|
||||
-rm -f lib/Logger/LoggerTiming.$(OBJEXT)
|
||||
-rm -f lib/MRuby/MRLineEditor.$(OBJEXT)
|
||||
-rm -f lib/MRuby/MRLoader.$(OBJEXT)
|
||||
-rm -f lib/MRuby/mr-utils.$(OBJEXT)
|
||||
-rm -f lib/ProgramOptions/program-options.$(OBJEXT)
|
||||
-rm -f lib/ProtocolBuffers/HttpRequestProtobuf.$(OBJEXT)
|
||||
-rm -f lib/ProtocolBuffers/arangodb.pb.$(OBJEXT)
|
||||
-rm -f lib/ProtocolBuffers/bin_zclient-arangodb.pb.$(OBJEXT)
|
||||
-rm -f lib/Rest/AddressPort.$(OBJEXT)
|
||||
-rm -f lib/Rest/AnyServer.$(OBJEXT)
|
||||
-rm -f lib/Rest/HttpRequest.$(OBJEXT)
|
||||
-rm -f lib/Rest/HttpRequestPlain.$(OBJEXT)
|
||||
-rm -f lib/Rest/HttpResponse.$(OBJEXT)
|
||||
-rm -f lib/Rest/Initialise.$(OBJEXT)
|
||||
-rm -f lib/Rest/JsonContainer.$(OBJEXT)
|
||||
-rm -f lib/Rest/SslInterface.$(OBJEXT)
|
||||
-rm -f lib/Rest/Url.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/HtmlResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/Initialise.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/JsonResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/JsonXResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/OutputGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/PhpResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/ResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/XmlResultGenerator.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/ApplicationScheduler.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/AsyncTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/ConnectionTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/ListenTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/PeriodicTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/Scheduler.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/SchedulerLibev.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/SchedulerThread.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/SignalTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/SocketTask.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/Task.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/TaskManager.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/TimerTask.$(OBJEXT)
|
||||
-rm -f lib/ShapedJson/json-shaper.$(OBJEXT)
|
||||
-rm -f lib/ShapedJson/shape-accessor.$(OBJEXT)
|
||||
-rm -f lib/ShapedJson/shaped-json.$(OBJEXT)
|
||||
-rm -f lib/SimpleHttpClient/SimpleHttpClient.$(OBJEXT)
|
||||
-rm -f lib/SimpleHttpClient/SimpleHttpResult.$(OBJEXT)
|
||||
-rm -f lib/UserManager/ApplicationUserManager.$(OBJEXT)
|
||||
-rm -f lib/UserManager/Role.$(OBJEXT)
|
||||
-rm -f lib/UserManager/Session.$(OBJEXT)
|
||||
-rm -f lib/UserManager/SessionHandler.$(OBJEXT)
|
||||
-rm -f lib/UserManager/User.$(OBJEXT)
|
||||
-rm -f lib/UserManager/UserHandler.$(OBJEXT)
|
||||
-rm -f lib/UserManager/UsersHandler.$(OBJEXT)
|
||||
-rm -f lib/Utilities/LineEditor.$(OBJEXT)
|
||||
-rm -f lib/Utilities/ScriptLoader.$(OBJEXT)
|
||||
-rm -f lib/V8/JSLoader.$(OBJEXT)
|
||||
-rm -f lib/V8/V8LineEditor.$(OBJEXT)
|
||||
-rm -f lib/V8/v8-conv.$(OBJEXT)
|
||||
-rm -f lib/V8/v8-execution.$(OBJEXT)
|
||||
-rm -f lib/V8/v8-json.$(OBJEXT)
|
||||
-rm -f lib/V8/v8-shell.$(OBJEXT)
|
||||
-rm -f lib/V8/v8-utils.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantArray.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantBlob.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantBoolean.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantDate.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantDatetime.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantDouble.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantFloat.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantInt16.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantInt32.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantInt64.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantInt8.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantMatrix2.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantNull.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantObject.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantString.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantUInt16.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantUInt32.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantUInt64.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantUInt8.$(OBJEXT)
|
||||
-rm -f lib/Variant/VariantVector.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/ApplicationZeroMQ.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/ZeroMQBatchJob.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/ZeroMQQueueThread.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/ZeroMQThread.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/ZeroMQWorkerThread.$(OBJEXT)
|
||||
-rm -f PerfTests/*.$(OBJEXT)
|
||||
-rm -f UnitTests/*.$(OBJEXT)
|
||||
-rm -f UnitTests/Cambridge/*.$(OBJEXT)
|
||||
-rm -f UnitTests/Jutland/*.$(OBJEXT)
|
||||
-rm -f UnitTests/Philadelphia/*.$(OBJEXT)
|
||||
-rm -f arangod/Actions/*.$(OBJEXT)
|
||||
-rm -f arangod/Ahuacatl/*.$(OBJEXT)
|
||||
-rm -f arangod/BitIndexes/*.$(OBJEXT)
|
||||
-rm -f arangod/GeoIndex/*.$(OBJEXT)
|
||||
-rm -f arangod/HashIndex/*.$(OBJEXT)
|
||||
-rm -f arangod/IndexIterators/*.$(OBJEXT)
|
||||
-rm -f arangod/IndexOperators/*.$(OBJEXT)
|
||||
-rm -f arangod/MRServer/*.$(OBJEXT)
|
||||
-rm -f arangod/PriorityQueue/*.$(OBJEXT)
|
||||
-rm -f arangod/RestHandler/*.$(OBJEXT)
|
||||
-rm -f arangod/RestServer/*.$(OBJEXT)
|
||||
-rm -f arangod/SkipLists/*.$(OBJEXT)
|
||||
-rm -f arangod/V8Server/*.$(OBJEXT)
|
||||
-rm -f arangod/VocBase/*.$(OBJEXT)
|
||||
-rm -f arangoirb/MRClient/*.$(OBJEXT)
|
||||
-rm -f arangosh/V8Client/*.$(OBJEXT)
|
||||
-rm -f lib/Admin/*.$(OBJEXT)
|
||||
-rm -f lib/ApplicationServer/*.$(OBJEXT)
|
||||
-rm -f lib/Basics/*.$(OBJEXT)
|
||||
-rm -f lib/BasicsC/*.$(OBJEXT)
|
||||
-rm -f lib/Dispatcher/*.$(OBJEXT)
|
||||
-rm -f lib/GeneralServer/*.$(OBJEXT)
|
||||
-rm -f lib/HttpServer/*.$(OBJEXT)
|
||||
-rm -f lib/HttpsServer/*.$(OBJEXT)
|
||||
-rm -f lib/JsonParser/*.$(OBJEXT)
|
||||
-rm -f lib/JsonParserX/*.$(OBJEXT)
|
||||
-rm -f lib/Logger/*.$(OBJEXT)
|
||||
-rm -f lib/MRuby/*.$(OBJEXT)
|
||||
-rm -f lib/ProgramOptions/*.$(OBJEXT)
|
||||
-rm -f lib/ProtocolBuffers/*.$(OBJEXT)
|
||||
-rm -f lib/Rest/*.$(OBJEXT)
|
||||
-rm -f lib/ResultGenerator/*.$(OBJEXT)
|
||||
-rm -f lib/Scheduler/*.$(OBJEXT)
|
||||
-rm -f lib/ShapedJson/*.$(OBJEXT)
|
||||
-rm -f lib/SimpleHttpClient/*.$(OBJEXT)
|
||||
-rm -f lib/UserManager/*.$(OBJEXT)
|
||||
-rm -f lib/Utilities/*.$(OBJEXT)
|
||||
-rm -f lib/V8/*.$(OBJEXT)
|
||||
-rm -f lib/Variant/*.$(OBJEXT)
|
||||
-rm -f lib/ZeroMQ/*.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
@ -4731,9 +4534,9 @@ distcheck: dist
|
|||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
|
|
|
@ -149,7 +149,8 @@ SHELL_COMMON = @srcdir@/js/common/tests/shell-document.js \
|
|||
@srcdir@/js/common/tests/shell-unique-constraint.js \
|
||||
@srcdir@/js/common/tests/shell-hash-index.js
|
||||
|
||||
SHELL_SERVER = $(SHELL_COMMON)
|
||||
SHELL_SERVER = $(SHELL_COMMON) \
|
||||
@srcdir@/js/server/tests/routing.js
|
||||
|
||||
.PHONY: unittests-shell-server
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
# generated automatically by aclocal 1.12 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.12.3 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
|
||||
# Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -26,8 +25,6 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_AUTOMAKE_VERSION(VERSION)
|
||||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
|
@ -37,7 +34,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
|
|||
[am__api_version='1.12'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.12], [],
|
||||
m4_if([$1], [1.12.3], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
|
@ -53,7 +50,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
|
|||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.12])dnl
|
||||
[AM_AUTOMAKE_VERSION([1.12.3])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
||||
|
@ -66,8 +63,6 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
|
||||
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
|
||||
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
|
||||
|
@ -121,8 +116,6 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 10
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
# Define a conditional.
|
||||
|
@ -154,7 +147,6 @@ fi])])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 16
|
||||
|
||||
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
|
@ -166,7 +158,7 @@ fi])])
|
|||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
|
@ -182,6 +174,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
|
|||
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
|
||||
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
|
||||
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
|
||||
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
|
||||
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
@ -345,7 +338,6 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
|
@ -422,8 +414,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 18
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
||||
|
@ -468,7 +458,10 @@ AC_SUBST([CYGPATH_W])
|
|||
# Define the identity of the package.
|
||||
dnl Distinguish between old-style and new-style calls.
|
||||
m4_ifval([$2],
|
||||
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
[AC_DIAGNOSE([obsolete],
|
||||
[$0: two- and three-arguments forms are deprecated. For more info, see:
|
||||
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
|
||||
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
|
||||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
|
@ -494,7 +487,12 @@ AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
|||
AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
|
||||
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
|
||||
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||
# dies out for good. For more background, see:
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
AC_REQUIRE([AC_PROG_AWK])dnl
|
||||
|
@ -506,16 +504,23 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
|
|||
_AM_IF_OPTION([no-dependencies],,
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
[_AM_DEPENDENCIES([CC])],
|
||||
[define([AC_PROG_CC],
|
||||
defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
|
||||
[m4_define([AC_PROG_CC],
|
||||
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
||||
[_AM_DEPENDENCIES([CXX])],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
|
||||
[m4_define([AC_PROG_CXX],
|
||||
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES([OBJC])],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
||||
[m4_define([AC_PROG_OBJC],
|
||||
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
|
||||
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
|
||||
dnl but we still cater to Autoconf 2.62.
|
||||
m4_ifdef([AC_PROG_OBJCXX],
|
||||
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
|
||||
[_AM_DEPENDENCIES([OBJCXX])],
|
||||
[m4_define([AC_PROG_OBJCXX],
|
||||
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
|
||||
])
|
||||
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
|
||||
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
|
||||
|
@ -560,8 +565,6 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8
|
||||
|
||||
# AM_PROG_INSTALL_SH
|
||||
# ------------------
|
||||
# Define $install_sh.
|
||||
|
@ -583,8 +586,6 @@ AC_SUBST([install_sh])])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# Check whether the underlying file-system supports filenames
|
||||
# with a leading dot. For instance MS-DOS doesn't.
|
||||
AC_DEFUN([AM_SET_LEADING_DOT],
|
||||
|
@ -606,8 +607,6 @@ AC_SUBST([am__leading_dot])])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5
|
||||
|
||||
# AM_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
|
@ -656,8 +655,6 @@ rm -f confinc confmf
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# AM_PROG_CC_C_O
|
||||
# --------------
|
||||
# Like AC_PROG_CC_C_O, but changed for automake.
|
||||
|
@ -692,8 +689,6 @@ m4_define([AC_PROG_CC],
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
AC_DEFUN([AM_MISSING_PROG],
|
||||
|
@ -701,7 +696,6 @@ AC_DEFUN([AM_MISSING_PROG],
|
|||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
|
||||
|
||||
# AM_MISSING_HAS_RUN
|
||||
# ------------------
|
||||
# Define MISSING if not defined so far and test if it supports --run.
|
||||
|
@ -726,34 +720,6 @@ else
|
|||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check for 'mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||
|
@ -762,8 +728,6 @@ esac
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6
|
||||
|
||||
# _AM_MANGLE_OPTION(NAME)
|
||||
# -----------------------
|
||||
AC_DEFUN([_AM_MANGLE_OPTION],
|
||||
|
@ -795,8 +759,6 @@ AC_DEFUN([_AM_IF_OPTION],
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 9
|
||||
|
||||
# AM_SANITY_CHECK
|
||||
# ---------------
|
||||
AC_DEFUN([AM_SANITY_CHECK],
|
||||
|
@ -878,8 +840,6 @@ rm -f conftest.file
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# AM_SILENT_RULES([DEFAULT])
|
||||
# --------------------------
|
||||
# Enable less verbose build rules; with the default set to DEFAULT
|
||||
|
@ -940,8 +900,6 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 2
|
||||
|
||||
# AM_PROG_INSTALL_STRIP
|
||||
# ---------------------
|
||||
# One issue with vendor 'install' (even GNU) is that you can't
|
||||
|
@ -970,8 +928,6 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
|
@ -991,8 +947,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
|
|||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 3
|
||||
|
||||
# _AM_PROG_TAR(FORMAT)
|
||||
# --------------------
|
||||
# Check how to create a tarball in format FORMAT.
|
||||
|
|
|
@ -350,10 +350,35 @@
|
|||
/// <ul>
|
||||
/// <li>@ref UserManualActionsIntro</li>
|
||||
/// <li>@ref UserManualActionsHelloWorld</li>
|
||||
/// <li>@ref UserManualActionsMatches
|
||||
/// <ul>
|
||||
/// <li>@ref UserManualActionsMatchesExact</li>
|
||||
/// <li>@ref UserManualActionsMatchesPrefix</li>
|
||||
/// <li>@ref UserManualActionsMatchesParameterized</li>
|
||||
/// <li>@ref UserManualActionsMatchesConstraint</li>
|
||||
/// <li>@ref UserManualActionsMatchesOptional</li>
|
||||
/// <li>@ref UserManualActionsMatchesMethod</li>
|
||||
/// <li>@ref UserManualActionsMatching</li>
|
||||
/// </ul>
|
||||
/// </li>
|
||||
/// <li>@ref UserManualActionsHelloJson</li>
|
||||
/// <li>@ref UserManualActionsEcho</li>
|
||||
/// <li>@ref UserManualActionsDYO</li>
|
||||
/// <li>@ref UserManualActionsAdvanced</li>
|
||||
/// <li>@ref UserManualActionsContent
|
||||
/// <ul>
|
||||
/// <li>@ref UserManualActionsContentStatic</li>
|
||||
/// <li>@ref UserManualActionsContentAction</li>
|
||||
/// <li>@ref UserManualActionsContentController</li>
|
||||
/// <li>@ref UserManualActionsContentPrefix</li>
|
||||
/// <li>@ref UserManualActionsContentMethod</li>
|
||||
/// </ul>
|
||||
/// </li>
|
||||
/// <li>@ref UserManualActionsReqRes</li>
|
||||
/// <li>@ref UserManualActionsAdvanced
|
||||
/// <ul>
|
||||
/// <li>@ref UserManualActionsAdvancedRedirects</li>
|
||||
/// <li>@ref UserManualActionsAdvancedBundles</li>
|
||||
/// <li>@ref UserManualActionsAdvancedMiddleware</li>
|
||||
/// </ul>
|
||||
// </li>
|
||||
/// </ul>
|
||||
/// </li>
|
||||
/// </ul>
|
||||
|
@ -454,8 +479,8 @@
|
|||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello/world",
|
||||
/// ........> callback: {
|
||||
/// ........> url: { match: "/hello/world" },
|
||||
/// ........> content: {
|
||||
/// ........> contentType: "text/html",
|
||||
/// ........> body: "<html><body>Hello World</body></html>" }});
|
||||
/// @endcode
|
||||
|
@ -464,13 +489,186 @@
|
|||
/// or call the internal reload function.
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> require("internal").reloadRouting()
|
||||
/// arangosh> require("org/arangodb/routing").reload()
|
||||
/// @endcode
|
||||
///
|
||||
/// Now use the browser and access
|
||||
///
|
||||
/// @LIT{http://localhost:8529/hello/world}
|
||||
///
|
||||
/// You should see the @LIT{Hello World} in our browser.
|
||||
///
|
||||
/// @section UserManualActionsMatches Matching an URL
|
||||
/////////////////////////////////////////////////////
|
||||
///
|
||||
/// There are a lot of options for the @LIT{url} attribute. If you define
|
||||
/// different routing for the same path, then the following simple rule is
|
||||
/// applied in order to determine which match wins: If there are two matches,
|
||||
/// then the more specific wins. I. e, if there is a wildcard match and an exact
|
||||
/// match, the exact match is prefered. If there is a short and a long match,
|
||||
/// the longer match wins.
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesExact Exact Match
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/world" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the match must be exact. Only the request for @LIT{/hello/world} will
|
||||
/// match, everything else, e. g. @LIT{/hello/world/my} or @LIT{/hello/world2},
|
||||
/// will not match.
|
||||
///
|
||||
/// The following definition is a short-cut for an exact match.
|
||||
///
|
||||
/// @code
|
||||
/// { url: "/hello/world" }
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesPrefix Prefix Match
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/world/*" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the match can be a prefix match. The requests for @LIT{/hello/world},
|
||||
/// @LIT{/hello/world/my}, and @LIT{/hello/world/how/are/you} will all
|
||||
/// match. However @LIT{/hello/world2} does not match. Prefix matches within an
|
||||
/// URL part, i. e. @LIT{/hello/world*}, are not allowed. The wildcard must
|
||||
/// occur at the end, i. e.
|
||||
///
|
||||
/// @code
|
||||
/// /hello/*/world
|
||||
/// @endcode
|
||||
///
|
||||
/// is also disallowed.
|
||||
///
|
||||
/// If you define two routes
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/world/*" } }
|
||||
/// { url: { match: "/hello/world/emil" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the second route will be used for @LIT{/hello/world/emil} because it is
|
||||
/// more specific.
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesParameterized Parameterized Match
|
||||
///
|
||||
/// A parameterized match is similar to a prefix match, but the parameters are
|
||||
/// also allowed inside the URL path.
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/:name/world" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the URL must have three parts, the first part being @LIT{hello} and the
|
||||
/// third part @LIT{world}. For example, @LIT{/hello/emil/world} will match,
|
||||
/// while @LIT{/hello/emil/meyer/world} will not.
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesConstraint Constraint Match
|
||||
///
|
||||
/// A constraint match is similar to a parameterized match, but the parameters
|
||||
/// carries a constraint.
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/:name/world", constraint: { name: "/[a-z]+/" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the URL must have three parts, the first part being @LIT{hello} and the
|
||||
/// third part @LIT{world}. The second part must be all lowercase.
|
||||
///
|
||||
/// It is possible to use more then one constraint for the same URL part.
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/:name|:id/world",
|
||||
/// constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesOptional Optional Match
|
||||
///
|
||||
/// An optional match is similar to a parameterized match, but the last
|
||||
/// parameter is optional.
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/:name?", constraint: { name: "/[a-z]+/" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the URL @LIT{/hello} and @LIT{/hello/emil} will match.
|
||||
///
|
||||
/// If the definitions are
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/world" } }
|
||||
/// { url: { match: "/hello/:name", constraint: { name: "/[a-z]+/" } }
|
||||
/// { url: { match: "/hello/*" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// then the URL @LIT{/hello/world} will be matched by the first route, because it
|
||||
/// is the most specific. The URL @LIT{/hello/you} will be matched by the second
|
||||
/// route, because it is more specific than the prefix match.
|
||||
///
|
||||
/// @subsection UserManualActionsMatchesMethod Method Restriction
|
||||
///
|
||||
/// You can restrict the match to specific methods.
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/world", methods: [ "post", "put" ] }
|
||||
/// @endcode
|
||||
///
|
||||
/// then only @LIT{POST} and @LIT{PUT} requests will match.
|
||||
///
|
||||
/// @subsection UserManualActionsMatching More on Matching
|
||||
///
|
||||
/// Remember that the more specific match wins.
|
||||
///
|
||||
/// - A match without parameter or wildcard is more specific than a match with
|
||||
/// parameters or wildcard.
|
||||
/// - A match with parameter is more specific than a match with a wildcard.
|
||||
/// - If there is more than one parameter, specificity is applied from left to
|
||||
/// right.
|
||||
///
|
||||
/// Consider the following definitions
|
||||
///
|
||||
/// @code
|
||||
/// (1) { url: { match: "/hello/world" } }
|
||||
/// (2) { url: { match: "/hello/:name", constraint: { name: "/[a-z]+/" } }
|
||||
/// (3) { url: { match: "/:something/world" }
|
||||
/// (4) { url: { match: "/hello/*" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// Then
|
||||
///
|
||||
/// - @LIT{/hello/world} is match by (1)
|
||||
/// - @LIT{/hello/emil} is match by (2)
|
||||
/// - @LIT{/your/world} is match by (3)
|
||||
/// - @LIT{/hello/you} is match by (4)
|
||||
///
|
||||
/// You can write the following document into the @LIT{_routing} collection
|
||||
/// to test the above examples.
|
||||
///
|
||||
/// @code
|
||||
/// {
|
||||
/// routes: [
|
||||
/// { url: { match: "/hello/world" }, content: "route 1" },
|
||||
/// { url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "route 2" },
|
||||
/// { url: { match: "/:something/world" }, content: "route 3" },
|
||||
/// { url: { match: "/hello/*" }, content: "route 4" },
|
||||
/// ]
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// @section UserManualActionsHelloJson A Hello World Example for JSON
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
|
@ -478,8 +676,8 @@
|
|||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello/json",
|
||||
/// ........> callback: {
|
||||
/// ........> url: "/hello/json",
|
||||
/// ........> content: {
|
||||
/// ........> contentType: "application/json",
|
||||
/// ........> body: "{ \"hello\" : \"world\" }" }});
|
||||
/// arangosh> require("internal").reloadRouting()
|
||||
|
@ -500,12 +698,163 @@
|
|||
/// { "hello" : "world" }
|
||||
/// @endcode
|
||||
///
|
||||
/// @section UserManualActionsEcho A Dynamic Example
|
||||
////////////////////////////////////////////////////
|
||||
/// @section UserManualActionsContent Delivering Content
|
||||
////////////////////////////////////////////////////////
|
||||
///
|
||||
/// The above examples deliver static content, which is fine for an example.
|
||||
/// But the real power of actions lies in dynamic actions which use JavaScript
|
||||
/// to construct the result.
|
||||
/// There are a lot of different ways on how to deliver content. We have already
|
||||
/// seen the simplest one, where static content is delivered. The fun, however,
|
||||
/// starts when delivering dynamic content.
|
||||
///
|
||||
/// @subsection UserManualActionsContentStatic Static Content
|
||||
///
|
||||
/// You can specify a body and a content-type.
|
||||
///
|
||||
/// @code
|
||||
/// { content: {
|
||||
/// contentType: "text/html",
|
||||
/// body: "<html><body>Hallo World</body></html>"
|
||||
/// }
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// If the content type is @LIT{text/plain} then you can use the short-cut
|
||||
///
|
||||
/// @code
|
||||
/// { content: "Hallo World" }
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsContentAction A Simple Action
|
||||
///
|
||||
/// The simplest dynamic action is:
|
||||
///
|
||||
/// @code
|
||||
/// { action: "org/arangodb/actions/echoRequest" }
|
||||
/// @endcode
|
||||
///
|
||||
/// It is not possible to store functions directly in the routing table, but you
|
||||
/// can call functions defined in modules. In the above example the function can
|
||||
/// be accessed from JavaScript as:
|
||||
///
|
||||
/// @LIT{require("org/arangodb/actions").echoRequest}
|
||||
///
|
||||
/// The function @LIT{echoRequest} is pre-defined. It takes the request objects
|
||||
/// and echos it in the response.
|
||||
///
|
||||
/// The signature of such a function must be
|
||||
///
|
||||
/// @code
|
||||
/// function (req, res, next, options)
|
||||
/// @endcode
|
||||
///
|
||||
/// For example
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> url: "/hello/echo",
|
||||
/// ........> action: "org/arangodb/actions/echoRequest" });
|
||||
/// @endcode
|
||||
///
|
||||
/// Reload the routing and check
|
||||
///
|
||||
/// @LIT{http://127.0.0.1:8529/hello/echo}
|
||||
///
|
||||
/// You should see something like
|
||||
///
|
||||
/// @code
|
||||
/// {
|
||||
/// "request": {
|
||||
/// "path": "/hello/echo",
|
||||
/// "headers": {
|
||||
/// "accept-encoding": "gzip, deflate",
|
||||
/// "accept-language": "de-de,de;q=0.8,en-us;q=0.5,en;q=0.3",
|
||||
/// "connection": "keep-alive",
|
||||
/// "content-length": "0",
|
||||
/// "host": "localhost:8529",
|
||||
/// "user-agent": "Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0"
|
||||
/// },
|
||||
/// "requestType": "GET",
|
||||
/// "parameters": { }
|
||||
/// },
|
||||
/// "options": { }
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// The request might contain @LIT{path}, @LIT{prefix}, @LIT{suffix}, and
|
||||
/// @LIT{urlParameters} attributes. @LIT{path} is the complete path as supplied
|
||||
/// by the user and always available. If a prefix was matched, then this prefix
|
||||
/// is stored in the attribute @LIT{prefix} and the remaining URL parts are
|
||||
/// stored as an array in @LIT{suffix}. If one or more parameters were matched,
|
||||
/// then the parameter values are stored in @LIT{urlParameters}.
|
||||
///
|
||||
/// For example, if the url description is
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: "/hello/:name/:action" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// and you request the path @LIT{/hello/emil/jump}, then the request object
|
||||
/// will contain the following attribute
|
||||
///
|
||||
/// @code
|
||||
/// urlParameters: { name: "emil", action: "jump" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsContentController Action Controller
|
||||
///
|
||||
/// As an alternative to the simple action, you can use controllers. A
|
||||
/// controller is a module, defines the function @LIT{get}, @LIT{put},
|
||||
/// @LIT{post}, @LIT{delete}, @LIT{head}, @LIT{patch}. If a request of
|
||||
/// the corresponding type is matched, the function will be called.
|
||||
///
|
||||
/// For example
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> url: "/hello/echo",
|
||||
/// ........> action: { controller: "org/arangodb/actions/echoController" } });
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsContentPrefix Prefix Action Controller
|
||||
///
|
||||
/// The controller is selected when the definition is read. There is a
|
||||
/// more flexible, but slower and maybe insecure variant, the prefix
|
||||
/// controller.
|
||||
///
|
||||
/// Assume that the url is a prefix match
|
||||
///
|
||||
/// @code
|
||||
/// { url: { match: /hello/*" } }
|
||||
/// @endcode
|
||||
///
|
||||
/// You can use
|
||||
///
|
||||
/// @code
|
||||
/// { prefixController: "org/arangodb/actions" }
|
||||
/// @endcode
|
||||
///
|
||||
/// to define a prefix controller. If the URL @LIT{/hello/echoController} is
|
||||
/// given, then the module @LIT{org/arangodb/actions/echoController} is used.
|
||||
///
|
||||
/// If you use an prefix controller, you should make certain that no unwanted
|
||||
/// actions are available under the prefix.
|
||||
///
|
||||
/// @subsection UserManualActionsContentMethod Method Restriction
|
||||
///
|
||||
/// You can restrict the match to specific methods.
|
||||
///
|
||||
/// If the definition is
|
||||
///
|
||||
/// @code
|
||||
/// { controller: "org/arangodb/actions/echoController", methods: [ "post", "put" ] }
|
||||
/// @endcode
|
||||
///
|
||||
/// then only @LIT{POST} and @LIT{PUT} requests will match.
|
||||
///
|
||||
/// @section UserManualActionsReqRes Requests and Responses
|
||||
///////////////////////////////////////////////////////////
|
||||
///
|
||||
/// The controller must define handler functions which take a request object and
|
||||
/// fill the response object.
|
||||
///
|
||||
/// A very simple example is the function @LIT{echoRequest} defined in
|
||||
/// the module @LIT{org/arangodb/actions}.
|
||||
|
@ -522,21 +871,12 @@
|
|||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// That functions accepts a request and returns this request as JSON object.
|
||||
///
|
||||
/// It is not possible to store functions directly in the routing table, but you
|
||||
/// can call functions defined in modules. In the above example the function can
|
||||
/// be accessed from JavaScript as:
|
||||
///
|
||||
/// @LIT{require("org/arangodb/actions").echoRequest}
|
||||
///
|
||||
/// You can use it in the routing collection by specifying the name
|
||||
/// @LIT{"org/arangodb/actions/echoRequest"}.
|
||||
/// Install it as
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello/echo",
|
||||
/// ........> callback: "org/arangodb/actions/echoRequest" });
|
||||
/// ........> url: "/echo",
|
||||
/// ........> action: "org/arangodb/actions/echoRequest" });
|
||||
/// @endcode
|
||||
///
|
||||
/// Reload the routing and check
|
||||
|
@ -569,30 +909,30 @@
|
|||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// Please note that
|
||||
/// Note that
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello/echo",
|
||||
/// ........> callback: "org/arangodb/actions/echoRequest" });
|
||||
/// ........> url: "/echo",
|
||||
/// ........> action: "org/arangodb/actions/echoRequest" });
|
||||
/// @endcode
|
||||
///
|
||||
/// is a short-cut for
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello/echo-long",
|
||||
/// ........> callback: {
|
||||
/// ........> for: "org/arangodb/actions",
|
||||
/// ........> do: "echoRequest" }});
|
||||
/// ........> url: "/echo",
|
||||
/// ........> action: { do: "org/arangodb/actions/echoRequest" } });
|
||||
/// @endcode
|
||||
///
|
||||
/// The verbose form allows you to pass options to the called function:
|
||||
/// The latter form allows you to pass options to the called function:
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> a = db._routing.firstExample({path: "/hello/echo-long"});
|
||||
/// arangosh> a.callback.options = { option: "my option1" };
|
||||
/// arangosh> db._replace(a, a);
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> url: "/echo",
|
||||
/// ........> action: {
|
||||
/// ........> do: "org/arangodb/actions/echoRequest",
|
||||
/// ........> options: { "Hallo": "World" } } });
|
||||
/// @endcode
|
||||
///
|
||||
/// You should now see the options in the result.
|
||||
|
@ -609,91 +949,61 @@
|
|||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// @section UserManualActionsDYO Define Your Own Callback
|
||||
//////////////////////////////////////////////////////////
|
||||
///
|
||||
/// You can define your own callbacks by adding a new module to ArangoDB. In
|
||||
/// order to avoid name clashes modules should be named
|
||||
///
|
||||
/// @LIT{tld/domain/modulename}
|
||||
///
|
||||
/// where @LIT{domain.tld} is your domain name. For development you can store
|
||||
/// your code in files in the filesystem, see @ref MODULES_PATH and
|
||||
/// @ref MODULES.
|
||||
///
|
||||
/// However, when you are finished with the development, you can rollout the
|
||||
/// module code by storing it inside the @LIT{_modules} collection.
|
||||
///
|
||||
/// Create a file @LIT{hello-world.js} with the following content:
|
||||
///
|
||||
/// @code
|
||||
/// var actions = require("org/arangodb/actions");
|
||||
///
|
||||
/// exports.helloWorld = function (req, res) {
|
||||
/// res.contentType = "text/html";
|
||||
/// res.responseCode = actions.HTTP_OK;
|
||||
/// res.body = "<html><body>Hello World!</body></html>";
|
||||
/// };
|
||||
/// @endcode
|
||||
///
|
||||
/// Load this file as new module @LIT{de/celler/hello-world} into the database
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> require("internal").defineModule("de/celler/hello-world", "hello-world.js");
|
||||
/// @endcode
|
||||
///
|
||||
/// Define a corresponding routing
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/my/echo",
|
||||
/// ........> callback: "de/celler/hello-world/helloWorld" });
|
||||
/// arangosh> require("internal").reloadRouting()
|
||||
/// @endcode
|
||||
///
|
||||
/// and check it
|
||||
///
|
||||
/// @LIT{http://localhost:8529/my/echo}
|
||||
///
|
||||
/// @section UserManualActionsAdvanced Advanced Usages
|
||||
//////////////////////////////////////////////////////
|
||||
///
|
||||
/// For detailed information see the reference manual.
|
||||
///
|
||||
/// @subsection UserManualActionsAdvancedPrefix Using Prefixes
|
||||
//////////////////////////////////////////////////////////////
|
||||
/// @subsection UserManualActionsAdvancedRedirects Redirects
|
||||
///
|
||||
/// All the above definitions require an exact match. If you set the
|
||||
/// @LIT{prefix} attribute to @LIT{true}, additional paths are ignored and the
|
||||
/// URL also results in a match.
|
||||
/// Use the following for a permanent redirect:
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/hello",
|
||||
/// ........> prefix: true,
|
||||
/// ........> callback: "org/arangodb/actions/echoRequest" });
|
||||
/// ........> url: "/",
|
||||
/// ........> action: {
|
||||
/// ........> do: "org/arangodb/actions/redirectRequest",
|
||||
/// ........> options: {
|
||||
/// ........> permanently: true,
|
||||
/// ........> destination: "http://somewhere.else/" } } });
|
||||
/// @endcode
|
||||
///
|
||||
/// Now try
|
||||
/// @subsection UserManualActionsAdvancedBundles Routing Bundles
|
||||
///
|
||||
/// @LIT{http://localhost:8529/hello/this/is/ignored/but/available/in/path}
|
||||
///
|
||||
/// The complete path is available in the @LIT{path} attribute, while the
|
||||
/// matched prefix is available in the @LIT{prefix} attribute.
|
||||
/// Instead of adding all routes for package separately, you can
|
||||
/// specify a bundle.
|
||||
///
|
||||
/// @code
|
||||
/// {
|
||||
/// "request": {
|
||||
/// "prefix": "/hello",
|
||||
/// "path": "/hello/this/is/ignored/but/available/in/path",
|
||||
/// ...
|
||||
/// },
|
||||
/// "options": { }
|
||||
/// routes: [
|
||||
/// { url: "/url1", content: "..." },
|
||||
/// { url: "/url2", content: "..." },
|
||||
/// { url: "/url3", content: "..." },
|
||||
/// ...
|
||||
/// ]
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// The advantage is, that you can put all your routes into one document
|
||||
/// and use a common prefix.
|
||||
///
|
||||
/// @code
|
||||
/// {
|
||||
/// urlPrefix: "/test",
|
||||
///
|
||||
/// routes: [
|
||||
/// { url: "/url1", content: "..." },
|
||||
/// { url: "/url2", content: "..." },
|
||||
/// { url: "/url3", content: "..." },
|
||||
/// ...
|
||||
/// ]
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// will define the URL @LIT{/test/url1}, @LIT{/test/url2}, and
|
||||
/// @LIT{/test/url3}.
|
||||
///
|
||||
/// @subsection UserManualActionsAdvancedMiddleware Writing Middleware
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// Assume, you want to log every request. In this case you can easily define
|
||||
/// an action for the whole url-space @LIT{/}. This action simply logs
|
||||
|
@ -713,23 +1023,10 @@
|
|||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/",
|
||||
/// ........> topdown: true,
|
||||
/// ........> prefix: true,
|
||||
/// ........> callback: "org/arangodb/actions/logRequest" });
|
||||
/// @endcode
|
||||
///
|
||||
/// @subsection UserManualActionsAdvancedeRedirect Redirects
|
||||
////////////////////////////////////////////////////////////
|
||||
///
|
||||
/// Use the following for a permanent redirect:
|
||||
///
|
||||
/// @code
|
||||
/// arangosh> db._routing.save({
|
||||
/// ........> path: "/",
|
||||
/// ........> topdown: true,
|
||||
/// ........> prefix: true,
|
||||
/// ........> callback: { redirect: "http://somewhere.else.org/hallo" });
|
||||
/// ........> middleware: [
|
||||
/// ........> { url: { match: "/*" }, action: "org/arangodb/actions/logRequest" }
|
||||
/// ........> ]
|
||||
/// ........> });
|
||||
/// @endcode
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -740,5 +1037,5 @@
|
|||
// Local Variables:
|
||||
// mode: c++
|
||||
// mode: outline-minor
|
||||
// outline-regexp: "^\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
||||
// outline-regexp: "\\(/// @brief\\|/// {@inheritDoc}\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @section\\|/// @subsection\\|/// @\\}\\)"
|
||||
// End:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-02-10'
|
||||
timestamp='2012-06-17'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
|
@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit ;;
|
||||
*:Bitrig:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:OpenBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
|
@ -1256,7 +1260,7 @@ EOF
|
|||
NEO-?:NONSTOP_KERNEL:*:*)
|
||||
echo neo-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSE-?:NONSTOP_KERNEL:*:*)
|
||||
NSE-*:NONSTOP_KERNEL:*:*)
|
||||
echo nse-tandem-nsk${UNAME_RELEASE}
|
||||
exit ;;
|
||||
NSR-?:NONSTOP_KERNEL:*:*)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2012-02-10'
|
||||
timestamp='2012-06-17'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
|
@ -225,6 +225,12 @@ case $os in
|
|||
-isc*)
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-lynx*178)
|
||||
os=-lynxos178
|
||||
;;
|
||||
-lynx*5)
|
||||
os=-lynxos5
|
||||
;;
|
||||
-lynx*)
|
||||
os=-lynxos
|
||||
;;
|
||||
|
@ -1346,7 +1352,7 @@ case $os in
|
|||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
|
@ -1537,6 +1543,9 @@ case $basic_machine in
|
|||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
hexagon-*)
|
||||
os=-elf
|
||||
;;
|
||||
tic54x-*)
|
||||
os=-coff
|
||||
;;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2012-03-27.16; # UTC
|
||||
scriptversion=2012-07-12.20; # UTC
|
||||
|
||||
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
|
||||
|
||||
|
@ -334,6 +334,79 @@ icc)
|
|||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
|
||||
tmpdepfile="$base.d"
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir="$base.d-lock"
|
||||
trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0 ; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir $lockdir 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rm -rf $lockdir
|
||||
break
|
||||
else
|
||||
## the lock is being held by a different process,
|
||||
## wait until the winning process is done or we timeout
|
||||
while test -d $lockdir && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
|
|
|
@ -3168,12 +3168,6 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
|
||||
$as_echo "$MKDIR_P" >&6; }
|
||||
|
||||
mkdir_p="$MKDIR_P"
|
||||
case $mkdir_p in
|
||||
[\\/$]* | ?:[\\/]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
|
||||
for ac_prog in gawk mawk nawk awk
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
|
@ -3306,6 +3300,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
|
|||
|
||||
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
|
||||
|
||||
# For better backward compatibility. To be removed once Automake 1.9.x
|
||||
# dies out for good. For more background, see:
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
|
||||
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
|
||||
mkdir_p='$(MKDIR_P)'
|
||||
|
||||
# We need awk for the "check" target. The system "awk" is bad on
|
||||
# some platforms.
|
||||
# Always define AMTAR for backward compatibility. Yes, it's still used
|
||||
|
@ -9208,7 +9208,7 @@ if test "x$tr_MRUBY" = "xyes"; then
|
|||
MRUBY_LDFLAGS=""
|
||||
MRUBY_LIBS="${srcdir}/3rdParty/mruby/lib/libmruby.a"
|
||||
|
||||
TRI_MRUBY_VERSION="2012-07-02 (ac5838ac67d489c5321ac9cb0e8d6e50c6c4fd6f)"
|
||||
TRI_MRUBY_VERSION="2012-09-20 (15cf8fdea4a6598aa470e698e8cbc9b9b492319d)"
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
|
|
|
@ -44,36 +44,31 @@ var actions = require("org/arangodb/actions");
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function Routing (req, res) {
|
||||
var callbacks;
|
||||
var current;
|
||||
var i;
|
||||
var execute;
|
||||
var next;
|
||||
|
||||
callbacks = actions.routing(req.requestType, req.suffix);
|
||||
current = 0;
|
||||
action = actions.firstRouting(req.requestType, req.suffix);
|
||||
|
||||
next = function () {
|
||||
var callback;
|
||||
|
||||
if (callbacks.length <= current) {
|
||||
actions.resultNotImplemented(req, res,
|
||||
"unknown path '" + req.suffix.join("/") + "'");
|
||||
execute = function () {
|
||||
if (action.route === undefined) {
|
||||
actions.resultNotImplemented(req, res, "unknown path '" + req.suffix.join("/") + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
callback = callbacks[current++];
|
||||
req.path = action.route.path;
|
||||
req.prefix = action.prefix;
|
||||
req.suffix = action.suffix;
|
||||
req.urlParameters = action.urlParameters;
|
||||
|
||||
if (callback == null) {
|
||||
actions.resultNotImplemented(req, res,
|
||||
"not implemented '" + req.suffix.join("/") + "'");
|
||||
}
|
||||
else {
|
||||
req.prefix = callback.path;
|
||||
callback.func(req, res, next, callback.options);
|
||||
}
|
||||
action.route.callback.controller(req, res, next, action.route.callback.options);
|
||||
}
|
||||
|
||||
next();
|
||||
next = function () {
|
||||
action = actions.nextRouting(action);
|
||||
execute();
|
||||
}
|
||||
|
||||
execute();
|
||||
}
|
||||
|
||||
actions.defineHttp({
|
||||
|
@ -101,7 +96,7 @@ actions.defineHttp({
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
actions.defineHttp({
|
||||
url : "_admin/reloadRouting",
|
||||
url : "_admin/routing/reload",
|
||||
context : "admin",
|
||||
prefix : false,
|
||||
callback : function (req, res) {
|
||||
|
@ -114,6 +109,19 @@ actions.defineHttp({
|
|||
/// @brief returns system status information for the server
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
actions.defineHttp({
|
||||
url : "_admin/routing/routes",
|
||||
context : "admin",
|
||||
prefix : false,
|
||||
callback : function (req, res) {
|
||||
actions.resultOk(req, res, actions.HTTP_OK, actions.routingCache());
|
||||
}
|
||||
});
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief returns system status information for the server
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function AdminRedirect (req, res) {
|
||||
var dest = "/_admin/html/index.html";
|
||||
|
||||
|
|
|
@ -407,10 +407,24 @@ function help () {
|
|||
|
||||
internal.reloadRouting = function () {
|
||||
if (typeof arango !== 'undefined') {
|
||||
arango.POST("/_admin/reloadRouting", "");
|
||||
arango.POST("/_admin/routing/reload", "");
|
||||
}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief rebuilds the routing cache
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
internal.routingCache = function () {
|
||||
var result;
|
||||
|
||||
if (typeof arango !== 'undefined') {
|
||||
result = arango.GET("/_admin/routing/routes", "");
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -408,11 +408,25 @@ static string JS_client_client =
|
|||
"\n"
|
||||
" internal.reloadRouting = function () {\n"
|
||||
" if (typeof arango !== 'undefined') {\n"
|
||||
" arango.POST(\"/_admin/reloadRouting\", \"\");\n"
|
||||
" arango.POST(\"/_admin/routing/reload\", \"\");\n"
|
||||
" }\n"
|
||||
" };\n"
|
||||
"\n"
|
||||
"////////////////////////////////////////////////////////////////////////////////\n"
|
||||
"/// @brief rebuilds the routing cache\n"
|
||||
"////////////////////////////////////////////////////////////////////////////////\n"
|
||||
"\n"
|
||||
" internal.routingCache = function () {\n"
|
||||
" var result;\n"
|
||||
"\n"
|
||||
" if (typeof arango !== 'undefined') {\n"
|
||||
" result = arango.GET(\"/_admin/routing/routes\", \"\");\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" return result;\n"
|
||||
" };\n"
|
||||
"\n"
|
||||
"////////////////////////////////////////////////////////////////////////////////\n"
|
||||
"/// @}\n"
|
||||
"////////////////////////////////////////////////////////////////////////////////\n"
|
||||
"\n"
|
||||
|
|
|
@ -348,13 +348,7 @@ function RunTest (path) {
|
|||
var content;
|
||||
var f;
|
||||
|
||||
try {
|
||||
content = SYS_READ(path);
|
||||
}
|
||||
catch (err) {
|
||||
console.error("cannot load test file '%s'", path);
|
||||
return;
|
||||
}
|
||||
content = SYS_READ(path);
|
||||
|
||||
content = "(function(jsUnity){jsUnity.attachAssertions();" + content + "})";
|
||||
f = SYS_EXECUTE(content, undefined, path);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief example controller
|
||||
///
|
||||
/// @file
|
||||
///
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2012 triagens GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Dr. Frank Celler
|
||||
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var actions = require("org/arangodb/actions");
|
||||
|
||||
exports.head = function (req, res, next, options) {
|
||||
res.responseCode = actions.HTTP_OK;
|
||||
res.contentType = "application/json; charset=utf-8";
|
||||
res.body = "";
|
||||
}
|
||||
|
||||
exports.do = function (req, res, next, options) {
|
||||
res.responseCode = actions.HTTP_OK;
|
||||
res.contentType = "application/json; charset=utf-8";
|
||||
res.body = JSON.stringify(req);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Local Variables:
|
||||
// mode: outline-minor
|
||||
// outline-regexp: "\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
||||
// End:
|
|
@ -0,0 +1,478 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief tests for routing
|
||||
///
|
||||
/// @file
|
||||
///
|
||||
/// DISCLAIMER
|
||||
///
|
||||
/// Copyright 2010-2012 triagens GmbH, Cologne, Germany
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
/// Copyright holder is triAGENS GmbH, Cologne, Germany
|
||||
///
|
||||
/// @author Dr. Frank Celler
|
||||
/// @author Copyright 2012, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var actions = require("org/arangodb/actions");
|
||||
var internal = require("internal");
|
||||
var jsunity = require("jsunity");
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief single patterns routing
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function routingSuiteSingle () {
|
||||
var errors = internal.errors;
|
||||
var cn = "_routing";
|
||||
|
||||
return {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief set up
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
setUp : function () {
|
||||
internal.db._drop(cn);
|
||||
collection = internal.db._create(cn, { isSystem: true });
|
||||
|
||||
collection.save({
|
||||
url: { match: "/hello/world" },
|
||||
content: "c1"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: "/world/hello",
|
||||
content: "c2"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: "/prefix/hello/*",
|
||||
content: "c3"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: { match: "/param/:hello/world", constraint: { hello: "[0-9]+" } },
|
||||
content: "c4"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: { match: "/opt/:hello?", constraint: { hello: "[0-9]+" }, methods: [ 'get' ] },
|
||||
content: "c5"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: "/json",
|
||||
content: { contentType: "application/json", body: '{"text": "c6"}' }
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: "/p/h/*",
|
||||
content: "p1"
|
||||
});
|
||||
|
||||
collection.save({
|
||||
url: "/p/h",
|
||||
content: "p2"
|
||||
});
|
||||
|
||||
actions.reloadRouting();
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRouting: function () {
|
||||
var r = actions.firstRouting('GET', "/hello/world");
|
||||
assertEqual('c1', r.route.route.content);
|
||||
|
||||
assertEqual('/hello/world', r.route.path);
|
||||
assertEqual(undefined, r.prefix);
|
||||
assertEqual(undefined, r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (sort-cut for match)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingShort: function () {
|
||||
var r = actions.firstRouting('GET', "/world/hello");
|
||||
assertEqual('c2', r.route.route.content);
|
||||
|
||||
assertEqual('/world/hello', r.route.path);
|
||||
assertEqual(undefined, r.prefix);
|
||||
assertEqual(undefined, r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (prefix)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingPrefix: function () {
|
||||
var r = actions.firstRouting('GET', "/prefix/hello/world");
|
||||
assertEqual('c3', r.route.route.content);
|
||||
|
||||
assertEqual('/prefix/hello(/[^/]+)*', r.route.path);
|
||||
assertEqual('/prefix/hello', r.prefix);
|
||||
assertEqual(['world'], r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (parameter)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingParameter: function () {
|
||||
var r = actions.firstRouting('GET', "/param/12345/world");
|
||||
assertEqual('c4', r.route.route.content);
|
||||
|
||||
assertEqual('/param/[0-9]+/world', r.route.path);
|
||||
assertEqual(undefined, r.prefix);
|
||||
assertEqual(undefined, r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
|
||||
r = actions.firstRouting('GET', "/param/a12345/world");
|
||||
assertEqual(undefined, r.route);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (optional)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingOptional: function () {
|
||||
var r = actions.firstRouting('GET', "/opt/12345");
|
||||
assertEqual('c5', r.route.route.content);
|
||||
|
||||
assertEqual('/opt(/[0-9]+)?', r.route.path);
|
||||
assertEqual(undefined, r.prefix);
|
||||
assertEqual(undefined, r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
|
||||
r = actions.firstRouting('GET', "/opt");
|
||||
assertEqual('c5', r.route.route.content);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (optional)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingMethod: function () {
|
||||
var r = actions.firstRouting('HEAD', "/opt/12345");
|
||||
assertEqual(undefined, r.route);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing (prefix vs non-prefix)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRoutingNonPrefix: function () {
|
||||
var r = actions.firstRouting('GET', "/p/h");
|
||||
assertEqual('p2', r.route.route.content);
|
||||
|
||||
assertEqual('/p/h', r.route.path);
|
||||
assertEqual(undefined, r.prefix);
|
||||
assertEqual(undefined, r.suffix);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
|
||||
assertEqual('/p/h(/[^/]+)*', r.route.path);
|
||||
assertEqual('/p/h', r.prefix);
|
||||
assertEqual([], r.suffix);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: content string
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testContentString: function () {
|
||||
var r = actions.firstRouting('GET', "/opt/12345");
|
||||
|
||||
req = {};
|
||||
res = {};
|
||||
|
||||
r.route.callback.controller(req, res);
|
||||
|
||||
assertEqual(actions.HTTP_OK, res.responseCode);
|
||||
assertEqual("text/plain", res.contentType);
|
||||
assertEqual("c5", res.body);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: content json
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testContentJson: function () {
|
||||
var r = actions.firstRouting('GET', "/json");
|
||||
|
||||
req = {};
|
||||
res = {};
|
||||
|
||||
r.route.callback.controller(req, res);
|
||||
|
||||
assertEqual(actions.HTTP_OK, res.responseCode);
|
||||
assertEqual("application/json", res.contentType);
|
||||
assertEqual('{"text": "c6"}', res.body);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief bundle without prefix
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function routingSuiteBundle () {
|
||||
var errors = internal.errors;
|
||||
var cn = "_routing";
|
||||
|
||||
return {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief set up
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
setUp : function () {
|
||||
internal.db._drop(cn);
|
||||
collection = internal.db._create(cn, { isSystem: true });
|
||||
|
||||
collection.save({
|
||||
middleware: [
|
||||
{ url: { match: "/*" }, content: "m1" },
|
||||
{ url: { match: "/hello/*" }, content: "m2" },
|
||||
{ url: { match: "/hello/world" }, content: "m3" },
|
||||
{ url: { match: "/:name/world" }, content: "m4" }
|
||||
],
|
||||
|
||||
routes: [
|
||||
{ url: { match: "/*" }, content: "c1" },
|
||||
{ url: { match: "/hello/*" }, content: "c2" },
|
||||
{ url: { match: "/hello/world" }, content: "c3" },
|
||||
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "c4" },
|
||||
{ url: { match: "/hello/:name/:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "c5" },
|
||||
{ url: { match: "/:name/world" }, content: "c6" },
|
||||
{ url: { match: "/hello" }, content: "c7" }
|
||||
]
|
||||
});
|
||||
|
||||
actions.reloadRouting();
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: routing cache
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testRoutingCache: function () {
|
||||
var cache = actions.routingCache();
|
||||
|
||||
assertEqual(3, cache.routes.GET.exact.hello.parameters.length);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRouting: function () {
|
||||
var r = actions.firstRouting('GET', "/hello/world");
|
||||
assertEqual('m1', r.route.route.content);
|
||||
assertEqual('(/[^/]+)*', r.route.path);
|
||||
|
||||
// middleware: unspecific to specific
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m4', r.route.route.content);
|
||||
assertEqual('/[^/]+/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m2', r.route.route.content);
|
||||
assertEqual('/hello(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m3', r.route.route.content);
|
||||
assertEqual('/hello/world', r.route.path);
|
||||
|
||||
// routing: specific to unspecific
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c3', r.route.route.content);
|
||||
assertEqual('/hello/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c4', r.route.route.content);
|
||||
assertEqual(1, r.route.urlParameters.name);
|
||||
assertEqual('/hello/[a-z]+', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c2', r.route.route.content);
|
||||
assertEqual('/hello(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c6', r.route.route.content);
|
||||
assertEqual('/[^/]+/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c1', r.route.route.content);
|
||||
assertEqual('(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- test suite
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief bundle with prefix
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function routingSuitePrefix () {
|
||||
var errors = internal.errors;
|
||||
var cn = "_routing";
|
||||
|
||||
return {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief set up
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
setUp : function () {
|
||||
internal.db._drop(cn);
|
||||
collection = internal.db._create(cn, { isSystem: true });
|
||||
|
||||
collection.save({
|
||||
urlPrefix: "/test",
|
||||
|
||||
middleware: [
|
||||
{ url: { match: "/*" }, content: "m1" },
|
||||
{ url: { match: "/hello/*" }, content: "m2" },
|
||||
{ url: { match: "/hello/world" }, content: "m3" },
|
||||
{ url: { match: "/:name/world" }, content: "m4" }
|
||||
],
|
||||
|
||||
routes: [
|
||||
{ url: { match: "/*" }, content: "c1" },
|
||||
{ url: { match: "/hello/*" }, content: "c2" },
|
||||
{ url: { match: "/hello/world" }, content: "c3" },
|
||||
{ url: { match: "/hello/:name|:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "c4" },
|
||||
{ url: { match: "/hello/:name/:id", constraint: { name: "/[a-z]+/", id: "/[0-9]+/" } }, content: "c5" },
|
||||
{ url: { match: "/:name/world" }, content: "c6" },
|
||||
{ url: { match: "/hello" }, content: "c7" }
|
||||
]
|
||||
});
|
||||
|
||||
actions.reloadRouting();
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: routing cache
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testRoutingCache: function () {
|
||||
var cache = actions.routingCache();
|
||||
|
||||
assertEqual(3, cache.routes.GET.exact.test.exact.hello.parameters.length);
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief test: simple routing
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
testSimpleRouting: function () {
|
||||
var r = actions.firstRouting('GET', "/test/hello/world");
|
||||
assertEqual('m1', r.route.route.content);
|
||||
assertEqual('/test(/[^/]+)*', r.route.path);
|
||||
|
||||
// middleware: unspecific to specific
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m4', r.route.route.content);
|
||||
assertEqual('/test/[^/]+/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m2', r.route.route.content);
|
||||
assertEqual('/test/hello(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('m3', r.route.route.content);
|
||||
assertEqual('/test/hello/world', r.route.path);
|
||||
|
||||
// routing: specific to unspecific
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c3', r.route.route.content);
|
||||
assertEqual('/test/hello/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c4', r.route.route.content);
|
||||
assertEqual(2, r.route.urlParameters.name);
|
||||
assertEqual('/test/hello/[a-z]+', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c2', r.route.route.content);
|
||||
assertEqual('/test/hello(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c6', r.route.route.content);
|
||||
assertEqual('/test/[^/]+/world', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual('c1', r.route.route.content);
|
||||
assertEqual('/test(/[^/]+)*', r.route.path);
|
||||
|
||||
r = actions.nextRouting(r);
|
||||
assertEqual(undefined, r.route);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- main
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief executes the test suites
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
jsunity.run(routingSuiteSingle);
|
||||
jsunity.run(routingSuiteBundle);
|
||||
jsunity.run(routingSuitePrefix);
|
||||
|
||||
return jsunity.done();
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// --SECTION-- END-OF-FILE
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Local Variables:
|
||||
// mode: outline-minor
|
||||
// outline-regexp: "\\(/// @brief\\|/// @addtogroup\\|// --SECTION--\\|/// @page\\|/// @\\}\\)"
|
||||
// End:
|
Loading…
Reference in New Issue