passenger 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- data/NEWS +27 -0
- data/build/common_library.rb +4 -0
- data/doc/ApplicationPool algorithm.txt +1 -1
- data/doc/cxxapi/AbstractSpawnManager_8h_source.html +141 -0
- data/doc/cxxapi/Account_8h_source.html +206 -0
- data/doc/cxxapi/AccountsDatabase_8h_source.html +161 -0
- data/doc/cxxapi/AgentBase_8h_source.html +70 -0
- data/doc/cxxapi/AgentsStarter_8h_source.html +112 -0
- data/doc/cxxapi/BCrypt_8h_source.html +104 -0
- data/doc/cxxapi/Blowfish_8h_source.html +134 -0
- data/doc/cxxapi/Bucket_8h_source.html +118 -0
- data/doc/cxxapi/Constants_8h_source.html +79 -0
- data/doc/cxxapi/ContentHandler_8h_source.html +95 -0
- data/doc/cxxapi/DirectoryMapper_8h_source.html +311 -0
- data/doc/cxxapi/EventedClient_8h_source.html +733 -0
- data/doc/cxxapi/EventedMessageServer_8h_source.html +358 -0
- data/doc/cxxapi/EventedServer_8h_source.html +326 -0
- data/doc/cxxapi/Exceptions_8h_source.html +393 -0
- data/doc/cxxapi/FileDescriptor_8h_source.html +324 -0
- data/doc/cxxapi/Hooks_8h_source.html +76 -0
- data/doc/cxxapi/HttpStatusExtractor_8h_source.html +382 -0
- data/doc/cxxapi/IniFile_8h_source.html +527 -0
- data/doc/cxxapi/Logging_8h_source.html +796 -0
- data/doc/cxxapi/MessageChannel_8h_source.html +776 -0
- data/doc/cxxapi/MessageClient_8h_source.html +328 -0
- data/doc/cxxapi/MessageReadersWriters_8h_source.html +539 -0
- data/doc/cxxapi/MessageServer_8h_source.html +612 -0
- data/doc/cxxapi/PoolOptions_8h_source.html +549 -0
- data/doc/cxxapi/Process_8h_source.html +286 -0
- data/doc/cxxapi/RandomGenerator_8h_source.html +191 -0
- data/doc/cxxapi/ResourceLocator_8h_source.html +166 -0
- data/doc/cxxapi/SafeLibev_8h_source.html +180 -0
- data/doc/cxxapi/ScgiRequestParser_8h_source.html +406 -0
- data/doc/cxxapi/ServerInstanceDir_8h_source.html +378 -0
- data/doc/cxxapi/Session_8h_source.html +501 -0
- data/doc/cxxapi/SpawnManager_8h_source.html +647 -0
- data/doc/cxxapi/StaticContentHandler_8h_source.html +68 -0
- data/doc/cxxapi/StaticString_8h_source.html +329 -0
- data/doc/cxxapi/StringListCreator_8h_source.html +114 -0
- data/doc/cxxapi/Utils_8h_source.html +459 -0
- data/doc/cxxapi/annotated.html +87 -0
- data/doc/cxxapi/apache2_2Configuration_8h_source.html +82 -0
- data/doc/cxxapi/classAgentWatcher-members.html +54 -0
- data/doc/cxxapi/classAgentWatcher.html +419 -0
- data/doc/cxxapi/classClient-members.html +38 -0
- data/doc/cxxapi/classClient.html +123 -0
- data/doc/cxxapi/classHooks-members.html +40 -0
- data/doc/cxxapi/classHooks.html +153 -0
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager-members.html +40 -0
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager.html +187 -0
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1AbstractSpawnManager__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1ArgumentException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1ArgumentException.html +56 -0
- data/doc/cxxapi/classPassenger_1_1ArrayMessage-members.html +37 -0
- data/doc/cxxapi/classPassenger_1_1ArrayMessage.html +113 -0
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +38 -0
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +112 -0
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1BusyException.html +54 -0
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +51 -0
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +41 -0
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +223 -0
- data/doc/cxxapi/classPassenger_1_1EOFException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1EOFException.html +61 -0
- data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1EOFException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1EventFd-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1EventFd.html +52 -0
- data/doc/cxxapi/classPassenger_1_1EventedClient-members.html +59 -0
- data/doc/cxxapi/classPassenger_1_1EventedClient.html +531 -0
- data/doc/cxxapi/classPassenger_1_1EventedMessageServer-members.html +37 -0
- data/doc/cxxapi/classPassenger_1_1EventedMessageServer.html +59 -0
- data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1EventedMessageServer__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1EventedServer-members.html +37 -0
- data/doc/cxxapi/classPassenger_1_1EventedServer.html +93 -0
- data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1EventedServer__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileDescriptor-members.html +41 -0
- data/doc/cxxapi/classPassenger_1_1FileDescriptor.html +178 -0
- data/doc/cxxapi/classPassenger_1_1FileDescriptorPair-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1FileDescriptorPair.html +52 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +58 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +41 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +66 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor-members.html +39 -0
- data/doc/cxxapi/classPassenger_1_1HttpStatusExtractor.html +128 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1IOException.html +61 -0
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +4 -0
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +57 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +839 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer-members.html +49 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer.html +407 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext.html +58 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1ClientContext__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext-members.html +41 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext.html +165 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1CommonClientContext__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler-members.html +39 -0
- data/doc/cxxapi/classPassenger_1_1MessageServer_1_1Handler.html +173 -0
- data/doc/cxxapi/classPassenger_1_1Process-members.html +44 -0
- data/doc/cxxapi/classPassenger_1_1Process.html +290 -0
- data/doc/cxxapi/classPassenger_1_1RandomGenerator-members.html +37 -0
- data/doc/cxxapi/classPassenger_1_1RandomGenerator.html +79 -0
- data/doc/cxxapi/classPassenger_1_1ResourceLocator-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1ResourceLocator.html +51 -0
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +54 -0
- data/doc/cxxapi/classPassenger_1_1SafeLibev-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1SafeLibev.html +51 -0
- data/doc/cxxapi/classPassenger_1_1ScalarMessage-members.html +37 -0
- data/doc/cxxapi/classPassenger_1_1ScalarMessage.html +76 -0
- data/doc/cxxapi/classPassenger_1_1ScgiRequestParser-members.html +50 -0
- data/doc/cxxapi/classPassenger_1_1ScgiRequestParser.html +285 -0
- data/doc/cxxapi/classPassenger_1_1SecurityException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1SecurityException.html +56 -0
- data/doc/cxxapi/classPassenger_1_1Session-members.html +53 -0
- data/doc/cxxapi/classPassenger_1_1Session.html +556 -0
- data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1Session__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +39 -0
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +101 -0
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +42 -0
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +292 -0
- data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1SpawnManager__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1StandardSession-members.html +54 -0
- data/doc/cxxapi/classPassenger_1_1StandardSession.html +394 -0
- data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1StandardSession__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1StaticString-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1StaticString.html +56 -0
- data/doc/cxxapi/classPassenger_1_1SyntaxError-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1SyntaxError.html +54 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +40 -0
- data/doc/cxxapi/classPassenger_1_1SystemException.html +155 -0
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +4 -0
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException-members.html +40 -0
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException.html +61 -0
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.map +3 -0
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.md5 +1 -0
- data/doc/cxxapi/classPassenger_1_1TimeRetrievalException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1TimeoutException-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1TimeoutException.html +54 -0
- data/doc/cxxapi/classPassenger_1_1Uint16Message-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1Uint16Message.html +51 -0
- data/doc/cxxapi/classPassenger_1_1Uint32Message-members.html +36 -0
- data/doc/cxxapi/classPassenger_1_1Uint32Message.html +51 -0
- data/doc/cxxapi/classServer-members.html +36 -0
- data/doc/cxxapi/classServer.html +49 -0
- data/doc/cxxapi/classServerInstanceDirToucher-members.html +36 -0
- data/doc/cxxapi/classServerInstanceDirToucher.html +47 -0
- data/doc/cxxapi/classes.html +52 -0
- data/doc/cxxapi/definitions_8h_source.html +36 -0
- data/doc/cxxapi/doxygen.css +532 -0
- data/doc/cxxapi/doxygen.png +0 -0
- data/doc/cxxapi/files.html +76 -0
- data/doc/cxxapi/ftv2blank.png +0 -0
- data/doc/cxxapi/ftv2doc.png +0 -0
- data/doc/cxxapi/ftv2folderclosed.png +0 -0
- data/doc/cxxapi/ftv2folderopen.png +0 -0
- data/doc/cxxapi/ftv2lastnode.png +0 -0
- data/doc/cxxapi/ftv2link.png +0 -0
- data/doc/cxxapi/ftv2mlastnode.png +0 -0
- data/doc/cxxapi/ftv2mnode.png +0 -0
- data/doc/cxxapi/ftv2node.png +0 -0
- data/doc/cxxapi/ftv2plastnode.png +0 -0
- data/doc/cxxapi/ftv2pnode.png +0 -0
- data/doc/cxxapi/ftv2vertline.png +0 -0
- data/doc/cxxapi/functions.html +103 -0
- data/doc/cxxapi/functions_0x62.html +82 -0
- data/doc/cxxapi/functions_0x63.html +102 -0
- data/doc/cxxapi/functions_0x64.html +102 -0
- data/doc/cxxapi/functions_0x65.html +88 -0
- data/doc/cxxapi/functions_0x66.html +100 -0
- data/doc/cxxapi/functions_0x67.html +167 -0
- data/doc/cxxapi/functions_0x68.html +88 -0
- data/doc/cxxapi/functions_0x69.html +96 -0
- data/doc/cxxapi/functions_0x6b.html +80 -0
- data/doc/cxxapi/functions_0x6c.html +88 -0
- data/doc/cxxapi/functions_0x6d.html +88 -0
- data/doc/cxxapi/functions_0x6e.html +86 -0
- data/doc/cxxapi/functions_0x6f.html +94 -0
- data/doc/cxxapi/functions_0x70.html +94 -0
- data/doc/cxxapi/functions_0x72.html +110 -0
- data/doc/cxxapi/functions_0x73.html +171 -0
- data/doc/cxxapi/functions_0x74.html +85 -0
- data/doc/cxxapi/functions_0x75.html +85 -0
- data/doc/cxxapi/functions_0x77.html +92 -0
- data/doc/cxxapi/functions_0x7e.html +79 -0
- data/doc/cxxapi/functions_enum.html +49 -0
- data/doc/cxxapi/functions_eval.html +67 -0
- data/doc/cxxapi/functions_func.html +531 -0
- data/doc/cxxapi/functions_vars.html +278 -0
- data/doc/cxxapi/graph_legend.dot +22 -0
- data/doc/cxxapi/graph_legend.html +92 -0
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Core.html +46 -0
- data/doc/cxxapi/group__Core.map +3 -0
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +53 -0
- data/doc/cxxapi/group__Hooks.html +42 -0
- data/doc/cxxapi/group__Hooks.map +3 -0
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +538 -0
- data/doc/cxxapi/hierarchy.html +101 -0
- data/doc/cxxapi/index.html +16 -0
- data/doc/cxxapi/inherit__graph__0.map +3 -0
- data/doc/cxxapi/inherit__graph__0.md5 +1 -0
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +3 -0
- data/doc/cxxapi/inherit__graph__1.md5 +1 -0
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +3 -0
- data/doc/cxxapi/inherit__graph__10.md5 +1 -0
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +4 -0
- data/doc/cxxapi/inherit__graph__11.md5 +1 -0
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +3 -0
- data/doc/cxxapi/inherit__graph__12.md5 +1 -0
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +3 -0
- data/doc/cxxapi/inherit__graph__13.md5 +1 -0
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +3 -0
- data/doc/cxxapi/inherit__graph__14.md5 +1 -0
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +3 -0
- data/doc/cxxapi/inherit__graph__15.md5 +1 -0
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +5 -0
- data/doc/cxxapi/inherit__graph__16.md5 +1 -0
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +3 -0
- data/doc/cxxapi/inherit__graph__17.md5 +1 -0
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.map +3 -0
- data/doc/cxxapi/inherit__graph__18.md5 +1 -0
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.map +4 -0
- data/doc/cxxapi/inherit__graph__19.md5 +1 -0
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +3 -0
- data/doc/cxxapi/inherit__graph__2.md5 +1 -0
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +3 -0
- data/doc/cxxapi/inherit__graph__20.md5 +1 -0
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +3 -0
- data/doc/cxxapi/inherit__graph__21.md5 +1 -0
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__22.map +3 -0
- data/doc/cxxapi/inherit__graph__22.md5 +1 -0
- data/doc/cxxapi/inherit__graph__22.png +0 -0
- data/doc/cxxapi/inherit__graph__23.map +3 -0
- data/doc/cxxapi/inherit__graph__23.md5 +1 -0
- data/doc/cxxapi/inherit__graph__23.png +0 -0
- data/doc/cxxapi/inherit__graph__24.map +3 -0
- data/doc/cxxapi/inherit__graph__24.md5 +1 -0
- data/doc/cxxapi/inherit__graph__24.png +0 -0
- data/doc/cxxapi/inherit__graph__25.map +3 -0
- data/doc/cxxapi/inherit__graph__25.md5 +1 -0
- data/doc/cxxapi/inherit__graph__25.png +0 -0
- data/doc/cxxapi/inherit__graph__26.map +3 -0
- data/doc/cxxapi/inherit__graph__26.md5 +1 -0
- data/doc/cxxapi/inherit__graph__26.png +0 -0
- data/doc/cxxapi/inherit__graph__27.map +3 -0
- data/doc/cxxapi/inherit__graph__27.md5 +1 -0
- data/doc/cxxapi/inherit__graph__27.png +0 -0
- data/doc/cxxapi/inherit__graph__28.map +3 -0
- data/doc/cxxapi/inherit__graph__28.md5 +1 -0
- data/doc/cxxapi/inherit__graph__28.png +0 -0
- data/doc/cxxapi/inherit__graph__29.map +3 -0
- data/doc/cxxapi/inherit__graph__29.md5 +1 -0
- data/doc/cxxapi/inherit__graph__29.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +4 -0
- data/doc/cxxapi/inherit__graph__3.md5 +1 -0
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__30.map +3 -0
- data/doc/cxxapi/inherit__graph__30.md5 +1 -0
- data/doc/cxxapi/inherit__graph__30.png +0 -0
- data/doc/cxxapi/inherit__graph__31.map +4 -0
- data/doc/cxxapi/inherit__graph__31.md5 +1 -0
- data/doc/cxxapi/inherit__graph__31.png +0 -0
- data/doc/cxxapi/inherit__graph__32.map +3 -0
- data/doc/cxxapi/inherit__graph__32.md5 +1 -0
- data/doc/cxxapi/inherit__graph__32.png +0 -0
- data/doc/cxxapi/inherit__graph__33.map +3 -0
- data/doc/cxxapi/inherit__graph__33.md5 +1 -0
- data/doc/cxxapi/inherit__graph__33.png +0 -0
- data/doc/cxxapi/inherit__graph__34.map +3 -0
- data/doc/cxxapi/inherit__graph__34.md5 +1 -0
- data/doc/cxxapi/inherit__graph__34.png +0 -0
- data/doc/cxxapi/inherit__graph__35.map +3 -0
- data/doc/cxxapi/inherit__graph__35.md5 +1 -0
- data/doc/cxxapi/inherit__graph__35.png +0 -0
- data/doc/cxxapi/inherit__graph__36.map +5 -0
- data/doc/cxxapi/inherit__graph__36.md5 +1 -0
- data/doc/cxxapi/inherit__graph__36.png +0 -0
- data/doc/cxxapi/inherit__graph__37.map +3 -0
- data/doc/cxxapi/inherit__graph__37.md5 +1 -0
- data/doc/cxxapi/inherit__graph__37.png +0 -0
- data/doc/cxxapi/inherit__graph__38.map +3 -0
- data/doc/cxxapi/inherit__graph__38.md5 +1 -0
- data/doc/cxxapi/inherit__graph__38.png +0 -0
- data/doc/cxxapi/inherit__graph__39.map +3 -0
- data/doc/cxxapi/inherit__graph__39.md5 +1 -0
- data/doc/cxxapi/inherit__graph__39.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +3 -0
- data/doc/cxxapi/inherit__graph__4.md5 +1 -0
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__40.map +3 -0
- data/doc/cxxapi/inherit__graph__40.md5 +1 -0
- data/doc/cxxapi/inherit__graph__40.png +0 -0
- data/doc/cxxapi/inherit__graph__41.map +3 -0
- data/doc/cxxapi/inherit__graph__41.md5 +1 -0
- data/doc/cxxapi/inherit__graph__41.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +3 -0
- data/doc/cxxapi/inherit__graph__5.md5 +1 -0
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +3 -0
- data/doc/cxxapi/inherit__graph__6.md5 +1 -0
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +3 -0
- data/doc/cxxapi/inherit__graph__7.md5 +1 -0
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +3 -0
- data/doc/cxxapi/inherit__graph__8.md5 +1 -0
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +3 -0
- data/doc/cxxapi/inherit__graph__9.md5 +1 -0
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +165 -0
- data/doc/cxxapi/main.html +28 -0
- data/doc/cxxapi/modules.html +36 -0
- data/doc/cxxapi/namespacePassenger.html +553 -0
- data/doc/cxxapi/namespacemembers.html +135 -0
- data/doc/cxxapi/namespacemembers_enum.html +48 -0
- data/doc/cxxapi/namespacemembers_eval.html +57 -0
- data/doc/cxxapi/namespacemembers_func.html +111 -0
- data/doc/cxxapi/namespacemembers_type.html +54 -0
- data/doc/cxxapi/namespaces.html +37 -0
- data/doc/cxxapi/nginx_2Configuration_8h_source.html +126 -0
- data/doc/cxxapi/ngx__http__passenger__module_8h_source.html +94 -0
- data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard-members.html +36 -0
- data/doc/cxxapi/structPassenger_1_1MessageServer_1_1DisconnectEventBroadcastGuard.html +51 -0
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +67 -0
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +647 -0
- data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash-members.html +36 -0
- data/doc/cxxapi/structPassenger_1_1StaticString_1_1Hash.html +51 -0
- data/doc/cxxapi/tab_b.gif +0 -0
- data/doc/cxxapi/tab_l.gif +0 -0
- data/doc/cxxapi/tab_r.gif +0 -0
- data/doc/cxxapi/tabs.css +105 -0
- data/doc/cxxapi/tree.html +249 -0
- data/doc/rdoc/classes/ConditionVariable.html +215 -0
- data/doc/rdoc/classes/Exception.html +120 -0
- data/doc/rdoc/classes/GC.html +113 -0
- data/doc/rdoc/classes/IO.html +221 -0
- data/doc/rdoc/classes/PhusionPassenger.html +397 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +180 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +647 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +654 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/InvalidPassword.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerAlreadyStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerError.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/ServerNotStarted.html +97 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer/UnknownMessage.html +96 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +619 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +142 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/MemoryStats/Process.html +231 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance.html +588 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/CorruptedDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/GenerationsAbsentError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Group.html +147 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Process.html +279 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/RoleDeniedError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/StaleDirectoryError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/Stats.html +123 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ServerInstance/UnsupportedGenerationStructureVersionError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Lock.html +194 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/Log.html +299 -0
- data/doc/rdoc/classes/PhusionPassenger/AnalyticsLogger/SharedData.html +206 -0
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +155 -0
- data/doc/rdoc/classes/PhusionPassenger/AppProcess.html +367 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner.html +351 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner.html +410 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRails/RequestHandler.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions.html +115 -0
- data/doc/rdoc/classes/PhusionPassenger/ClassicRailsExtensions/AnalyticsLogging.html +202 -0
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +172 -0
- data/doc/rdoc/classes/PhusionPassenger/DebugLogging.html +273 -0
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +145 -0
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +162 -0
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +141 -0
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +673 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel/InvalidHashError.html +92 -0
- data/doc/rdoc/classes/PhusionPassenger/MessageClient.html +415 -0
- data/doc/rdoc/classes/PhusionPassenger/NativeSupportLoader.html +134 -0
- data/doc/rdoc/classes/PhusionPassenger/Packaging.html +129 -0
- data/doc/rdoc/classes/PhusionPassenger/PlatformInfo.html +1972 -0
- data/doc/rdoc/classes/PhusionPassenger/Plugin.html +237 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +312 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +218 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions.html +114 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging.html +259 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ACExtension.html +139 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ASBenchmarkableExtension.html +118 -0
- data/doc/rdoc/classes/PhusionPassenger/Rails3Extensions/AnalyticsLogging/ExceptionLogger.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +378 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone.html +111 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/AppFinder.html +252 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Command.html +161 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile.html +368 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/ConfigFile/DisallowedContextError.html +132 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/HelpCommand.html +151 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Main.html +189 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/PackageRuntimeCommand.html +177 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/RuntimeInstaller.html +341 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StartCommand.html +203 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StatusCommand.html +156 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/StopCommand.html +168 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/Utils.html +86 -0
- data/doc/rdoc/classes/PhusionPassenger/Standalone/VersionCommand.html +135 -0
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +125 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +1543 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher.html +204 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/DirInfo.html +171 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/FileSystemWatcher/FileInfo.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/HostsFileParser.html +260 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html +194 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +265 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
- data/doc/rdoc/classes/PhusionPassenger/Utils/UnseekableSocket.html +561 -0
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +182 -0
- data/doc/rdoc/classes/Process.html +115 -0
- data/doc/rdoc/classes/Signal.html +139 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/DEVELOPERS_TXT.html +280 -0
- data/doc/rdoc/files/README.html +157 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +130 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +135 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/memory_stats_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/server_instance_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/analytics_logger_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/app_process_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/application_spawner_rb.html +141 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/framework_spawner_rb.html +146 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/classic_rails_extensions/init_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/debug_logging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +147 -0
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/message_client_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/native_support_rb.html +132 -0
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/apache_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/compiler_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/curl_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/documentation_tools_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/linux_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/operating_system_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/ruby_rb.html +128 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info/zlib_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/plugin_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/public_api_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +137 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +125 -0
- data/doc/rdoc/files/lib/phusion_passenger/rails3_extensions/init_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +160 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/app_finder_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/command_rb.html +136 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/config_file_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/help_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/main_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/package_runtime_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/runtime_installer_rb.html +133 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/start_command_rb.html +136 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/status_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/stop_command_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/utils_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/standalone/version_command_rb.html +127 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/file_system_watcher_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/hosts_file_parser_rb.html +120 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/tmpdir_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils/unseekable_socket_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +179 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +132 -0
- data/doc/rdoc/fr_class_index.html +139 -0
- data/doc/rdoc/fr_file_index.html +108 -0
- data/doc/rdoc/fr_method_index.html +439 -0
- data/doc/rdoc/index.html +26 -0
- data/doc/rdoc/rdoc-style.css +187 -0
- data/ext/apache2/Configuration.cpp +6 -6
- data/ext/apache2/Configuration.hpp +3 -3
- data/ext/apache2/HelperAgent.cpp +1 -1
- data/ext/apache2/Hooks.cpp +3 -3
- data/ext/common/ApplicationPool/Pool.h +1 -1
- data/ext/common/ApplicationPool/Server.h +5 -2
- data/ext/common/Constants.h +1 -1
- data/ext/common/LoggingAgent/FilterSupport.cpp +66 -0
- data/ext/common/LoggingAgent/FilterSupport.h +262 -73
- data/ext/common/LoggingAgent/RemoteSender.h +13 -4
- data/ext/common/Utils/CachedFileStat.cpp +6 -12
- data/ext/common/Utils/CachedFileStat.h +4 -4
- data/ext/common/libboost_oxt/aggregate.cpp +10 -0
- data/ext/common/libpassenger_common/aggregate.cpp +16 -0
- data/ext/nginx/Configuration.c +77 -4
- data/ext/nginx/Configuration.h +2 -1
- data/ext/nginx/ContentHandler.c +32 -4
- data/ext/nginx/HelperAgent.cpp +5 -4
- data/ext/nginx/ngx_http_passenger_module.c +6 -6
- data/ext/nginx/ngx_http_passenger_module.h +5 -5
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/abstract_request_handler.rb +4 -1
- data/lib/phusion_passenger/classic_rails_extensions/analytics_logging/ac_base_extension.rb +3 -1
- data/lib/phusion_passenger/standalone/runtime_installer.rb +1 -1
- data/lib/phusion_passenger/standalone/start_command.rb +6 -0
- data/lib/phusion_passenger/templates/standalone/config.erb +1 -1
- data/test/cxx/FilterSupportTest.cpp +135 -5
- metadata +547 -4
@@ -0,0 +1,134 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: PhusionPassenger::NativeSupportLoader</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::NativeSupportLoader</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/phusion_passenger/native_support_rb.html">lib/phusion_passenger/native_support.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
Object
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
<div class="sectiontitle">Methods</div>
|
82
|
+
<ul>
|
83
|
+
<li><a href="#M000316">start</a></li>
|
84
|
+
<li><a href="#M000315">supported?</a></li>
|
85
|
+
</ul>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
<div class="sectiontitle">Public Instance methods</div>
|
93
|
+
<div class="method">
|
94
|
+
<div class="title">
|
95
|
+
<a name="M000316"></a><b>start</b>()
|
96
|
+
</div>
|
97
|
+
<div class="sourcecode">
|
98
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000316_source')" id="l_M000316_source">show source</a> ]</p>
|
99
|
+
<div id="M000316_source" class="dyn-source">
|
100
|
+
<pre>
|
101
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/native_support.rb, line 31</span>
|
102
|
+
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start</span>
|
103
|
+
32: <span class="ruby-identifier">require</span> <span class="ruby-value str">'phusion_passenger'</span>
|
104
|
+
33: <span class="ruby-identifier">load_from_source_dir</span> <span class="ruby-operator">||</span>
|
105
|
+
34: <span class="ruby-identifier">load_from_load_path</span> <span class="ruby-operator">||</span>
|
106
|
+
35: <span class="ruby-identifier">load_from_home</span> <span class="ruby-operator">||</span>
|
107
|
+
36: <span class="ruby-identifier">compile_and_load</span>
|
108
|
+
37: <span class="ruby-keyword kw">end</span>
|
109
|
+
</pre>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
<div class="method">
|
114
|
+
<div class="title">
|
115
|
+
<a name="M000315"></a><b>supported?</b>()
|
116
|
+
</div>
|
117
|
+
<div class="sourcecode">
|
118
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000315_source')" id="l_M000315_source">show source</a> ]</p>
|
119
|
+
<div id="M000315_source" class="dyn-source">
|
120
|
+
<pre>
|
121
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/native_support.rb, line 27</span>
|
122
|
+
27: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">supported?</span>
|
123
|
+
28: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"ruby"</span> <span class="ruby-operator">||</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"rbx"</span>
|
124
|
+
29: <span class="ruby-keyword kw">end</span>
|
125
|
+
</pre>
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</div>
|
132
|
+
|
133
|
+
</body>
|
134
|
+
</html>
|
@@ -0,0 +1,129 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Module: PhusionPassenger::Packaging</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Module</span><br />PhusionPassenger::Packaging</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/phusion_passenger/packaging_rb.html">lib/phusion_passenger/packaging.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
</table>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
</table>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
<div id="content">
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div class="sectiontitle">Constants</div>
|
80
|
+
<table border='0' cellpadding='5'>
|
81
|
+
<tr valign='top'>
|
82
|
+
<td class="attr-name">ASCII_DOCS</td>
|
83
|
+
<td>=</td>
|
84
|
+
<td class="attr-value">[ 'doc/Users guide Apache.html', 'doc/Users guide Nginx.html', 'doc/Users guide Standalone.html', 'doc/Security of user switching support.html', 'doc/Architectural overview.html'</td>
|
85
|
+
</tr>
|
86
|
+
<tr valign='top'>
|
87
|
+
<td> </td>
|
88
|
+
<td colspan="2" class="attr-desc">
|
89
|
+
A list of HTML files that are generated with Asciidoc.
|
90
|
+
|
91
|
+
</td>
|
92
|
+
</tr>
|
93
|
+
<tr valign='top'>
|
94
|
+
<td class="attr-name">USER_EXECUTABLES</td>
|
95
|
+
<td>=</td>
|
96
|
+
<td class="attr-value">[ 'passenger', 'passenger-install-apache2-module', 'passenger-install-nginx-module', 'passenger-config'</td>
|
97
|
+
</tr>
|
98
|
+
<tr valign='top'>
|
99
|
+
<td class="attr-name">SUPER_USER_EXECUTABLES</td>
|
100
|
+
<td>=</td>
|
101
|
+
<td class="attr-value">[ 'passenger-status', 'passenger-memory-stats', 'passenger-make-enterprisey'</td>
|
102
|
+
</tr>
|
103
|
+
<tr valign='top'>
|
104
|
+
<td class="attr-name">GLOB</td>
|
105
|
+
<td>=</td>
|
106
|
+
<td class="attr-value">[ 'Rakefile', 'README', 'DEVELOPERS.TXT', 'PACKAGING.TXT', 'LICENSE', 'INSTALL', 'NEWS', 'build/*.rb', 'lib/*.rb', 'lib/**/*.rb', 'lib/**/*.py', 'lib/phusion_passenger/templates/*', 'lib/phusion_passenger/templates/apache2/*', 'lib/phusion_passenger/templates/nginx/*', 'lib/phusion_passenger/templates/standalone/*', 'lib/phusion_passenger/templates/standalone_default_root/*', 'bin/*', 'doc/**/*', 'man/*', 'debian/*', 'helper-scripts/*', 'ext/common/**/*.{cpp,c,h,hpp}', 'ext/apache2/*.{cpp,h,hpp,c}', 'ext/nginx/*.{c,cpp,h}', 'ext/nginx/config', 'ext/boost/**/*', 'ext/google/**/*', 'ext/libev/{LICENSE,Changes,README,Makefile.am,Makefile.in}', 'ext/libev/{*.m4,autogen.sh,config.guess,config.h.in,config.sub}', 'ext/libev/{configure,configure.ac,install-sh,ltmain.sh,missing,mkinstalldirs}', 'ext/libev/{*.h,*.c}', 'ext/oxt/*.hpp', 'ext/oxt/*.cpp', 'ext/oxt/detail/*.hpp', 'ext/ruby/*.{c,rb}', 'dev/*', 'resources/*', 'test/*.example', 'test/support/*.{c,cpp,h,rb}', 'test/tut/*', 'test/cxx/*.{cpp,h}', 'test/oxt/*.{cpp,hpp}', 'test/ruby/**/*', 'test/integration_tests/**/*', 'test/stub/**/*'</td>
|
107
|
+
</tr>
|
108
|
+
<tr valign='top'>
|
109
|
+
<td> </td>
|
110
|
+
<td colspan="2" class="attr-desc">
|
111
|
+
A list of globs which match all files that should be packaged in the
|
112
|
+
Phusion Passenger gem or tarball.
|
113
|
+
|
114
|
+
</td>
|
115
|
+
</tr>
|
116
|
+
<tr valign='top'>
|
117
|
+
<td class="attr-name">EXCLUDE_GLOB</td>
|
118
|
+
<td>=</td>
|
119
|
+
<td class="attr-value">[ 'test/stub/rails_apps/3.0/empty/help/**/*'</td>
|
120
|
+
</tr>
|
121
|
+
</table>
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
</body>
|
129
|
+
</html>
|
@@ -0,0 +1,1972 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Module: PhusionPassenger::PlatformInfo</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Module</span><br />PhusionPassenger::PlatformInfo</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/phusion_passenger/platform_info_rb.html">lib/phusion_passenger/platform_info.rb</a>
|
61
|
+
<a href="../../files/lib/phusion_passenger/platform_info/apache_rb.html">lib/phusion_passenger/platform_info/apache.rb</a>
|
62
|
+
<a href="../../files/lib/phusion_passenger/platform_info/binary_compatibility_rb.html">lib/phusion_passenger/platform_info/binary_compatibility.rb</a>
|
63
|
+
<a href="../../files/lib/phusion_passenger/platform_info/compiler_rb.html">lib/phusion_passenger/platform_info/compiler.rb</a>
|
64
|
+
<a href="../../files/lib/phusion_passenger/platform_info/curl_rb.html">lib/phusion_passenger/platform_info/curl.rb</a>
|
65
|
+
<a href="../../files/lib/phusion_passenger/platform_info/documentation_tools_rb.html">lib/phusion_passenger/platform_info/documentation_tools.rb</a>
|
66
|
+
<a href="../../files/lib/phusion_passenger/platform_info/linux_rb.html">lib/phusion_passenger/platform_info/linux.rb</a>
|
67
|
+
<a href="../../files/lib/phusion_passenger/platform_info/operating_system_rb.html">lib/phusion_passenger/platform_info/operating_system.rb</a>
|
68
|
+
<a href="../../files/lib/phusion_passenger/platform_info/ruby_rb.html">lib/phusion_passenger/platform_info/ruby.rb</a>
|
69
|
+
<a href="../../files/lib/phusion_passenger/platform_info/zlib_rb.html">lib/phusion_passenger/platform_info/zlib.rb</a>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
</td>
|
74
|
+
</tr>
|
75
|
+
</table>
|
76
|
+
<!-- banner header -->
|
77
|
+
|
78
|
+
<div id="bodyContent">
|
79
|
+
<div id="content">
|
80
|
+
|
81
|
+
<div class="description"><p>
|
82
|
+
Users can change the detection behavior by setting the environment variable
|
83
|
+
<tt>APXS2</tt> to the correct ‘apxs’ (or ‘<a
|
84
|
+
href="PlatformInfo.html#M000032">apxs2</a>’) binary, as provided by
|
85
|
+
Apache.
|
86
|
+
</p>
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
<div class="sectiontitle">Methods</div>
|
92
|
+
<ul>
|
93
|
+
<li><a href="#M000037">apache2_bindir</a></li>
|
94
|
+
<li><a href="#M000039">apache2_module_cflags</a></li>
|
95
|
+
<li><a href="#M000040">apache2_module_ldflags</a></li>
|
96
|
+
<li><a href="#M000038">apache2_sbindir</a></li>
|
97
|
+
<li><a href="#M000033">apache2ctl</a></li>
|
98
|
+
<li><a href="#M000035">apr_config</a></li>
|
99
|
+
<li><a href="#M000045">apr_config_needed_for_building_apache_modules?</a></li>
|
100
|
+
<li><a href="#M000041">apr_flags</a></li>
|
101
|
+
<li><a href="#M000042">apr_libs</a></li>
|
102
|
+
<li><a href="#M000036">apu_config</a></li>
|
103
|
+
<li><a href="#M000043">apu_flags</a></li>
|
104
|
+
<li><a href="#M000044">apu_libs</a></li>
|
105
|
+
<li><a href="#M000032">apxs2</a></li>
|
106
|
+
<li><a href="#M000060">asciidoc</a></li>
|
107
|
+
<li><a href="#M000030">cc</a></li>
|
108
|
+
<li><a href="#M000049">compiler_supports_visibility_flag?</a></li>
|
109
|
+
<li><a href="#M000050">compiler_supports_wno_attributes_flag?</a></li>
|
110
|
+
<li><a href="#M000051">compiler_visibility_flag_generates_warnings?</a></li>
|
111
|
+
<li><a href="#M000065">cpu_architectures</a></li>
|
112
|
+
<li><a href="#M000057">curl_flags</a></li>
|
113
|
+
<li><a href="#M000058">curl_libs</a></li>
|
114
|
+
<li><a href="#M000059">curl_supports_ssl?</a></li>
|
115
|
+
<li><a href="#M000031">cxx</a></li>
|
116
|
+
<li><a href="#M000055">debugging_cflags</a></li>
|
117
|
+
<li><a href="#M000029">env_defined?</a></li>
|
118
|
+
<li><a href="#M000056">export_dynamic_flags</a></li>
|
119
|
+
<li><a href="#M000028">find_command</a></li>
|
120
|
+
<li><a href="#M000071">gem_command</a></li>
|
121
|
+
<li><a href="#M000048">gnu_make</a></li>
|
122
|
+
<li><a href="#M000052">has_math_library?</a></li>
|
123
|
+
<li><a href="#M000034">httpd</a></li>
|
124
|
+
<li><a href="#M000075">in_rvm?</a></li>
|
125
|
+
<li><a href="#M000064">library_extension</a></li>
|
126
|
+
<li><a href="#M000061">linux_distro</a></li>
|
127
|
+
<li><a href="#M000062">linux_distro_tags</a></li>
|
128
|
+
<li><a href="#M000079">locate_ruby_tool</a></li>
|
129
|
+
<li><a href="#M000063">os_name</a></li>
|
130
|
+
<li><a href="#M000047">passenger_binary_compatibility_id</a></li>
|
131
|
+
<li><a href="#M000053">portability_cflags</a></li>
|
132
|
+
<li><a href="#M000054">portability_ldflags</a></li>
|
133
|
+
<li><a href="#M000072">rake</a></li>
|
134
|
+
<li><a href="#M000073">rake_command</a></li>
|
135
|
+
<li><a href="#M000074">rspec</a></li>
|
136
|
+
<li><a href="#M000068">ruby_command</a></li>
|
137
|
+
<li><a href="#M000069">ruby_executable</a></li>
|
138
|
+
<li><a href="#M000046">ruby_extension_binary_compatibility_ids</a></li>
|
139
|
+
<li><a href="#M000078">ruby_sudo_command</a></li>
|
140
|
+
<li><a href="#M000070">ruby_supports_fork?</a></li>
|
141
|
+
<li><a href="#M000076">rvm_path</a></li>
|
142
|
+
<li><a href="#M000077">rvm_ruby_string</a></li>
|
143
|
+
<li><a href="#M000067">supports_lfence_instruction?</a></li>
|
144
|
+
<li><a href="#M000066">supports_sfence_instruction?</a></li>
|
145
|
+
<li><a href="#M000080">zlib_flags</a></li>
|
146
|
+
<li><a href="#M000081">zlib_libs</a></li>
|
147
|
+
</ul>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<div class="sectiontitle">Constants</div>
|
153
|
+
<table border='0' cellpadding='5'>
|
154
|
+
<tr valign='top'>
|
155
|
+
<td class="attr-name">GEM_HOME</td>
|
156
|
+
<td>=</td>
|
157
|
+
<td class="attr-value">gem_home</td>
|
158
|
+
</tr>
|
159
|
+
<tr valign='top'>
|
160
|
+
<td class="attr-name">RUBY_ENGINE</td>
|
161
|
+
<td>=</td>
|
162
|
+
<td class="attr-value">::RUBY_ENGINE</td>
|
163
|
+
</tr>
|
164
|
+
<tr valign='top'>
|
165
|
+
<td class="attr-name">RUBY_ENGINE</td>
|
166
|
+
<td>=</td>
|
167
|
+
<td class="attr-value">"ruby"</td>
|
168
|
+
</tr>
|
169
|
+
</table>
|
170
|
+
|
171
|
+
|
172
|
+
<div class="sectiontitle">Public Class methods</div>
|
173
|
+
<div class="method">
|
174
|
+
<div class="title">
|
175
|
+
<a name="M000037"></a><b>apache2_bindir</b>()
|
176
|
+
</div>
|
177
|
+
<div class="description">
|
178
|
+
<p>
|
179
|
+
The absolute path to the Apache 2 ‘bin’ directory, or nil if
|
180
|
+
unknown.
|
181
|
+
</p>
|
182
|
+
</div>
|
183
|
+
<div class="sourcecode">
|
184
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000037_source')" id="l_M000037_source">show source</a> ]</p>
|
185
|
+
<div id="M000037_source" class="dyn-source">
|
186
|
+
<pre>
|
187
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 140</span>
|
188
|
+
140: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_bindir</span>
|
189
|
+
141: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
190
|
+
142: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
191
|
+
143: <span class="ruby-keyword kw">else</span>
|
192
|
+
144: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
193
|
+
145: <span class="ruby-keyword kw">end</span>
|
194
|
+
146: <span class="ruby-keyword kw">end</span>
|
195
|
+
</pre>
|
196
|
+
</div>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
<div class="method">
|
200
|
+
<div class="title">
|
201
|
+
<a name="M000039"></a><b>apache2_module_cflags</b>(with_apr_flags = true)
|
202
|
+
</div>
|
203
|
+
<div class="description">
|
204
|
+
<p>
|
205
|
+
The C compiler flags that are necessary to compile an Apache module. Also
|
206
|
+
includes APR and APU compiler flags if with_apr_flags is true.
|
207
|
+
</p>
|
208
|
+
</div>
|
209
|
+
<div class="sourcecode">
|
210
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show source</a> ]</p>
|
211
|
+
<div id="M000039_source" class="dyn-source">
|
212
|
+
<pre>
|
213
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 164</span>
|
214
|
+
164: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_cflags</span>(<span class="ruby-identifier">with_apr_flags</span> = <span class="ruby-keyword kw">true</span>)
|
215
|
+
165: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-fPIC"</span>]
|
216
|
+
166: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">compiler_supports_visibility_flag?</span>
|
217
|
+
167: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"-fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED"</span>
|
218
|
+
168: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">compiler_visibility_flag_generates_warnings?</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">compiler_supports_wno_attributes_flag?</span>
|
219
|
+
169: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"-Wno-attributes"</span>
|
220
|
+
170: <span class="ruby-keyword kw">end</span>
|
221
|
+
171: <span class="ruby-keyword kw">end</span>
|
222
|
+
172: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">with_apr_flags</span>
|
223
|
+
173: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apr_flags</span>
|
224
|
+
174: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apu_flags</span>
|
225
|
+
175: <span class="ruby-keyword kw">end</span>
|
226
|
+
176: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
227
|
+
177: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-node">`#{apxs2} -q CFLAGS`</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" -I"</span> <span class="ruby-operator"><<</span> <span class="ruby-node">`#{apxs2} -q INCLUDEDIR`</span>.<span class="ruby-identifier">strip</span>
|
228
|
+
178: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/-O\d? /</span>, <span class="ruby-value str">''</span>)
|
229
|
+
179:
|
230
|
+
180: <span class="ruby-comment cmt"># Remove flags not supported by GCC</span>
|
231
|
+
181: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span> <span class="ruby-comment cmt"># TODO: Add support for people using SunStudio</span>
|
232
|
+
182: <span class="ruby-comment cmt"># The big problem is Coolstack apxs includes a bunch of solaris -x directives.</span>
|
233
|
+
183: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">split</span>
|
234
|
+
184: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-x/</span> }
|
235
|
+
185: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-Xa/</span> }
|
236
|
+
186: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-fast/</span> }
|
237
|
+
187: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-mt/</span> }
|
238
|
+
188: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
239
|
+
189: <span class="ruby-keyword kw">end</span>
|
240
|
+
190:
|
241
|
+
191: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">strip!</span>
|
242
|
+
192: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apxs2_flags</span>
|
243
|
+
193: <span class="ruby-keyword kw">end</span>
|
244
|
+
194: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">httpd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
245
|
+
195: <span class="ruby-comment cmt"># The default Apache install on OS X is a universal binary.</span>
|
246
|
+
196: <span class="ruby-comment cmt"># Figure out which architectures it's compiled for and do the same</span>
|
247
|
+
197: <span class="ruby-comment cmt"># thing for mod_passenger. We use the 'file' utility to do this.</span>
|
248
|
+
198: <span class="ruby-comment cmt">#</span>
|
249
|
+
199: <span class="ruby-comment cmt"># Running 'file' on the Apache executable usually outputs something</span>
|
250
|
+
200: <span class="ruby-comment cmt"># like this:</span>
|
251
|
+
201: <span class="ruby-comment cmt">#</span>
|
252
|
+
202: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O universal binary with 4 architectures</span>
|
253
|
+
203: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc</span>
|
254
|
+
204: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64</span>
|
255
|
+
205: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture i386): Mach-O executable i386</span>
|
256
|
+
206: <span class="ruby-comment cmt"># /usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64</span>
|
257
|
+
207: <span class="ruby-comment cmt">#</span>
|
258
|
+
208: <span class="ruby-comment cmt"># But on some machines, it may output just:</span>
|
259
|
+
209: <span class="ruby-comment cmt">#</span>
|
260
|
+
210: <span class="ruby-comment cmt"># /usr/sbin/httpd: Mach-O fat file with 4 architectures</span>
|
261
|
+
211: <span class="ruby-comment cmt">#</span>
|
262
|
+
212: <span class="ruby-comment cmt"># (http://code.google.com/p/phusion-passenger/issues/detail?id=236)</span>
|
263
|
+
213: <span class="ruby-identifier">output</span> = <span class="ruby-node">`file "#{httpd}"`</span>.<span class="ruby-identifier">strip</span>
|
264
|
+
214: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mach-O fat file/</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">output</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/for architecture/</span>
|
265
|
+
215: <span class="ruby-identifier">architectures</span> = [<span class="ruby-value str">"-arch i386 -arch ppc -arch x86_64 -arch ppc64"</span>]
|
266
|
+
216: <span class="ruby-keyword kw">else</span>
|
267
|
+
217: <span class="ruby-identifier">architectures</span> = []
|
268
|
+
218: <span class="ruby-identifier">output</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/for architecture/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
269
|
+
219: <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/for architecture (.*?)\)/</span>
|
270
|
+
220: <span class="ruby-identifier">architectures</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-arch #{$1}"</span>
|
271
|
+
221: <span class="ruby-keyword kw">end</span>
|
272
|
+
222: <span class="ruby-keyword kw">end</span>
|
273
|
+
223: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
274
|
+
224: <span class="ruby-keyword kw">end</span>
|
275
|
+
225: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
|
276
|
+
226: <span class="ruby-keyword kw">end</span>
|
277
|
+
</pre>
|
278
|
+
</div>
|
279
|
+
</div>
|
280
|
+
</div>
|
281
|
+
<div class="method">
|
282
|
+
<div class="title">
|
283
|
+
<a name="M000040"></a><b>apache2_module_ldflags</b>()
|
284
|
+
</div>
|
285
|
+
<div class="description">
|
286
|
+
<p>
|
287
|
+
Linker flags that are necessary for linking an Apache module. Already
|
288
|
+
includes APR and APU linker flags.
|
289
|
+
</p>
|
290
|
+
</div>
|
291
|
+
<div class="sourcecode">
|
292
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show source</a> ]</p>
|
293
|
+
<div id="M000040_source" class="dyn-source">
|
294
|
+
<pre>
|
295
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 231</span>
|
296
|
+
231: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_ldflags</span>
|
297
|
+
232: <span class="ruby-identifier">flags</span> = <span class="ruby-node">"-fPIC #{apr_libs} #{apu_libs}"</span>
|
298
|
+
233: <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">strip!</span>
|
299
|
+
234: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>
|
300
|
+
235: <span class="ruby-keyword kw">end</span>
|
301
|
+
</pre>
|
302
|
+
</div>
|
303
|
+
</div>
|
304
|
+
</div>
|
305
|
+
<div class="method">
|
306
|
+
<div class="title">
|
307
|
+
<a name="M000038"></a><b>apache2_sbindir</b>()
|
308
|
+
</div>
|
309
|
+
<div class="description">
|
310
|
+
<p>
|
311
|
+
The absolute path to the Apache 2 ‘sbin’ directory, or nil if
|
312
|
+
unknown.
|
313
|
+
</p>
|
314
|
+
</div>
|
315
|
+
<div class="sourcecode">
|
316
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000038_source')" id="l_M000038_source">show source</a> ]</p>
|
317
|
+
<div id="M000038_source" class="dyn-source">
|
318
|
+
<pre>
|
319
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 150</span>
|
320
|
+
150: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_sbindir</span>
|
321
|
+
151: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
322
|
+
152: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
323
|
+
153: <span class="ruby-keyword kw">else</span>
|
324
|
+
154: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q SBINDIR`</span>.<span class="ruby-identifier">strip</span>
|
325
|
+
155: <span class="ruby-keyword kw">end</span>
|
326
|
+
156: <span class="ruby-keyword kw">end</span>
|
327
|
+
</pre>
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
</div>
|
331
|
+
<div class="method">
|
332
|
+
<div class="title">
|
333
|
+
<a name="M000033"></a><b>apache2ctl</b>()
|
334
|
+
</div>
|
335
|
+
<div class="description">
|
336
|
+
<p>
|
337
|
+
The absolute path to the ‘apachectl’ or ‘<a
|
338
|
+
href="PlatformInfo.html#M000033">apache2ctl</a>’ binary, or nil if
|
339
|
+
not found.
|
340
|
+
</p>
|
341
|
+
</div>
|
342
|
+
<div class="sourcecode">
|
343
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show source</a> ]</p>
|
344
|
+
<div id="M000033_source" class="dyn-source">
|
345
|
+
<pre>
|
346
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 60</span>
|
347
|
+
60: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2ctl</span>
|
348
|
+
61: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-value str">'apache2ctl'</span>, <span class="ruby-value str">'apachectl2'</span>, <span class="ruby-value str">'apachectl'</span>)
|
349
|
+
62: <span class="ruby-keyword kw">end</span>
|
350
|
+
</pre>
|
351
|
+
</div>
|
352
|
+
</div>
|
353
|
+
</div>
|
354
|
+
<div class="method">
|
355
|
+
<div class="title">
|
356
|
+
<a name="M000035"></a><b>apr_config</b>()
|
357
|
+
</div>
|
358
|
+
<div class="description">
|
359
|
+
<p>
|
360
|
+
The absolute path to the ‘apr-config’ or
|
361
|
+
‘apr-1-config’ executable, or nil if not found.
|
362
|
+
</p>
|
363
|
+
</div>
|
364
|
+
<div class="sourcecode">
|
365
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show source</a> ]</p>
|
366
|
+
<div id="M000035_source" class="dyn-source">
|
367
|
+
<pre>
|
368
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 86</span>
|
369
|
+
86: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config</span>
|
370
|
+
87: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APR_CONFIG'</span>)
|
371
|
+
88: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APR_CONFIG'</span>]
|
372
|
+
89: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
373
|
+
90: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
374
|
+
91: <span class="ruby-keyword kw">else</span>
|
375
|
+
92: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APR_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
376
|
+
93: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
377
|
+
94: <span class="ruby-identifier">apr_bindir</span> = <span class="ruby-node">`#{apxs2} -q APR_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
378
|
+
95: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apr_bindir</span>.<span class="ruby-identifier">empty?</span>
|
379
|
+
96: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
380
|
+
97: <span class="ruby-keyword kw">else</span>
|
381
|
+
98: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apr_bindir</span>,
|
382
|
+
99: <span class="ruby-value str">"apr-1-config"</span>, <span class="ruby-value str">"apr-config"</span>)
|
383
|
+
100: <span class="ruby-keyword kw">end</span>
|
384
|
+
101: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
385
|
+
102: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
386
|
+
103: <span class="ruby-keyword kw">else</span>
|
387
|
+
104: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
388
|
+
105: <span class="ruby-keyword kw">end</span>
|
389
|
+
106: <span class="ruby-keyword kw">end</span>
|
390
|
+
107: <span class="ruby-keyword kw">end</span>
|
391
|
+
</pre>
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
</div>
|
395
|
+
<div class="method">
|
396
|
+
<div class="title">
|
397
|
+
<a name="M000045"></a><b>apr_config_needed_for_building_apache_modules?</b>()
|
398
|
+
</div>
|
399
|
+
<div class="description">
|
400
|
+
<p>
|
401
|
+
Returns whether it is necessary to use information outputted by
|
402
|
+
‘apr-config’ and ‘apu-config’ in order to compile
|
403
|
+
an Apache module. When Apache is installed with —with-included-apr,
|
404
|
+
the APR/APU headers are placed into the same directory as the Apache
|
405
|
+
headers, and so ‘apr-config’ and ‘apu-config’
|
406
|
+
won‘t be necessary in that case.
|
407
|
+
</p>
|
408
|
+
</div>
|
409
|
+
<div class="sourcecode">
|
410
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show source</a> ]</p>
|
411
|
+
<div id="M000045_source" class="dyn-source">
|
412
|
+
<pre>
|
413
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 266</span>
|
414
|
+
266: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config_needed_for_building_apache_modules?</span>
|
415
|
+
267: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">"/tmp/passenger-platform-check-#{Process.pid}.c"</span>)
|
416
|
+
268: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
417
|
+
269: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-value str">"#include <apr.h>"</span>)
|
418
|
+
270: <span class="ruby-keyword kw">end</span>
|
419
|
+
271: <span class="ruby-keyword kw">begin</span>
|
420
|
+
272: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') >/dev/null 2>/dev/null"</span>)
|
421
|
+
273: <span class="ruby-keyword kw">ensure</span>
|
422
|
+
274: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
423
|
+
275: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-node">"#{filename}.o"</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
424
|
+
276: <span class="ruby-keyword kw">end</span>
|
425
|
+
277: <span class="ruby-keyword kw">end</span>
|
426
|
+
</pre>
|
427
|
+
</div>
|
428
|
+
</div>
|
429
|
+
</div>
|
430
|
+
<div class="method">
|
431
|
+
<div class="title">
|
432
|
+
<a name="M000041"></a><b>apr_flags</b>()
|
433
|
+
</div>
|
434
|
+
<div class="description">
|
435
|
+
<p>
|
436
|
+
The C compiler flags that are necessary for programs that use APR.
|
437
|
+
</p>
|
438
|
+
</div>
|
439
|
+
<div class="sourcecode">
|
440
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show source</a> ]</p>
|
441
|
+
<div id="M000041_source" class="dyn-source">
|
442
|
+
<pre>
|
443
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 239</span>
|
444
|
+
239: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_flags</span>
|
445
|
+
240: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">0</span>]
|
446
|
+
241: <span class="ruby-keyword kw">end</span>
|
447
|
+
</pre>
|
448
|
+
</div>
|
449
|
+
</div>
|
450
|
+
</div>
|
451
|
+
<div class="method">
|
452
|
+
<div class="title">
|
453
|
+
<a name="M000042"></a><b>apr_libs</b>()
|
454
|
+
</div>
|
455
|
+
<div class="description">
|
456
|
+
<p>
|
457
|
+
The linker flags that are necessary for linking programs that use APR.
|
458
|
+
</p>
|
459
|
+
</div>
|
460
|
+
<div class="sourcecode">
|
461
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show source</a> ]</p>
|
462
|
+
<div id="M000042_source" class="dyn-source">
|
463
|
+
<pre>
|
464
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 244</span>
|
465
|
+
244: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_libs</span>
|
466
|
+
245: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">1</span>]
|
467
|
+
246: <span class="ruby-keyword kw">end</span>
|
468
|
+
</pre>
|
469
|
+
</div>
|
470
|
+
</div>
|
471
|
+
</div>
|
472
|
+
<div class="method">
|
473
|
+
<div class="title">
|
474
|
+
<a name="M000036"></a><b>apu_config</b>()
|
475
|
+
</div>
|
476
|
+
<div class="description">
|
477
|
+
<p>
|
478
|
+
The absolute path to the ‘apu-config’ or
|
479
|
+
‘apu-1-config’ executable, or nil if not found.
|
480
|
+
</p>
|
481
|
+
</div>
|
482
|
+
<div class="sourcecode">
|
483
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show source</a> ]</p>
|
484
|
+
<div id="M000036_source" class="dyn-source">
|
485
|
+
<pre>
|
486
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 112</span>
|
487
|
+
112: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_config</span>
|
488
|
+
113: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APU_CONFIG'</span>)
|
489
|
+
114: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APU_CONFIG'</span>]
|
490
|
+
115: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
491
|
+
116: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
492
|
+
117: <span class="ruby-keyword kw">else</span>
|
493
|
+
118: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APU_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
494
|
+
119: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
495
|
+
120: <span class="ruby-identifier">apu_bindir</span> = <span class="ruby-node">`#{apxs2} -q APU_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
496
|
+
121: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apu_bindir</span>.<span class="ruby-identifier">empty?</span>
|
497
|
+
122: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
498
|
+
123: <span class="ruby-keyword kw">else</span>
|
499
|
+
124: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apu_bindir</span>,
|
500
|
+
125: <span class="ruby-value str">"apu-1-config"</span>, <span class="ruby-value str">"apu-config"</span>)
|
501
|
+
126: <span class="ruby-keyword kw">end</span>
|
502
|
+
127: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
503
|
+
128: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
504
|
+
129: <span class="ruby-keyword kw">else</span>
|
505
|
+
130: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
506
|
+
131: <span class="ruby-keyword kw">end</span>
|
507
|
+
132: <span class="ruby-keyword kw">end</span>
|
508
|
+
133: <span class="ruby-keyword kw">end</span>
|
509
|
+
</pre>
|
510
|
+
</div>
|
511
|
+
</div>
|
512
|
+
</div>
|
513
|
+
<div class="method">
|
514
|
+
<div class="title">
|
515
|
+
<a name="M000043"></a><b>apu_flags</b>()
|
516
|
+
</div>
|
517
|
+
<div class="description">
|
518
|
+
<p>
|
519
|
+
The C compiler flags that are necessary for programs that use APR-Util.
|
520
|
+
</p>
|
521
|
+
</div>
|
522
|
+
<div class="sourcecode">
|
523
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show source</a> ]</p>
|
524
|
+
<div id="M000043_source" class="dyn-source">
|
525
|
+
<pre>
|
526
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 249</span>
|
527
|
+
249: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_flags</span>
|
528
|
+
250: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">0</span>]
|
529
|
+
251: <span class="ruby-keyword kw">end</span>
|
530
|
+
</pre>
|
531
|
+
</div>
|
532
|
+
</div>
|
533
|
+
</div>
|
534
|
+
<div class="method">
|
535
|
+
<div class="title">
|
536
|
+
<a name="M000044"></a><b>apu_libs</b>()
|
537
|
+
</div>
|
538
|
+
<div class="description">
|
539
|
+
<p>
|
540
|
+
The linker flags that are necessary for linking programs that use APR-Util.
|
541
|
+
</p>
|
542
|
+
</div>
|
543
|
+
<div class="sourcecode">
|
544
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show source</a> ]</p>
|
545
|
+
<div id="M000044_source" class="dyn-source">
|
546
|
+
<pre>
|
547
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 254</span>
|
548
|
+
254: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_libs</span>
|
549
|
+
255: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">1</span>]
|
550
|
+
256: <span class="ruby-keyword kw">end</span>
|
551
|
+
</pre>
|
552
|
+
</div>
|
553
|
+
</div>
|
554
|
+
</div>
|
555
|
+
<div class="method">
|
556
|
+
<div class="title">
|
557
|
+
<a name="M000032"></a><b>apxs2</b>()
|
558
|
+
</div>
|
559
|
+
<div class="description">
|
560
|
+
<p>
|
561
|
+
The absolute path to the ‘apxs’ or ‘<a
|
562
|
+
href="PlatformInfo.html#M000032">apxs2</a>’ executable, or nil if not
|
563
|
+
found.
|
564
|
+
</p>
|
565
|
+
</div>
|
566
|
+
<div class="sourcecode">
|
567
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
|
568
|
+
<div id="M000032_source" class="dyn-source">
|
569
|
+
<pre>
|
570
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 44</span>
|
571
|
+
44: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apxs2</span>
|
572
|
+
45: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">"APXS2"</span>)
|
573
|
+
46: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"APXS2"</span>]
|
574
|
+
47: <span class="ruby-keyword kw">end</span>
|
575
|
+
48: [<span class="ruby-value str">'apxs2'</span>, <span class="ruby-value str">'apxs'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
576
|
+
49: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
577
|
+
50: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
578
|
+
51: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
579
|
+
52: <span class="ruby-keyword kw">end</span>
|
580
|
+
53: <span class="ruby-keyword kw">end</span>
|
581
|
+
54: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
582
|
+
55: <span class="ruby-keyword kw">end</span>
|
583
|
+
</pre>
|
584
|
+
</div>
|
585
|
+
</div>
|
586
|
+
</div>
|
587
|
+
<div class="method">
|
588
|
+
<div class="title">
|
589
|
+
<a name="M000060"></a><b>asciidoc</b>()
|
590
|
+
</div>
|
591
|
+
<div class="sourcecode">
|
592
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000060_source')" id="l_M000060_source">show source</a> ]</p>
|
593
|
+
<div id="M000060_source" class="dyn-source">
|
594
|
+
<pre>
|
595
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/documentation_tools.rb, line 29</span>
|
596
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">asciidoc</span>
|
597
|
+
30: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'asciidoc'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'mizuho-asciidoc'</span>)
|
598
|
+
31: <span class="ruby-keyword kw">end</span>
|
599
|
+
</pre>
|
600
|
+
</div>
|
601
|
+
</div>
|
602
|
+
</div>
|
603
|
+
<div class="method">
|
604
|
+
<div class="title">
|
605
|
+
<a name="M000030"></a><b>cc</b>()
|
606
|
+
</div>
|
607
|
+
<div class="sourcecode">
|
608
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
|
609
|
+
<div id="M000030_source" class="dyn-source">
|
610
|
+
<pre>
|
611
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 159</span>
|
612
|
+
159: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cc</span>
|
613
|
+
160: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'CC'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"gcc"</span>
|
614
|
+
161: <span class="ruby-keyword kw">end</span>
|
615
|
+
</pre>
|
616
|
+
</div>
|
617
|
+
</div>
|
618
|
+
</div>
|
619
|
+
<div class="method">
|
620
|
+
<div class="title">
|
621
|
+
<a name="M000049"></a><b>compiler_supports_visibility_flag?</b>()
|
622
|
+
</div>
|
623
|
+
<div class="sourcecode">
|
624
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show source</a> ]</p>
|
625
|
+
<div id="M000049_source" class="dyn-source">
|
626
|
+
<pre>
|
627
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 49</span>
|
628
|
+
49: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">compiler_supports_visibility_flag?</span>
|
629
|
+
50: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">try_compile</span>(<span class="ruby-identifier">:c</span>, <span class="ruby-value str">''</span>, <span class="ruby-value str">'-fvisibility=hidden'</span>)
|
630
|
+
51: <span class="ruby-keyword kw">end</span>
|
631
|
+
</pre>
|
632
|
+
</div>
|
633
|
+
</div>
|
634
|
+
</div>
|
635
|
+
<div class="method">
|
636
|
+
<div class="title">
|
637
|
+
<a name="M000050"></a><b>compiler_supports_wno_attributes_flag?</b>()
|
638
|
+
</div>
|
639
|
+
<div class="sourcecode">
|
640
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show source</a> ]</p>
|
641
|
+
<div id="M000050_source" class="dyn-source">
|
642
|
+
<pre>
|
643
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 54</span>
|
644
|
+
54: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">compiler_supports_wno_attributes_flag?</span>
|
645
|
+
55: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">try_compile</span>(<span class="ruby-identifier">:c</span>, <span class="ruby-value str">''</span>, <span class="ruby-value str">'-Wno-attributes'</span>)
|
646
|
+
56: <span class="ruby-keyword kw">end</span>
|
647
|
+
</pre>
|
648
|
+
</div>
|
649
|
+
</div>
|
650
|
+
</div>
|
651
|
+
<div class="method">
|
652
|
+
<div class="title">
|
653
|
+
<a name="M000051"></a><b>compiler_visibility_flag_generates_warnings?</b>()
|
654
|
+
</div>
|
655
|
+
<div class="description">
|
656
|
+
<p>
|
657
|
+
Returns whether compiling C++ with -fvisibility=hidden might result in tons
|
658
|
+
of useless warnings, like this: <a
|
659
|
+
href="http://code.google.com/p/phusion-passenger/issues/detail?id=526">code.google.com/p/phusion-passenger/issues/detail?id=526</a>
|
660
|
+
This appears to be a bug in older g++ versions: <a
|
661
|
+
href="http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00861.html">gcc.gnu.org/ml/gcc-patches/2006-07/msg00861.html</a>
|
662
|
+
Warnings should be suppressed with -Wno-attributes.
|
663
|
+
</p>
|
664
|
+
</div>
|
665
|
+
<div class="sourcecode">
|
666
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show source</a> ]</p>
|
667
|
+
<div id="M000051_source" class="dyn-source">
|
668
|
+
<pre>
|
669
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 65</span>
|
670
|
+
65: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">compiler_visibility_flag_generates_warnings?</span>
|
671
|
+
66: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/linux/</span> <span class="ruby-operator">&&</span> <span class="ruby-node">`#{cxx} -v 2>&1`</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/gcc version (.*?)/</span>
|
672
|
+
67: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span> <span class="ruby-operator"><=</span> <span class="ruby-value str">"4.1.2"</span>
|
673
|
+
68: <span class="ruby-keyword kw">else</span>
|
674
|
+
69: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
675
|
+
70: <span class="ruby-keyword kw">end</span>
|
676
|
+
71: <span class="ruby-keyword kw">end</span>
|
677
|
+
</pre>
|
678
|
+
</div>
|
679
|
+
</div>
|
680
|
+
</div>
|
681
|
+
<div class="method">
|
682
|
+
<div class="title">
|
683
|
+
<a name="M000065"></a><b>cpu_architectures</b>()
|
684
|
+
</div>
|
685
|
+
<div class="description">
|
686
|
+
<p>
|
687
|
+
Returns a list of all CPU architecture names that the current machine CPU
|
688
|
+
supports. If there are multiple such architectures then the first item in
|
689
|
+
the result denotes that OS runtime‘s main/preferred architecture.
|
690
|
+
</p>
|
691
|
+
<p>
|
692
|
+
This function normalizes some names. For example x86 is always reported as
|
693
|
+
"x86" regardless of whether the OS reports it as "i386"
|
694
|
+
or "i686". x86_64 is always reported as "x86_64" even
|
695
|
+
if the OS reports it as "amd64".
|
696
|
+
</p>
|
697
|
+
<p>
|
698
|
+
Please note that even if the CPU supports multiple architectures, the
|
699
|
+
operating system might not. For example most x86 CPUs nowadays also support
|
700
|
+
x86_64, but x86_64 Linux systems require various x86 compatibility
|
701
|
+
libraries to be installed before x86 executables can be run. This function
|
702
|
+
does not detect whether these compatibility libraries are installed. The
|
703
|
+
only guarantee that you have is that the OS can run executables in the
|
704
|
+
architecture denoted by the first item in the result.
|
705
|
+
</p>
|
706
|
+
<p>
|
707
|
+
For example, on x86_64 Linux this function can return ["x86_64",
|
708
|
+
"x86"]. This indicates that the CPU supports both of these
|
709
|
+
architectures, and that the OS‘s main/preferred architecture is
|
710
|
+
x86_64. Most executables on the system are thus be x86_64. It is guaranteed
|
711
|
+
that the OS can run x86_64 executables, but not x86 executables per se.
|
712
|
+
</p>
|
713
|
+
<p>
|
714
|
+
Another example: on MacOS X this function can return either
|
715
|
+
</p>
|
716
|
+
<dl>
|
717
|
+
<dt>"x86_64", "x86"</dt><dd>or ["x86", "x86_64"]. The former result indicates
|
718
|
+
|
719
|
+
</dd>
|
720
|
+
</dl>
|
721
|
+
<p>
|
722
|
+
OS X 10.6 (Snow Leopard) and beyond because starting from that version
|
723
|
+
everything is 64-bit by default. The latter result indicates an OS X
|
724
|
+
version older than 10.6.
|
725
|
+
</p>
|
726
|
+
</div>
|
727
|
+
<div class="sourcecode">
|
728
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p>
|
729
|
+
<div id="M000065_source" class="dyn-source">
|
730
|
+
<pre>
|
731
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/operating_system.rb, line 77</span>
|
732
|
+
77: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cpu_architectures</span>
|
733
|
+
78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">os_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"macosx"</span>
|
734
|
+
79: <span class="ruby-identifier">arch</span> = <span class="ruby-value">`uname -p`</span>.<span class="ruby-identifier">strip</span>
|
735
|
+
80: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"i386"</span>
|
736
|
+
81: <span class="ruby-comment cmt"># Macs have been x86 since around 2007. I think all of them come with</span>
|
737
|
+
82: <span class="ruby-comment cmt"># a recent enough Intel CPU that supports both x86 and x86_64, and I</span>
|
738
|
+
83: <span class="ruby-comment cmt"># think every OS X version has both the x86 and x86_64 runtime installed.</span>
|
739
|
+
84: <span class="ruby-identifier">major</span>, <span class="ruby-identifier">minor</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">rest</span> = <span class="ruby-value">`sw_vers -productVersion`</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"."</span>)
|
740
|
+
85: <span class="ruby-identifier">major</span> = <span class="ruby-identifier">major</span>.<span class="ruby-identifier">to_i</span>
|
741
|
+
86: <span class="ruby-identifier">minor</span> = <span class="ruby-identifier">minor</span>.<span class="ruby-identifier">to_i</span>
|
742
|
+
87: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">major</span> <span class="ruby-operator">>=</span> <span class="ruby-value">10</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">major</span> <span class="ruby-operator">==</span> <span class="ruby-value">10</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">minor</span> <span class="ruby-operator">>=</span> <span class="ruby-value">6</span>)
|
743
|
+
88: <span class="ruby-comment cmt"># Since Snow Leopard x86_64 is the default.</span>
|
744
|
+
89: [<span class="ruby-value str">"x86_64"</span>, <span class="ruby-value str">"x86"</span>]
|
745
|
+
90: <span class="ruby-keyword kw">else</span>
|
746
|
+
91: <span class="ruby-comment cmt"># Before Snow Leopard x86 was the default.</span>
|
747
|
+
92: [<span class="ruby-value str">"x86"</span>, <span class="ruby-value str">"x86_64"</span>]
|
748
|
+
93: <span class="ruby-keyword kw">end</span>
|
749
|
+
94: <span class="ruby-keyword kw">else</span>
|
750
|
+
95: <span class="ruby-identifier">arch</span>
|
751
|
+
96: <span class="ruby-keyword kw">end</span>
|
752
|
+
97: <span class="ruby-keyword kw">else</span>
|
753
|
+
98: <span class="ruby-identifier">arch</span> = <span class="ruby-value">`uname -p`</span>.<span class="ruby-identifier">strip</span>
|
754
|
+
99: <span class="ruby-comment cmt"># On some systems 'uname -p' returns something like</span>
|
755
|
+
100: <span class="ruby-comment cmt"># 'Intel(R) Pentium(R) M processor 1400MHz'.</span>
|
756
|
+
101: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"unknown"</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/ /</span>
|
757
|
+
102: <span class="ruby-identifier">arch</span> = <span class="ruby-value">`uname -m`</span>.<span class="ruby-identifier">strip</span>
|
758
|
+
103: <span class="ruby-keyword kw">end</span>
|
759
|
+
104: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^i.86$/</span>
|
760
|
+
105: <span class="ruby-identifier">arch</span> = <span class="ruby-value str">"x86"</span>
|
761
|
+
106: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"amd64"</span>
|
762
|
+
107: <span class="ruby-identifier">arch</span> = <span class="ruby-value str">"x86_64"</span>
|
763
|
+
108: <span class="ruby-keyword kw">end</span>
|
764
|
+
109:
|
765
|
+
110: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86"</span>
|
766
|
+
111: <span class="ruby-comment cmt"># Most x86 operating systems nowadays are probably running on</span>
|
767
|
+
112: <span class="ruby-comment cmt"># a CPU that supports both x86 and x86_64, but we're not gonna</span>
|
768
|
+
113: <span class="ruby-comment cmt"># go through the trouble of checking that. The main architecture</span>
|
769
|
+
114: <span class="ruby-comment cmt"># is what we usually care about.</span>
|
770
|
+
115: [<span class="ruby-value str">"x86"</span>]
|
771
|
+
116: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86_64"</span>
|
772
|
+
117: <span class="ruby-comment cmt"># I don't think there's a single x86_64 CPU out there</span>
|
773
|
+
118: <span class="ruby-comment cmt"># that doesn't support x86 as well.</span>
|
774
|
+
119: [<span class="ruby-value str">"x86_64"</span>, <span class="ruby-value str">"x86"</span>]
|
775
|
+
120: <span class="ruby-keyword kw">else</span>
|
776
|
+
121: [<span class="ruby-identifier">arch</span>]
|
777
|
+
122: <span class="ruby-keyword kw">end</span>
|
778
|
+
123: <span class="ruby-keyword kw">end</span>
|
779
|
+
124: <span class="ruby-keyword kw">end</span>
|
780
|
+
</pre>
|
781
|
+
</div>
|
782
|
+
</div>
|
783
|
+
</div>
|
784
|
+
<div class="method">
|
785
|
+
<div class="title">
|
786
|
+
<a name="M000057"></a><b>curl_flags</b>()
|
787
|
+
</div>
|
788
|
+
<div class="sourcecode">
|
789
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show source</a> ]</p>
|
790
|
+
<div id="M000057_source" class="dyn-source">
|
791
|
+
<pre>
|
792
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/curl.rb, line 29</span>
|
793
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">curl_flags</span>
|
794
|
+
30: <span class="ruby-identifier">result</span> = <span class="ruby-value">`(curl-config --cflags) 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
795
|
+
31: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span>
|
796
|
+
32: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
797
|
+
33: <span class="ruby-keyword kw">else</span>
|
798
|
+
34: <span class="ruby-identifier">version</span> = <span class="ruby-value">`curl-config --vernum`</span>.<span class="ruby-identifier">strip</span>
|
799
|
+
35: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">version</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">'070c01'</span>
|
800
|
+
36: <span class="ruby-comment cmt"># Curl >= 7.12.1 supports curl_easy_reset()</span>
|
801
|
+
37: <span class="ruby-identifier">result</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" -DHAS_CURL_EASY_RESET"</span>
|
802
|
+
38: <span class="ruby-keyword kw">end</span>
|
803
|
+
39: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
804
|
+
40: <span class="ruby-keyword kw">end</span>
|
805
|
+
41: <span class="ruby-keyword kw">end</span>
|
806
|
+
</pre>
|
807
|
+
</div>
|
808
|
+
</div>
|
809
|
+
</div>
|
810
|
+
<div class="method">
|
811
|
+
<div class="title">
|
812
|
+
<a name="M000058"></a><b>curl_libs</b>()
|
813
|
+
</div>
|
814
|
+
<div class="sourcecode">
|
815
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show source</a> ]</p>
|
816
|
+
<div id="M000058_source" class="dyn-source">
|
817
|
+
<pre>
|
818
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/curl.rb, line 44</span>
|
819
|
+
44: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">curl_libs</span>
|
820
|
+
45: <span class="ruby-identifier">result</span> = <span class="ruby-value">`(curl-config --libs) 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
821
|
+
46: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>.<span class="ruby-identifier">empty?</span>
|
822
|
+
47: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
823
|
+
48: <span class="ruby-keyword kw">else</span>
|
824
|
+
49: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
825
|
+
50: <span class="ruby-keyword kw">end</span>
|
826
|
+
51: <span class="ruby-keyword kw">end</span>
|
827
|
+
</pre>
|
828
|
+
</div>
|
829
|
+
</div>
|
830
|
+
</div>
|
831
|
+
<div class="method">
|
832
|
+
<div class="title">
|
833
|
+
<a name="M000059"></a><b>curl_supports_ssl?</b>()
|
834
|
+
</div>
|
835
|
+
<div class="sourcecode">
|
836
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show source</a> ]</p>
|
837
|
+
<div id="M000059_source" class="dyn-source">
|
838
|
+
<pre>
|
839
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/curl.rb, line 54</span>
|
840
|
+
54: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">curl_supports_ssl?</span>
|
841
|
+
55: <span class="ruby-identifier">features</span> = <span class="ruby-value">`(curl-config --feature) 2>/dev/null`</span>
|
842
|
+
56: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">features</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/SSL/</span>
|
843
|
+
57: <span class="ruby-keyword kw">end</span>
|
844
|
+
</pre>
|
845
|
+
</div>
|
846
|
+
</div>
|
847
|
+
</div>
|
848
|
+
<div class="method">
|
849
|
+
<div class="title">
|
850
|
+
<a name="M000031"></a><b>cxx</b>()
|
851
|
+
</div>
|
852
|
+
<div class="sourcecode">
|
853
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
|
854
|
+
<div id="M000031_source" class="dyn-source">
|
855
|
+
<pre>
|
856
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 163</span>
|
857
|
+
163: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">cxx</span>
|
858
|
+
164: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'CXX'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">"g++"</span>
|
859
|
+
165: <span class="ruby-keyword kw">end</span>
|
860
|
+
</pre>
|
861
|
+
</div>
|
862
|
+
</div>
|
863
|
+
</div>
|
864
|
+
<div class="method">
|
865
|
+
<div class="title">
|
866
|
+
<a name="M000055"></a><b>debugging_cflags</b>()
|
867
|
+
</div>
|
868
|
+
<div class="description">
|
869
|
+
<p>
|
870
|
+
C compiler flags that should be passed in order to enable debugging
|
871
|
+
information.
|
872
|
+
</p>
|
873
|
+
</div>
|
874
|
+
<div class="sourcecode">
|
875
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show source</a> ]</p>
|
876
|
+
<div id="M000055_source" class="dyn-source">
|
877
|
+
<pre>
|
878
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 163</span>
|
879
|
+
163: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debugging_cflags</span>
|
880
|
+
164: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
881
|
+
165: <span class="ruby-comment cmt"># According to OpenBSD's pthreads man page, pthreads do not work</span>
|
882
|
+
166: <span class="ruby-comment cmt"># correctly when an app is compiled with -g. It recommends using</span>
|
883
|
+
167: <span class="ruby-comment cmt"># -ggdb instead.</span>
|
884
|
+
168: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-ggdb'</span>
|
885
|
+
169: <span class="ruby-keyword kw">else</span>
|
886
|
+
170: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-g'</span>
|
887
|
+
171: <span class="ruby-keyword kw">end</span>
|
888
|
+
172: <span class="ruby-keyword kw">end</span>
|
889
|
+
</pre>
|
890
|
+
</div>
|
891
|
+
</div>
|
892
|
+
</div>
|
893
|
+
<div class="method">
|
894
|
+
<div class="title">
|
895
|
+
<a name="M000029"></a><b>env_defined?</b>(name)
|
896
|
+
</div>
|
897
|
+
<div class="sourcecode">
|
898
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
|
899
|
+
<div id="M000029_source" class="dyn-source">
|
900
|
+
<pre>
|
901
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 155</span>
|
902
|
+
155: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">env_defined?</span>(<span class="ruby-identifier">name</span>)
|
903
|
+
156: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-constant">ENV</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-constant">ENV</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">empty?</span>
|
904
|
+
157: <span class="ruby-keyword kw">end</span>
|
905
|
+
</pre>
|
906
|
+
</div>
|
907
|
+
</div>
|
908
|
+
</div>
|
909
|
+
<div class="method">
|
910
|
+
<div class="title">
|
911
|
+
<a name="M000056"></a><b>export_dynamic_flags</b>()
|
912
|
+
</div>
|
913
|
+
<div class="sourcecode">
|
914
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
|
915
|
+
<div id="M000056_source" class="dyn-source">
|
916
|
+
<pre>
|
917
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 174</span>
|
918
|
+
174: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">export_dynamic_flags</span>
|
919
|
+
175: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/linux/</span>
|
920
|
+
176: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-rdynamic'</span>
|
921
|
+
177: <span class="ruby-keyword kw">else</span>
|
922
|
+
178: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
923
|
+
179: <span class="ruby-keyword kw">end</span>
|
924
|
+
180: <span class="ruby-keyword kw">end</span>
|
925
|
+
</pre>
|
926
|
+
</div>
|
927
|
+
</div>
|
928
|
+
</div>
|
929
|
+
<div class="method">
|
930
|
+
<div class="title">
|
931
|
+
<a name="M000028"></a><b>find_command</b>(name)
|
932
|
+
</div>
|
933
|
+
<div class="description">
|
934
|
+
<p>
|
935
|
+
Check whether the specified command is in $PATH, and return its absolute
|
936
|
+
filename. Returns nil if the command is not found.
|
937
|
+
</p>
|
938
|
+
<p>
|
939
|
+
This function exists because system(‘which’) doesn‘t
|
940
|
+
always behave correctly, for some weird reason.
|
941
|
+
</p>
|
942
|
+
</div>
|
943
|
+
<div class="sourcecode">
|
944
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
|
945
|
+
<div id="M000028_source" class="dyn-source">
|
946
|
+
<pre>
|
947
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 145</span>
|
948
|
+
145: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
949
|
+
146: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PATH'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>).<span class="ruby-identifier">detect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">directory</span><span class="ruby-operator">|</span>
|
950
|
+
147: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
|
951
|
+
148: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">path</span>)
|
952
|
+
149: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span>
|
953
|
+
150: <span class="ruby-keyword kw">end</span>
|
954
|
+
151: <span class="ruby-keyword kw">end</span>
|
955
|
+
152: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
956
|
+
153: <span class="ruby-keyword kw">end</span>
|
957
|
+
</pre>
|
958
|
+
</div>
|
959
|
+
</div>
|
960
|
+
</div>
|
961
|
+
<div class="method">
|
962
|
+
<div class="title">
|
963
|
+
<a name="M000071"></a><b>gem_command</b>()
|
964
|
+
</div>
|
965
|
+
<div class="description">
|
966
|
+
<p>
|
967
|
+
Returns the correct ‘gem’ command for this Ruby interpreter.
|
968
|
+
</p>
|
969
|
+
</div>
|
970
|
+
<div class="sourcecode">
|
971
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
|
972
|
+
<div id="M000071_source" class="dyn-source">
|
973
|
+
<pre>
|
974
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 110</span>
|
975
|
+
110: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gem_command</span>
|
976
|
+
111: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_tool</span>(<span class="ruby-value str">'gem'</span>)
|
977
|
+
112: <span class="ruby-keyword kw">end</span>
|
978
|
+
</pre>
|
979
|
+
</div>
|
980
|
+
</div>
|
981
|
+
</div>
|
982
|
+
<div class="method">
|
983
|
+
<div class="title">
|
984
|
+
<a name="M000048"></a><b>gnu_make</b>()
|
985
|
+
</div>
|
986
|
+
<div class="sourcecode">
|
987
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show source</a> ]</p>
|
988
|
+
<div id="M000048_source" class="dyn-source">
|
989
|
+
<pre>
|
990
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 30</span>
|
991
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">gnu_make</span>
|
992
|
+
31: <span class="ruby-identifier">gmake</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'gmake'</span>)
|
993
|
+
32: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">gmake</span>
|
994
|
+
33: <span class="ruby-identifier">gmake</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'make'</span>)
|
995
|
+
34: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gmake</span>
|
996
|
+
35: <span class="ruby-keyword kw">if</span> <span class="ruby-node">`#{gmake} --version 2>&1`</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/GNU/</span>
|
997
|
+
36: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">gmake</span>
|
998
|
+
37: <span class="ruby-keyword kw">else</span>
|
999
|
+
38: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1000
|
+
39: <span class="ruby-keyword kw">end</span>
|
1001
|
+
40: <span class="ruby-keyword kw">else</span>
|
1002
|
+
41: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1003
|
+
42: <span class="ruby-keyword kw">end</span>
|
1004
|
+
43: <span class="ruby-keyword kw">else</span>
|
1005
|
+
44: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">gmake</span>
|
1006
|
+
45: <span class="ruby-keyword kw">end</span>
|
1007
|
+
46: <span class="ruby-keyword kw">end</span>
|
1008
|
+
</pre>
|
1009
|
+
</div>
|
1010
|
+
</div>
|
1011
|
+
</div>
|
1012
|
+
<div class="method">
|
1013
|
+
<div class="title">
|
1014
|
+
<a name="M000052"></a><b>has_math_library?</b>()
|
1015
|
+
</div>
|
1016
|
+
<div class="sourcecode">
|
1017
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show source</a> ]</p>
|
1018
|
+
<div id="M000052_source" class="dyn-source">
|
1019
|
+
<pre>
|
1020
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 74</span>
|
1021
|
+
74: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">has_math_library?</span>
|
1022
|
+
75: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">try_link</span>(<span class="ruby-identifier">:c</span>, <span class="ruby-value str">"int main() { return 0; }\n"</span>, <span class="ruby-value str">'-lmath'</span>)
|
1023
|
+
76: <span class="ruby-keyword kw">end</span>
|
1024
|
+
</pre>
|
1025
|
+
</div>
|
1026
|
+
</div>
|
1027
|
+
</div>
|
1028
|
+
<div class="method">
|
1029
|
+
<div class="title">
|
1030
|
+
<a name="M000034"></a><b>httpd</b>()
|
1031
|
+
</div>
|
1032
|
+
<div class="description">
|
1033
|
+
<p>
|
1034
|
+
The absolute path to the Apache binary (that is, ‘<a
|
1035
|
+
href="PlatformInfo.html#M000034">httpd</a>’, ‘httpd2’,
|
1036
|
+
‘apache’ or ‘apache2’), or nil if not found.
|
1037
|
+
</p>
|
1038
|
+
</div>
|
1039
|
+
<div class="sourcecode">
|
1040
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show source</a> ]</p>
|
1041
|
+
<div id="M000034_source" class="dyn-source">
|
1042
|
+
<pre>
|
1043
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/apache.rb, line 67</span>
|
1044
|
+
67: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">httpd</span>
|
1045
|
+
68: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'HTTPD'</span>)
|
1046
|
+
69: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'HTTPD'</span>]
|
1047
|
+
70: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
1048
|
+
71: [<span class="ruby-value str">"apache2"</span>, <span class="ruby-value str">"httpd2"</span>, <span class="ruby-value str">"apache"</span>, <span class="ruby-value str">"httpd"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
1049
|
+
72: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
1050
|
+
73: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
1051
|
+
74: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
1052
|
+
75: <span class="ruby-keyword kw">end</span>
|
1053
|
+
76: <span class="ruby-keyword kw">end</span>
|
1054
|
+
77: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1055
|
+
78: <span class="ruby-keyword kw">else</span>
|
1056
|
+
79: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-node">`#{apxs2} -q TARGET`</span>.<span class="ruby-identifier">strip</span>)
|
1057
|
+
80: <span class="ruby-keyword kw">end</span>
|
1058
|
+
81: <span class="ruby-keyword kw">end</span>
|
1059
|
+
</pre>
|
1060
|
+
</div>
|
1061
|
+
</div>
|
1062
|
+
</div>
|
1063
|
+
<div class="method">
|
1064
|
+
<div class="title">
|
1065
|
+
<a name="M000075"></a><b>in_rvm?</b>()
|
1066
|
+
</div>
|
1067
|
+
<div class="description">
|
1068
|
+
<p>
|
1069
|
+
Returns whether the current Ruby interpreter is managed by RVM.
|
1070
|
+
</p>
|
1071
|
+
</div>
|
1072
|
+
<div class="sourcecode">
|
1073
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000075_source')" id="l_M000075_source">show source</a> ]</p>
|
1074
|
+
<div id="M000075_source" class="dyn-source">
|
1075
|
+
<pre>
|
1076
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 154</span>
|
1077
|
+
154: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">in_rvm?</span>
|
1078
|
+
155: <span class="ruby-identifier">bindir</span> = <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'bindir'</span>]
|
1079
|
+
156: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">bindir</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'/.rvm/'</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">bindir</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'/rvm/'</span>)
|
1080
|
+
157: <span class="ruby-keyword kw">end</span>
|
1081
|
+
</pre>
|
1082
|
+
</div>
|
1083
|
+
</div>
|
1084
|
+
</div>
|
1085
|
+
<div class="method">
|
1086
|
+
<div class="title">
|
1087
|
+
<a name="M000064"></a><b>library_extension</b>()
|
1088
|
+
</div>
|
1089
|
+
<div class="description">
|
1090
|
+
<p>
|
1091
|
+
The current platform‘s shared library extension (‘so’ on
|
1092
|
+
most Unices).
|
1093
|
+
</p>
|
1094
|
+
</div>
|
1095
|
+
<div class="sourcecode">
|
1096
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p>
|
1097
|
+
<div id="M000064_source" class="dyn-source">
|
1098
|
+
<pre>
|
1099
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/operating_system.rb, line 42</span>
|
1100
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">library_extension</span>
|
1101
|
+
43: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
1102
|
+
44: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"bundle"</span>
|
1103
|
+
45: <span class="ruby-keyword kw">else</span>
|
1104
|
+
46: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"so"</span>
|
1105
|
+
47: <span class="ruby-keyword kw">end</span>
|
1106
|
+
48: <span class="ruby-keyword kw">end</span>
|
1107
|
+
</pre>
|
1108
|
+
</div>
|
1109
|
+
</div>
|
1110
|
+
</div>
|
1111
|
+
<div class="method">
|
1112
|
+
<div class="title">
|
1113
|
+
<a name="M000061"></a><b>linux_distro</b>()
|
1114
|
+
</div>
|
1115
|
+
<div class="description">
|
1116
|
+
<p>
|
1117
|
+
An identifier for the current Linux distribution. nil if the operating
|
1118
|
+
system is not Linux.
|
1119
|
+
</p>
|
1120
|
+
</div>
|
1121
|
+
<div class="sourcecode">
|
1122
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000061_source')" id="l_M000061_source">show source</a> ]</p>
|
1123
|
+
<div id="M000061_source" class="dyn-source">
|
1124
|
+
<pre>
|
1125
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/linux.rb, line 30</span>
|
1126
|
+
30: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro</span>
|
1127
|
+
31: <span class="ruby-identifier">tags</span> = <span class="ruby-identifier">linux_distro_tags</span>
|
1128
|
+
32: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">tags</span>
|
1129
|
+
33: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">tags</span>.<span class="ruby-identifier">first</span>
|
1130
|
+
34: <span class="ruby-keyword kw">else</span>
|
1131
|
+
35: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1132
|
+
36: <span class="ruby-keyword kw">end</span>
|
1133
|
+
37: <span class="ruby-keyword kw">end</span>
|
1134
|
+
</pre>
|
1135
|
+
</div>
|
1136
|
+
</div>
|
1137
|
+
</div>
|
1138
|
+
<div class="method">
|
1139
|
+
<div class="title">
|
1140
|
+
<a name="M000062"></a><b>linux_distro_tags</b>()
|
1141
|
+
</div>
|
1142
|
+
<div class="description">
|
1143
|
+
<p>
|
1144
|
+
Autodetects the current Linux distribution and return a number of
|
1145
|
+
identifier tags. The first tag identifies the distribution while the other
|
1146
|
+
tags indicate which distributions it is likely compatible with. Returns nil
|
1147
|
+
if the operating system is not Linux.
|
1148
|
+
</p>
|
1149
|
+
</div>
|
1150
|
+
<div class="sourcecode">
|
1151
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000062_source')" id="l_M000062_source">show source</a> ]</p>
|
1152
|
+
<div id="M000062_source" class="dyn-source">
|
1153
|
+
<pre>
|
1154
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/linux.rb, line 43</span>
|
1155
|
+
43: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro_tags</span>
|
1156
|
+
44: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/linux/</span>
|
1157
|
+
45: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1158
|
+
46: <span class="ruby-keyword kw">end</span>
|
1159
|
+
47: <span class="ruby-identifier">lsb_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/lsb-release"</span>)
|
1160
|
+
48: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lsb_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Ubuntu/</span>
|
1161
|
+
49: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:ubuntu</span>, <span class="ruby-identifier">:debian</span>]
|
1162
|
+
50: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/debian_version"</span>)
|
1163
|
+
51: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:debian</span>]
|
1164
|
+
52: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
1165
|
+
53: <span class="ruby-identifier">redhat_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
1166
|
+
54: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/CentOS/</span>
|
1167
|
+
55: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:centos</span>, <span class="ruby-identifier">:redhat</span>]
|
1168
|
+
56: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Fedora/</span>
|
1169
|
+
57: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:fedora</span>, <span class="ruby-identifier">:redhat</span>]
|
1170
|
+
58: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Mandriva/</span>
|
1171
|
+
59: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:mandriva</span>, <span class="ruby-identifier">:redhat</span>]
|
1172
|
+
60: <span class="ruby-keyword kw">else</span>
|
1173
|
+
61: <span class="ruby-comment cmt"># On official RHEL distros, the content is in the form of</span>
|
1174
|
+
62: <span class="ruby-comment cmt"># "Red Hat Enterprise Linux Server release 5.1 (Tikanga)"</span>
|
1175
|
+
63: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:rhel</span>, <span class="ruby-identifier">:redhat</span>]
|
1176
|
+
64: <span class="ruby-keyword kw">end</span>
|
1177
|
+
65: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/suse-release"</span>)
|
1178
|
+
66: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:suse</span>]
|
1179
|
+
67: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/gentoo-release"</span>)
|
1180
|
+
68: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:gentoo</span>]
|
1181
|
+
69: <span class="ruby-keyword kw">else</span>
|
1182
|
+
70: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">:unknown</span>]
|
1183
|
+
71: <span class="ruby-keyword kw">end</span>
|
1184
|
+
72: <span class="ruby-comment cmt"># TODO: Slackware</span>
|
1185
|
+
73: <span class="ruby-keyword kw">end</span>
|
1186
|
+
</pre>
|
1187
|
+
</div>
|
1188
|
+
</div>
|
1189
|
+
</div>
|
1190
|
+
<div class="method">
|
1191
|
+
<div class="title">
|
1192
|
+
<a name="M000079"></a><b>locate_ruby_tool</b>(name)
|
1193
|
+
</div>
|
1194
|
+
<div class="description">
|
1195
|
+
<p>
|
1196
|
+
Locates a Ruby tool command, e.g. ‘gem’, ‘<a
|
1197
|
+
href="PlatformInfo.html#M000072">rake</a>’, ‘bundle’,
|
1198
|
+
etc. Instead of naively looking in $PATH, this function uses a variety of
|
1199
|
+
search heuristics to find the command that‘s really associated with
|
1200
|
+
the current Ruby interpreter. It should never locate a command that‘s
|
1201
|
+
actually associated with a different Ruby interpreter. Returns nil when
|
1202
|
+
nothing‘s found.
|
1203
|
+
</p>
|
1204
|
+
</div>
|
1205
|
+
<div class="sourcecode">
|
1206
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000079_source')" id="l_M000079_source">show source</a> ]</p>
|
1207
|
+
<div id="M000079_source" class="dyn-source">
|
1208
|
+
<pre>
|
1209
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 246</span>
|
1210
|
+
246: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">locate_ruby_tool</span>(<span class="ruby-identifier">name</span>)
|
1211
|
+
247: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">locate_ruby_tool_by_basename</span>(<span class="ruby-identifier">name</span>)
|
1212
|
+
248: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">result</span>
|
1213
|
+
249: <span class="ruby-identifier">exeext</span> = <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'EXEEXT'</span>]
|
1214
|
+
250: <span class="ruby-identifier">exeext</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exeext</span>.<span class="ruby-identifier">empty?</span>
|
1215
|
+
251: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">exeext</span>
|
1216
|
+
252: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">locate_ruby_tool_by_basename</span>(<span class="ruby-node">"#{name}#{exeext}"</span>)
|
1217
|
+
253: <span class="ruby-keyword kw">end</span>
|
1218
|
+
254: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">result</span>
|
1219
|
+
255: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">locate_ruby_tool_by_basename</span>(<span class="ruby-identifier">transform_according_to_ruby_exec_format</span>(<span class="ruby-identifier">name</span>))
|
1220
|
+
256: <span class="ruby-keyword kw">end</span>
|
1221
|
+
257: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">result</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">exeext</span>
|
1222
|
+
258: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">locate_ruby_tool_by_basename</span>(<span class="ruby-identifier">transform_according_to_ruby_exec_format</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">exeext</span>)
|
1223
|
+
259: <span class="ruby-keyword kw">end</span>
|
1224
|
+
260: <span class="ruby-keyword kw">end</span>
|
1225
|
+
261: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
1226
|
+
262: <span class="ruby-keyword kw">end</span>
|
1227
|
+
</pre>
|
1228
|
+
</div>
|
1229
|
+
</div>
|
1230
|
+
</div>
|
1231
|
+
<div class="method">
|
1232
|
+
<div class="title">
|
1233
|
+
<a name="M000063"></a><b>os_name</b>()
|
1234
|
+
</div>
|
1235
|
+
<div class="description">
|
1236
|
+
<p>
|
1237
|
+
Returns the operating system‘s name. This name is in lowercase and
|
1238
|
+
contains no spaces, and thus is suitable to be used in some kind of ID.
|
1239
|
+
E.g. "linux", "macosx".
|
1240
|
+
</p>
|
1241
|
+
</div>
|
1242
|
+
<div class="sourcecode">
|
1243
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000063_source')" id="l_M000063_source">show source</a> ]</p>
|
1244
|
+
<div id="M000063_source" class="dyn-source">
|
1245
|
+
<pre>
|
1246
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/operating_system.rb, line 32</span>
|
1247
|
+
32: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">os_name</span>
|
1248
|
+
33: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'target_os'</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span> <span class="ruby-operator">&&</span> (<span class="ruby-identifier">sw_vers</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'sw_vers'</span>))
|
1249
|
+
34: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"macosx"</span>
|
1250
|
+
35: <span class="ruby-keyword kw">else</span>
|
1251
|
+
36: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">RUBY_PLATFORM</span>.<span class="ruby-identifier">sub</span>(<span class="ruby-regexp re">/.*?-/</span>, <span class="ruby-value str">''</span>)
|
1252
|
+
37: <span class="ruby-keyword kw">end</span>
|
1253
|
+
38: <span class="ruby-keyword kw">end</span>
|
1254
|
+
</pre>
|
1255
|
+
</div>
|
1256
|
+
</div>
|
1257
|
+
</div>
|
1258
|
+
<div class="method">
|
1259
|
+
<div class="title">
|
1260
|
+
<a name="M000047"></a><b>passenger_binary_compatibility_id</b>()
|
1261
|
+
</div>
|
1262
|
+
<div class="description">
|
1263
|
+
<p>
|
1264
|
+
Returns an identifier string that describes the current platform‘s
|
1265
|
+
binary compatibility with regard to Phusion Passenger binaries, both the
|
1266
|
+
Ruby extension and the C++ binaries. Two systems with the same binary
|
1267
|
+
compatibility identifiers are able to run the same Phusion Passenger
|
1268
|
+
binaries.
|
1269
|
+
</p>
|
1270
|
+
<p>
|
1271
|
+
The the string depends on the following factors:
|
1272
|
+
</p>
|
1273
|
+
<ul>
|
1274
|
+
<li>The Ruby extension binary compatibility identifiers.
|
1275
|
+
|
1276
|
+
</li>
|
1277
|
+
<li>The operating system name.
|
1278
|
+
|
1279
|
+
</li>
|
1280
|
+
<li>Operating system runtime identifier. This may include the kernel version,
|
1281
|
+
libc version, C++ ABI version, etc. Everything that is of interest for
|
1282
|
+
binary compatibility with Phusion Passenger‘s C++ components.
|
1283
|
+
|
1284
|
+
</li>
|
1285
|
+
<li>Operating system default runtime architecture. This is not the same as the
|
1286
|
+
CPU architecture; some CPUs support multiple architectures, e.g. Intel Core
|
1287
|
+
2 Duo supports x86 and x86_64. Some operating systems actually support
|
1288
|
+
multiple runtime architectures: a lot of x86_64 Linux distributions also
|
1289
|
+
include 32-bit runtimes, and OS X Snow Leopard is x86_64 by default but all
|
1290
|
+
system libraries also support x86. This component identifies the
|
1291
|
+
architecture that is used when compiling a binary with the system‘s
|
1292
|
+
C++ compiler with its default options.
|
1293
|
+
|
1294
|
+
</li>
|
1295
|
+
</ul>
|
1296
|
+
</div>
|
1297
|
+
<div class="sourcecode">
|
1298
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show source</a> ]</p>
|
1299
|
+
<div id="M000047_source" class="dyn-source">
|
1300
|
+
<pre>
|
1301
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/binary_compatibility.rb, line 103</span>
|
1302
|
+
103: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">passenger_binary_compatibility_id</span>
|
1303
|
+
104: <span class="ruby-identifier">ruby_engine</span>, <span class="ruby-identifier">ruby_ext_version</span>, <span class="ruby-identifier">ruby_arch</span>, <span class="ruby-identifier">os_name</span> =
|
1304
|
+
105: <span class="ruby-identifier">ruby_extension_binary_compatibility_ids</span>
|
1305
|
+
106:
|
1306
|
+
107: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">os_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"macosx"</span>
|
1307
|
+
108: <span class="ruby-comment cmt"># RUBY_PLATFORM gives us the kernel version, but we want</span>
|
1308
|
+
109: <span class="ruby-comment cmt"># the OS X version.</span>
|
1309
|
+
110: <span class="ruby-identifier">os_version_string</span> = <span class="ruby-value">`sw_vers -productVersion`</span>.<span class="ruby-identifier">strip</span>
|
1310
|
+
111: <span class="ruby-comment cmt"># sw_vers returns something like "10.6.2". We're only</span>
|
1311
|
+
112: <span class="ruby-comment cmt"># interested in the first two digits (MAJOR.MINOR) since</span>
|
1312
|
+
113: <span class="ruby-comment cmt"># tiny releases tend to be binary compatible with each</span>
|
1313
|
+
114: <span class="ruby-comment cmt"># other.</span>
|
1314
|
+
115: <span class="ruby-identifier">components</span> = <span class="ruby-identifier">os_version_string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"."</span>)
|
1315
|
+
116: <span class="ruby-identifier">os_version</span> = <span class="ruby-node">"#{components[0]}.#{components[1]}"</span>
|
1316
|
+
117: <span class="ruby-identifier">os_runtime</span> = <span class="ruby-identifier">os_version</span>
|
1317
|
+
118:
|
1318
|
+
119: <span class="ruby-identifier">os_arch</span> = <span class="ruby-identifier">cpu_architectures</span>[<span class="ruby-value">0</span>]
|
1319
|
+
120: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">os_version</span> <span class="ruby-operator">>=</span> <span class="ruby-value str">"10.5"</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">os_arch</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^i.86$/</span>
|
1320
|
+
121: <span class="ruby-comment cmt"># On Snow Leopard, 'uname -m' returns i386 but</span>
|
1321
|
+
122: <span class="ruby-comment cmt"># we *know* that everything is x86_64 by default.</span>
|
1322
|
+
123: <span class="ruby-identifier">os_arch</span> = <span class="ruby-value str">"x86_64"</span>
|
1323
|
+
124: <span class="ruby-keyword kw">end</span>
|
1324
|
+
125: <span class="ruby-keyword kw">else</span>
|
1325
|
+
126: <span class="ruby-identifier">os_arch</span> = <span class="ruby-identifier">cpu_architectures</span>[<span class="ruby-value">0</span>]
|
1326
|
+
127:
|
1327
|
+
128: <span class="ruby-identifier">cpp</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-value str">'cpp'</span>)
|
1328
|
+
129: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">cpp</span>
|
1329
|
+
130: <span class="ruby-identifier">macros</span> = <span class="ruby-node">`#{cpp} -dM < /dev/null`</span>
|
1330
|
+
131:
|
1331
|
+
132: <span class="ruby-comment cmt"># Can be something like "4.3.2"</span>
|
1332
|
+
133: <span class="ruby-comment cmt"># or "4.2.1 20070719 (FreeBSD)"</span>
|
1333
|
+
134: <span class="ruby-identifier">macros</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/__VERSION__ "(.+)"/</span>
|
1334
|
+
135: <span class="ruby-identifier">compiler_version</span> = <span class="ruby-identifier">$1</span>
|
1335
|
+
136: <span class="ruby-identifier">compiler_version</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/ .*/</span>, <span class="ruby-value str">''</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">compiler_version</span>
|
1336
|
+
137:
|
1337
|
+
138: <span class="ruby-identifier">macros</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/__GXX_ABI_VERSION (.+)$/</span>
|
1338
|
+
139: <span class="ruby-identifier">cxx_abi_version</span> = <span class="ruby-identifier">$1</span>
|
1339
|
+
140: <span class="ruby-keyword kw">else</span>
|
1340
|
+
141: <span class="ruby-identifier">compiler_version</span> = <span class="ruby-keyword kw">nil</span>
|
1341
|
+
142: <span class="ruby-identifier">cxx_abi_version</span> = <span class="ruby-keyword kw">nil</span>
|
1342
|
+
143: <span class="ruby-keyword kw">end</span>
|
1343
|
+
144:
|
1344
|
+
145: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">compiler_version</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">cxx_abi_version</span>
|
1345
|
+
146: <span class="ruby-identifier">os_runtime</span> = <span class="ruby-node">"gcc#{compiler_version}-#{cxx_abi_version}"</span>
|
1346
|
+
147: <span class="ruby-keyword kw">else</span>
|
1347
|
+
148: <span class="ruby-identifier">os_runtime</span> = [<span class="ruby-identifier">compiler_version</span>, <span class="ruby-identifier">cxx_abi_version</span>].<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"-"</span>)
|
1348
|
+
149: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">os_runtime</span>.<span class="ruby-identifier">empty?</span>
|
1349
|
+
150: <span class="ruby-identifier">os_runtime</span> = <span class="ruby-value">`uname -r`</span>.<span class="ruby-identifier">strip</span>
|
1350
|
+
151: <span class="ruby-keyword kw">end</span>
|
1351
|
+
152: <span class="ruby-keyword kw">end</span>
|
1352
|
+
153: <span class="ruby-keyword kw">end</span>
|
1353
|
+
154:
|
1354
|
+
155: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_engine</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"jruby"</span>
|
1355
|
+
156: <span class="ruby-comment cmt"># For JRuby it's kinda useless to prepend "java" as extension</span>
|
1356
|
+
157: <span class="ruby-comment cmt"># architecture because JRuby doesn't allow any other extension</span>
|
1357
|
+
158: <span class="ruby-comment cmt"># architecture.</span>
|
1358
|
+
159: <span class="ruby-identifier">identifier</span> = <span class="ruby-value str">""</span>
|
1359
|
+
160: <span class="ruby-keyword kw">else</span>
|
1360
|
+
161: <span class="ruby-identifier">identifier</span> = <span class="ruby-node">"#{ruby_arch}-"</span>
|
1361
|
+
162: <span class="ruby-keyword kw">end</span>
|
1362
|
+
163: <span class="ruby-identifier">identifier</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{ruby_engine}#{ruby_ext_version}-"</span>
|
1363
|
+
164: <span class="ruby-comment cmt"># If the extension architecture is the same as the OS architecture</span>
|
1364
|
+
165: <span class="ruby-comment cmt"># then there's no need to specify it twice.</span>
|
1365
|
+
166: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ruby_arch</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">os_arch</span>
|
1366
|
+
167: <span class="ruby-identifier">identifier</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{os_arch}-"</span>
|
1367
|
+
168: <span class="ruby-keyword kw">end</span>
|
1368
|
+
169: <span class="ruby-identifier">identifier</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{os_name}-#{os_runtime}"</span>
|
1369
|
+
170: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">identifier</span>
|
1370
|
+
171: <span class="ruby-keyword kw">end</span>
|
1371
|
+
</pre>
|
1372
|
+
</div>
|
1373
|
+
</div>
|
1374
|
+
</div>
|
1375
|
+
<div class="method">
|
1376
|
+
<div class="title">
|
1377
|
+
<a name="M000053"></a><b>portability_cflags</b>()
|
1378
|
+
</div>
|
1379
|
+
<div class="description">
|
1380
|
+
<p>
|
1381
|
+
Compiler flags that should be used for compiling every C/C++ program, for
|
1382
|
+
portability reasons. These flags should be specified as last when invoking
|
1383
|
+
the compiler.
|
1384
|
+
</p>
|
1385
|
+
</div>
|
1386
|
+
<div class="sourcecode">
|
1387
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show source</a> ]</p>
|
1388
|
+
<div id="M000053_source" class="dyn-source">
|
1389
|
+
<pre>
|
1390
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 82</span>
|
1391
|
+
82: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_cflags</span>
|
1392
|
+
83: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-D_REENTRANT -I/usr/local/include"</span>]
|
1393
|
+
84:
|
1394
|
+
85: <span class="ruby-comment cmt"># Google SparseHash flags.</span>
|
1395
|
+
86: <span class="ruby-comment cmt"># Figure out header for hash function object and its namespace.</span>
|
1396
|
+
87: <span class="ruby-comment cmt"># Based on stl_hash.m4 and stl_hash_fun.m4 in the Google SparseHash sources.</span>
|
1397
|
+
88: <span class="ruby-identifier">hash_namespace</span> = <span class="ruby-keyword kw">nil</span>
|
1398
|
+
89: <span class="ruby-identifier">ok</span> = <span class="ruby-keyword kw">false</span>
|
1399
|
+
90: [<span class="ruby-value str">'__gnu_cxx'</span>, <span class="ruby-value str">''</span>, <span class="ruby-value str">'std'</span>, <span class="ruby-value str">'stdext'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">namespace</span><span class="ruby-operator">|</span>
|
1400
|
+
91: [<span class="ruby-value str">'ext/hash_map'</span>, <span class="ruby-value str">'hash_map'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash_map_header</span><span class="ruby-operator">|</span>
|
1401
|
+
92: <span class="ruby-identifier">ok</span> = <span class="ruby-identifier">try_compile</span>(<span class="ruby-identifier">:cxx</span>, <span class="ruby-node">%Q{
|
1402
|
+
93: #include <#{hash_map_header}>
|
1403
|
+
94: int
|
1404
|
+
95: main() {
|
1405
|
+
96: #{namespace}::hash_map<int, int> m;
|
1406
|
+
97: return 0;
|
1407
|
+
98: }
|
1408
|
+
99: }</span>)
|
1409
|
+
100: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ok</span>
|
1410
|
+
101: <span class="ruby-identifier">hash_namespace</span> = <span class="ruby-identifier">namespace</span>
|
1411
|
+
102: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-DHASH_NAMESPACE=\"#{namespace}\""</span>
|
1412
|
+
103: <span class="ruby-keyword kw">end</span>
|
1413
|
+
104: <span class="ruby-keyword kw">end</span>
|
1414
|
+
105: <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ok</span>
|
1415
|
+
106: <span class="ruby-keyword kw">end</span>
|
1416
|
+
107: [<span class="ruby-value str">'ext/hash_fun.h'</span>, <span class="ruby-value str">'functional'</span>, <span class="ruby-value str">'tr1/functional'</span>,
|
1417
|
+
108: <span class="ruby-value str">'ext/stl_hash_fun.h'</span>, <span class="ruby-value str">'hash_fun.h'</span>, <span class="ruby-value str">'stl_hash_fun.h'</span>,
|
1418
|
+
109: <span class="ruby-value str">'stl/_hash_fun.h'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">hash_function_header</span><span class="ruby-operator">|</span>
|
1419
|
+
110: <span class="ruby-identifier">ok</span> = <span class="ruby-identifier">try_compile</span>(<span class="ruby-identifier">:cxx</span>, <span class="ruby-node">%Q{
|
1420
|
+
111: #include <#{hash_function_header}>
|
1421
|
+
112: int
|
1422
|
+
113: main() {
|
1423
|
+
114: #{hash_namespace}::hash<int>()(5);
|
1424
|
+
115: return 0;
|
1425
|
+
116: }
|
1426
|
+
117: }</span>)
|
1427
|
+
118: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ok</span>
|
1428
|
+
119: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-DHASH_FUN_H=\"<#{hash_function_header}>\""</span>
|
1429
|
+
120: <span class="ruby-keyword kw">break</span>
|
1430
|
+
121: <span class="ruby-keyword kw">end</span>
|
1431
|
+
122: <span class="ruby-keyword kw">end</span>
|
1432
|
+
123:
|
1433
|
+
124: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
1434
|
+
125: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-pthreads'</span>
|
1435
|
+
126: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64'</span>
|
1436
|
+
127: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
1437
|
+
128: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
1438
|
+
129: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-mcpu=ultrasparc'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc/</span>
|
1439
|
+
130: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
1440
|
+
131: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS'</span>
|
1441
|
+
132: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/aix/</span>
|
1442
|
+
133: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DOXT_DISABLE_BACKTRACES'</span>
|
1443
|
+
134: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/</span>
|
1444
|
+
135: <span class="ruby-comment cmt"># http://code.google.com/p/phusion-passenger/issues/detail?id=200</span>
|
1445
|
+
136: <span class="ruby-comment cmt"># http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c</span>
|
1446
|
+
137: <span class="ruby-comment cmt"># http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561</span>
|
1447
|
+
138: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_SP_USE_PTHREADS'</span>
|
1448
|
+
139: <span class="ruby-keyword kw">end</span>
|
1449
|
+
140:
|
1450
|
+
141: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DHAS_SFENCE'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">supports_sfence_instruction?</span>
|
1451
|
+
142: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DHAS_LFENCE'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">supports_lfence_instruction?</span>
|
1452
|
+
143:
|
1453
|
+
144: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" "</span>).<span class="ruby-identifier">strip</span>
|
1454
|
+
145: <span class="ruby-keyword kw">end</span>
|
1455
|
+
</pre>
|
1456
|
+
</div>
|
1457
|
+
</div>
|
1458
|
+
</div>
|
1459
|
+
<div class="method">
|
1460
|
+
<div class="title">
|
1461
|
+
<a name="M000054"></a><b>portability_ldflags</b>()
|
1462
|
+
</div>
|
1463
|
+
<div class="description">
|
1464
|
+
<p>
|
1465
|
+
Linker flags that should be used for linking every C/C++ program, for
|
1466
|
+
portability reasons. These flags should be specified as last when invoking
|
1467
|
+
the linker.
|
1468
|
+
</p>
|
1469
|
+
</div>
|
1470
|
+
<div class="sourcecode">
|
1471
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show source</a> ]</p>
|
1472
|
+
<div id="M000054_source" class="dyn-source">
|
1473
|
+
<pre>
|
1474
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/compiler.rb, line 151</span>
|
1475
|
+
151: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_ldflags</span>
|
1476
|
+
152: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
1477
|
+
153: <span class="ruby-identifier">result</span> = <span class="ruby-value str">'-lxnet -lrt -lsocket -lnsl -lpthread'</span>
|
1478
|
+
154: <span class="ruby-keyword kw">else</span>
|
1479
|
+
155: <span class="ruby-identifier">result</span> = <span class="ruby-value str">'-lpthread'</span>
|
1480
|
+
156: <span class="ruby-keyword kw">end</span>
|
1481
|
+
157: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">' -lmath'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">has_math_library?</span>
|
1482
|
+
158: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span>
|
1483
|
+
159: <span class="ruby-keyword kw">end</span>
|
1484
|
+
</pre>
|
1485
|
+
</div>
|
1486
|
+
</div>
|
1487
|
+
</div>
|
1488
|
+
<div class="method">
|
1489
|
+
<div class="title">
|
1490
|
+
<a name="M000072"></a><b>rake</b>()
|
1491
|
+
</div>
|
1492
|
+
<div class="description">
|
1493
|
+
<p>
|
1494
|
+
Returns the absolute path to the Rake executable that belongs to the
|
1495
|
+
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
1496
|
+
</p>
|
1497
|
+
<p>
|
1498
|
+
The return value may not be the actual correct invocation for Rake. Use <a
|
1499
|
+
href="PlatformInfo.html#M000073">rake_command</a> for that.
|
1500
|
+
</p>
|
1501
|
+
</div>
|
1502
|
+
<div class="sourcecode">
|
1503
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
|
1504
|
+
<div id="M000072_source" class="dyn-source">
|
1505
|
+
<pre>
|
1506
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 121</span>
|
1507
|
+
121: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rake</span>
|
1508
|
+
122: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_tool</span>(<span class="ruby-value str">'rake'</span>)
|
1509
|
+
123: <span class="ruby-keyword kw">end</span>
|
1510
|
+
</pre>
|
1511
|
+
</div>
|
1512
|
+
</div>
|
1513
|
+
</div>
|
1514
|
+
<div class="method">
|
1515
|
+
<div class="title">
|
1516
|
+
<a name="M000073"></a><b>rake_command</b>()
|
1517
|
+
</div>
|
1518
|
+
<div class="description">
|
1519
|
+
<p>
|
1520
|
+
Returns the correct command string for invoking the Rake executable that
|
1521
|
+
belongs to the current Ruby interpreter. Returns nil if Rake is not found.
|
1522
|
+
</p>
|
1523
|
+
</div>
|
1524
|
+
<div class="sourcecode">
|
1525
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000073_source')" id="l_M000073_source">show source</a> ]</p>
|
1526
|
+
<div id="M000073_source" class="dyn-source">
|
1527
|
+
<pre>
|
1528
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 129</span>
|
1529
|
+
129: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rake_command</span>
|
1530
|
+
130: <span class="ruby-identifier">filename</span> = <span class="ruby-identifier">rake</span>
|
1531
|
+
131: <span class="ruby-comment cmt"># If the Rake executable is a Ruby program then we need to run</span>
|
1532
|
+
132: <span class="ruby-comment cmt"># it in the correct Ruby interpreter just in case Rake doesn't</span>
|
1533
|
+
133: <span class="ruby-comment cmt"># have the correct shebang line; we don't want a totally different</span>
|
1534
|
+
134: <span class="ruby-comment cmt"># Ruby than the current one to be invoked.</span>
|
1535
|
+
135: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">is_ruby_program?</span>(<span class="ruby-identifier">filename</span>)
|
1536
|
+
136: <span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{ruby_command} #{filename}"</span>
|
1537
|
+
137: <span class="ruby-keyword kw">else</span>
|
1538
|
+
138: <span class="ruby-comment cmt"># If it's not a Ruby program then it's probably a wrapper</span>
|
1539
|
+
139: <span class="ruby-comment cmt"># script as is the case with e.g. RVM (~/.rvm/wrappers).</span>
|
1540
|
+
140: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
1541
|
+
141: <span class="ruby-keyword kw">end</span>
|
1542
|
+
142: <span class="ruby-keyword kw">end</span>
|
1543
|
+
</pre>
|
1544
|
+
</div>
|
1545
|
+
</div>
|
1546
|
+
</div>
|
1547
|
+
<div class="method">
|
1548
|
+
<div class="title">
|
1549
|
+
<a name="M000074"></a><b>rspec</b>()
|
1550
|
+
</div>
|
1551
|
+
<div class="description">
|
1552
|
+
<p>
|
1553
|
+
Returns the absolute path to the RSpec runner program that belongs to the
|
1554
|
+
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
1555
|
+
</p>
|
1556
|
+
</div>
|
1557
|
+
<div class="sourcecode">
|
1558
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000074_source')" id="l_M000074_source">show source</a> ]</p>
|
1559
|
+
<div id="M000074_source" class="dyn-source">
|
1560
|
+
<pre>
|
1561
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 148</span>
|
1562
|
+
148: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rspec</span>
|
1563
|
+
149: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_tool</span>(<span class="ruby-value str">'spec'</span>)
|
1564
|
+
150: <span class="ruby-keyword kw">end</span>
|
1565
|
+
</pre>
|
1566
|
+
</div>
|
1567
|
+
</div>
|
1568
|
+
</div>
|
1569
|
+
<div class="method">
|
1570
|
+
<div class="title">
|
1571
|
+
<a name="M000068"></a><b>ruby_command</b>()
|
1572
|
+
</div>
|
1573
|
+
<div class="description">
|
1574
|
+
<p>
|
1575
|
+
Returns correct command for invoking the current Ruby interpreter. In case
|
1576
|
+
of RVM this function will return the path to the RVM wrapper script that
|
1577
|
+
executes the current Ruby interpreter in the currently active gem set.
|
1578
|
+
</p>
|
1579
|
+
</div>
|
1580
|
+
<div class="sourcecode">
|
1581
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p>
|
1582
|
+
<div id="M000068_source" class="dyn-source">
|
1583
|
+
<pre>
|
1584
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 48</span>
|
1585
|
+
48: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ruby_command</span>
|
1586
|
+
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_rvm?</span>
|
1587
|
+
50: <span class="ruby-identifier">name</span> = <span class="ruby-identifier">rvm_ruby_string</span>
|
1588
|
+
51: <span class="ruby-identifier">dir</span> = <span class="ruby-identifier">rvm_path</span>
|
1589
|
+
52: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">&&</span> <span class="ruby-identifier">dir</span>
|
1590
|
+
53: <span class="ruby-identifier">filename</span> = <span class="ruby-node">"#{dir}/wrappers/#{name}/ruby"</span>
|
1591
|
+
54: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
1592
|
+
55: <span class="ruby-identifier">contents</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">'rb'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
1593
|
+
56: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">read</span>
|
1594
|
+
57: <span class="ruby-keyword kw">end</span>
|
1595
|
+
58: <span class="ruby-comment cmt"># Old wrapper scripts reference $HOME which causes</span>
|
1596
|
+
59: <span class="ruby-comment cmt"># things to blow up when run by a different user.</span>
|
1597
|
+
60: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">contents</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"$HOME"</span>)
|
1598
|
+
61: <span class="ruby-identifier">filename</span> = <span class="ruby-keyword kw">nil</span>
|
1599
|
+
62: <span class="ruby-keyword kw">end</span>
|
1600
|
+
63: <span class="ruby-keyword kw">else</span>
|
1601
|
+
64: <span class="ruby-identifier">filename</span> = <span class="ruby-keyword kw">nil</span>
|
1602
|
+
65: <span class="ruby-keyword kw">end</span>
|
1603
|
+
66: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>
|
1604
|
+
67: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
1605
|
+
68: <span class="ruby-keyword kw">else</span>
|
1606
|
+
69: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Your RVM wrapper scripts are too old. Please "</span> <span class="ruby-operator">+</span>
|
1607
|
+
70: <span class="ruby-value str">"update them first by running 'rvm update --head && "</span> <span class="ruby-operator">+</span>
|
1608
|
+
71: <span class="ruby-value str">"rvm reload && rvm repair all'."</span>
|
1609
|
+
72: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
1610
|
+
73: <span class="ruby-keyword kw">end</span>
|
1611
|
+
74: <span class="ruby-keyword kw">else</span>
|
1612
|
+
75: <span class="ruby-comment cmt"># Something's wrong with the user's RVM installation.</span>
|
1613
|
+
76: <span class="ruby-comment cmt"># Raise an error so that the user knows this instead of</span>
|
1614
|
+
77: <span class="ruby-comment cmt"># having things fail randomly later on.</span>
|
1615
|
+
78: <span class="ruby-comment cmt"># 'name' is guaranteed to be non-nil because rvm_ruby_string</span>
|
1616
|
+
79: <span class="ruby-comment cmt"># already raises an exception on error.</span>
|
1617
|
+
80: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Your RVM installation appears to be broken: the RVM "</span> <span class="ruby-operator">+</span>
|
1618
|
+
81: <span class="ruby-value str">"path cannot be found. Please fix your RVM installation "</span> <span class="ruby-operator">+</span>
|
1619
|
+
82: <span class="ruby-value str">"or contact the RVM developers for support."</span>
|
1620
|
+
83: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
1621
|
+
84: <span class="ruby-keyword kw">end</span>
|
1622
|
+
85: <span class="ruby-keyword kw">else</span>
|
1623
|
+
86: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">ruby_executable</span>
|
1624
|
+
87: <span class="ruby-keyword kw">end</span>
|
1625
|
+
88: <span class="ruby-keyword kw">end</span>
|
1626
|
+
</pre>
|
1627
|
+
</div>
|
1628
|
+
</div>
|
1629
|
+
</div>
|
1630
|
+
<div class="method">
|
1631
|
+
<div class="title">
|
1632
|
+
<a name="M000069"></a><b>ruby_executable</b>()
|
1633
|
+
</div>
|
1634
|
+
<div class="description">
|
1635
|
+
<p>
|
1636
|
+
Returns the full path to the current Ruby interpreter‘s executable
|
1637
|
+
file. This might not be the actual correct command to use for invoking the
|
1638
|
+
Ruby interpreter; use <a href="PlatformInfo.html#M000068">ruby_command</a>
|
1639
|
+
instead.
|
1640
|
+
</p>
|
1641
|
+
</div>
|
1642
|
+
<div class="sourcecode">
|
1643
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
|
1644
|
+
<div id="M000069_source" class="dyn-source">
|
1645
|
+
<pre>
|
1646
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 94</span>
|
1647
|
+
94: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ruby_executable</span>
|
1648
|
+
95: <span class="ruby-ivar">@@ruby_executable</span> <span class="ruby-operator">||=</span>
|
1649
|
+
96: <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'bindir'</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">'/'</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'RUBY_INSTALL_NAME'</span>] <span class="ruby-operator">+</span> <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'EXEEXT'</span>]
|
1650
|
+
97: <span class="ruby-keyword kw">end</span>
|
1651
|
+
</pre>
|
1652
|
+
</div>
|
1653
|
+
</div>
|
1654
|
+
</div>
|
1655
|
+
<div class="method">
|
1656
|
+
<div class="title">
|
1657
|
+
<a name="M000046"></a><b>ruby_extension_binary_compatibility_ids</b>()
|
1658
|
+
</div>
|
1659
|
+
<div class="description">
|
1660
|
+
<p>
|
1661
|
+
Returns an array of identifiers that describe the current Ruby
|
1662
|
+
interpreter‘s extension binary compatibility. A Ruby extension
|
1663
|
+
compiled for a certain Ruby interpreter can also be loaded on a different
|
1664
|
+
Ruby interpreter with the same binary compatibility identifiers.
|
1665
|
+
</p>
|
1666
|
+
<p>
|
1667
|
+
The identifiers depend on the following factors:
|
1668
|
+
</p>
|
1669
|
+
<ul>
|
1670
|
+
<li>Ruby engine name.
|
1671
|
+
|
1672
|
+
</li>
|
1673
|
+
<li>Ruby extension version. This is not the same as the Ruby language version,
|
1674
|
+
which identifies language-level compatibility. This is rather about binary
|
1675
|
+
compatibility of extensions. MRI seems to break source compatibility
|
1676
|
+
between tiny releases, though patchlevel releases tend to be source and
|
1677
|
+
binary compatible.
|
1678
|
+
|
1679
|
+
</li>
|
1680
|
+
<li>Ruby extension architecture. This is not necessarily the same as the
|
1681
|
+
operating system runtime architecture or the CPU architecture. For example,
|
1682
|
+
in case of JRuby, the extension architecture is just "java"
|
1683
|
+
because all extensions target the Java platform; the architecture the JVM
|
1684
|
+
was compiled for has no effect on compatibility. On systems with universal
|
1685
|
+
binaries support there may be multiple architectures. In this case the
|
1686
|
+
architecture is "universal" because extensions must be able to
|
1687
|
+
support all of the Ruby executable‘s architectures.
|
1688
|
+
|
1689
|
+
</li>
|
1690
|
+
<li>The operating system for which the Ruby interpreter was compiled.
|
1691
|
+
|
1692
|
+
</li>
|
1693
|
+
</ul>
|
1694
|
+
</div>
|
1695
|
+
<div class="sourcecode">
|
1696
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show source</a> ]</p>
|
1697
|
+
<div id="M000046_source" class="dyn-source">
|
1698
|
+
<pre>
|
1699
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/binary_compatibility.rb, line 59</span>
|
1700
|
+
59: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ruby_extension_binary_compatibility_ids</span>
|
1701
|
+
60: <span class="ruby-identifier">ruby_engine</span> = <span class="ruby-keyword kw">defined?</span>(<span class="ruby-constant">RUBY_ENGINE</span>) <span class="ruby-operator">?</span> <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">:</span> <span class="ruby-value str">"ruby"</span>
|
1702
|
+
61: <span class="ruby-identifier">ruby_ext_version</span> = <span class="ruby-constant">RUBY_VERSION</span>
|
1703
|
+
62: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
1704
|
+
63: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/universal/</span>
|
1705
|
+
64: <span class="ruby-identifier">ruby_arch</span> = <span class="ruby-value str">"universal"</span>
|
1706
|
+
65: <span class="ruby-keyword kw">else</span>
|
1707
|
+
66: <span class="ruby-comment cmt"># Something like:</span>
|
1708
|
+
67: <span class="ruby-comment cmt"># "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable x86_64"</span>
|
1709
|
+
68: <span class="ruby-identifier">ruby_arch</span> = <span class="ruby-node">`file -L "#{ruby_executable}"`</span>.<span class="ruby-identifier">strip</span>
|
1710
|
+
69: <span class="ruby-identifier">ruby_arch</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/.* /</span>, <span class="ruby-value str">''</span>)
|
1711
|
+
70: <span class="ruby-keyword kw">end</span>
|
1712
|
+
71: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"java"</span>
|
1713
|
+
72: <span class="ruby-identifier">ruby_arch</span> = <span class="ruby-value str">"java"</span>
|
1714
|
+
73: <span class="ruby-keyword kw">else</span>
|
1715
|
+
74: <span class="ruby-identifier">ruby_arch</span> = <span class="ruby-identifier">cpu_architectures</span>[<span class="ruby-value">0</span>]
|
1716
|
+
75: <span class="ruby-keyword kw">end</span>
|
1717
|
+
76: <span class="ruby-keyword kw">return</span> [<span class="ruby-identifier">ruby_engine</span>, <span class="ruby-identifier">ruby_ext_version</span>, <span class="ruby-identifier">ruby_arch</span>, <span class="ruby-identifier">os_name</span>]
|
1718
|
+
77: <span class="ruby-keyword kw">end</span>
|
1719
|
+
</pre>
|
1720
|
+
</div>
|
1721
|
+
</div>
|
1722
|
+
</div>
|
1723
|
+
<div class="method">
|
1724
|
+
<div class="title">
|
1725
|
+
<a name="M000078"></a><b>ruby_sudo_command</b>()
|
1726
|
+
</div>
|
1727
|
+
<div class="description">
|
1728
|
+
<p>
|
1729
|
+
Returns either ‘sudo’ or ‘rvmsudo’ depending on
|
1730
|
+
whether the current Ruby interpreter is managed by RVM.
|
1731
|
+
</p>
|
1732
|
+
</div>
|
1733
|
+
<div class="sourcecode">
|
1734
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000078_source')" id="l_M000078_source">show source</a> ]</p>
|
1735
|
+
<div id="M000078_source" class="dyn-source">
|
1736
|
+
<pre>
|
1737
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 232</span>
|
1738
|
+
232: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ruby_sudo_command</span>
|
1739
|
+
233: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_rvm?</span>
|
1740
|
+
234: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"rvmsudo"</span>
|
1741
|
+
235: <span class="ruby-keyword kw">else</span>
|
1742
|
+
236: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"sudo"</span>
|
1743
|
+
237: <span class="ruby-keyword kw">end</span>
|
1744
|
+
238: <span class="ruby-keyword kw">end</span>
|
1745
|
+
</pre>
|
1746
|
+
</div>
|
1747
|
+
</div>
|
1748
|
+
</div>
|
1749
|
+
<div class="method">
|
1750
|
+
<div class="title">
|
1751
|
+
<a name="M000070"></a><b>ruby_supports_fork?</b>()
|
1752
|
+
</div>
|
1753
|
+
<div class="description">
|
1754
|
+
<p>
|
1755
|
+
Returns whether the Ruby interpreter supports process forking.
|
1756
|
+
</p>
|
1757
|
+
</div>
|
1758
|
+
<div class="sourcecode">
|
1759
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
|
1760
|
+
<div id="M000070_source" class="dyn-source">
|
1761
|
+
<pre>
|
1762
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 100</span>
|
1763
|
+
100: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ruby_supports_fork?</span>
|
1764
|
+
101: <span class="ruby-comment cmt"># MRI >= 1.9.2's respond_to? returns false for methods</span>
|
1765
|
+
102: <span class="ruby-comment cmt"># that are not implemented.</span>
|
1766
|
+
103: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Process</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:fork</span>) <span class="ruby-operator">&&</span>
|
1767
|
+
104: <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"jruby"</span> <span class="ruby-operator">&&</span>
|
1768
|
+
105: <span class="ruby-constant">RUBY_ENGINE</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">"macruby"</span> <span class="ruby-operator">&&</span>
|
1769
|
+
106: <span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">CONFIG</span>[<span class="ruby-value str">'target_os'</span>] <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin|windows|mingw/</span>
|
1770
|
+
107: <span class="ruby-keyword kw">end</span>
|
1771
|
+
</pre>
|
1772
|
+
</div>
|
1773
|
+
</div>
|
1774
|
+
</div>
|
1775
|
+
<div class="method">
|
1776
|
+
<div class="title">
|
1777
|
+
<a name="M000076"></a><b>rvm_path</b>()
|
1778
|
+
</div>
|
1779
|
+
<div class="description">
|
1780
|
+
<p>
|
1781
|
+
If the current Ruby interpreter is managed by RVM, returns the directory in
|
1782
|
+
which RVM places its working files. Otherwise returns nil.
|
1783
|
+
</p>
|
1784
|
+
</div>
|
1785
|
+
<div class="sourcecode">
|
1786
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000076_source')" id="l_M000076_source">show source</a> ]</p>
|
1787
|
+
<div id="M000076_source" class="dyn-source">
|
1788
|
+
<pre>
|
1789
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 162</span>
|
1790
|
+
162: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rvm_path</span>
|
1791
|
+
163: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_rvm?</span>
|
1792
|
+
164: [<span class="ruby-constant">ENV</span>[<span class="ruby-value str">'rvm_path'</span>], <span class="ruby-value str">"~/.rvm"</span>, <span class="ruby-value str">"/usr/local/rvm"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
|
1793
|
+
165: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">nil?</span>
|
1794
|
+
166: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">path</span>)
|
1795
|
+
167: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">path</span>)
|
1796
|
+
168: <span class="ruby-keyword kw">end</span>
|
1797
|
+
169: <span class="ruby-comment cmt"># Failure to locate the RVM path is probably caused by the</span>
|
1798
|
+
170: <span class="ruby-comment cmt"># user customizing $rvm_path. Older RVM versions don't</span>
|
1799
|
+
171: <span class="ruby-comment cmt"># export $rvm_path, making us unable to detect its value.</span>
|
1800
|
+
172: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Unable to locate the RVM path. Your RVM installation "</span> <span class="ruby-operator">+</span>
|
1801
|
+
173: <span class="ruby-value str">"is probably too old. Please update it with "</span> <span class="ruby-operator">+</span>
|
1802
|
+
174: <span class="ruby-value str">"'rvm update --head && rvm reload && rvm repair all'."</span>
|
1803
|
+
175: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
1804
|
+
176: <span class="ruby-keyword kw">else</span>
|
1805
|
+
177: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1806
|
+
178: <span class="ruby-keyword kw">end</span>
|
1807
|
+
179: <span class="ruby-keyword kw">end</span>
|
1808
|
+
</pre>
|
1809
|
+
</div>
|
1810
|
+
</div>
|
1811
|
+
</div>
|
1812
|
+
<div class="method">
|
1813
|
+
<div class="title">
|
1814
|
+
<a name="M000077"></a><b>rvm_ruby_string</b>()
|
1815
|
+
</div>
|
1816
|
+
<div class="description">
|
1817
|
+
<p>
|
1818
|
+
If the current Ruby interpreter is managed by RVM, returns the RVM name
|
1819
|
+
which identifies the current Ruby interpreter plus the currently active
|
1820
|
+
gemset, e.g. something like this: "ruby-1.9.2-p0@mygemset"
|
1821
|
+
</p>
|
1822
|
+
<p>
|
1823
|
+
Returns nil otherwise.
|
1824
|
+
</p>
|
1825
|
+
</div>
|
1826
|
+
<div class="sourcecode">
|
1827
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000077_source')" id="l_M000077_source">show source</a> ]</p>
|
1828
|
+
<div id="M000077_source" class="dyn-source">
|
1829
|
+
<pre>
|
1830
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/ruby.rb, line 188</span>
|
1831
|
+
188: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rvm_ruby_string</span>
|
1832
|
+
189: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">in_rvm?</span>
|
1833
|
+
190: <span class="ruby-comment cmt"># RVM used to export the necessary information through</span>
|
1834
|
+
191: <span class="ruby-comment cmt"># environment variables, but doesn't always do that anymore</span>
|
1835
|
+
192: <span class="ruby-comment cmt"># in the latest versions in order to fight env var pollution.</span>
|
1836
|
+
193: <span class="ruby-comment cmt"># Scanning $LOAD_PATH seems to be the only way to obtain</span>
|
1837
|
+
194: <span class="ruby-comment cmt"># the information.</span>
|
1838
|
+
195:
|
1839
|
+
196: <span class="ruby-comment cmt"># Getting the RVM name of the Ruby interpreter ("ruby-1.9.2")</span>
|
1840
|
+
197: <span class="ruby-comment cmt"># isn't so hard, we can extract it from the #ruby_executable</span>
|
1841
|
+
198: <span class="ruby-comment cmt"># string. Getting the gemset name is a bit harder, so let's</span>
|
1842
|
+
199: <span class="ruby-comment cmt"># try various strategies...</span>
|
1843
|
+
200:
|
1844
|
+
201: <span class="ruby-comment cmt"># $GEM_HOME usually contains the gem set name.</span>
|
1845
|
+
202: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">GEM_HOME</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">GEM_HOME</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"rvm/gems/"</span>)
|
1846
|
+
203: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-constant">GEM_HOME</span>)
|
1847
|
+
204: <span class="ruby-keyword kw">end</span>
|
1848
|
+
205:
|
1849
|
+
206: <span class="ruby-comment cmt"># User somehow managed to nuke $GEM_HOME. Extract info</span>
|
1850
|
+
207: <span class="ruby-comment cmt"># from $LOAD_PATH.</span>
|
1851
|
+
208: <span class="ruby-identifier">matching_path</span> = <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">find_all</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span><span class="ruby-operator">|</span>
|
1852
|
+
209: <span class="ruby-identifier">item</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"rvm/gems/"</span>)
|
1853
|
+
210: <span class="ruby-keyword kw">end</span>
|
1854
|
+
211: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">matching_path</span>
|
1855
|
+
212: <span class="ruby-identifier">subpath</span> = <span class="ruby-identifier">matching_path</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/^.*rvm\/gems\//</span>, <span class="ruby-value str">''</span>)
|
1856
|
+
213: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">subpath</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'/'</span>).<span class="ruby-identifier">first</span>
|
1857
|
+
214: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">result</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">result</span>
|
1858
|
+
215: <span class="ruby-keyword kw">end</span>
|
1859
|
+
216:
|
1860
|
+
217: <span class="ruby-comment cmt"># On Ruby 1.9, $LOAD_PATH does not contain any gem paths until</span>
|
1861
|
+
218: <span class="ruby-comment cmt"># at least one gem has been required so the above can fail.</span>
|
1862
|
+
219: <span class="ruby-comment cmt"># We're out of options now, we can't detect the gem set.</span>
|
1863
|
+
220: <span class="ruby-comment cmt"># Raise an exception so that the user knows what's going on</span>
|
1864
|
+
221: <span class="ruby-comment cmt"># instead of having things fail in obscure ways later.</span>
|
1865
|
+
222: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Unable to autodetect the currently active RVM gem "</span> <span class="ruby-operator">+</span>
|
1866
|
+
223: <span class="ruby-value str">"set name. Please contact this program's author for support."</span>
|
1867
|
+
224: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
1868
|
+
225: <span class="ruby-keyword kw">end</span>
|
1869
|
+
226: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1870
|
+
227: <span class="ruby-keyword kw">end</span>
|
1871
|
+
</pre>
|
1872
|
+
</div>
|
1873
|
+
</div>
|
1874
|
+
</div>
|
1875
|
+
<div class="method">
|
1876
|
+
<div class="title">
|
1877
|
+
<a name="M000067"></a><b>supports_lfence_instruction?</b>()
|
1878
|
+
</div>
|
1879
|
+
<div class="description">
|
1880
|
+
<p>
|
1881
|
+
Returns whether the OS‘s main CPU architecture supports the
|
1882
|
+
x86/x86_64 lfence instruction.
|
1883
|
+
</p>
|
1884
|
+
</div>
|
1885
|
+
<div class="sourcecode">
|
1886
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
|
1887
|
+
<div id="M000067_source" class="dyn-source">
|
1888
|
+
<pre>
|
1889
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/operating_system.rb, line 144</span>
|
1890
|
+
144: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">supports_lfence_instruction?</span>
|
1891
|
+
145: <span class="ruby-identifier">arch</span> = <span class="ruby-identifier">cpu_architectures</span>[<span class="ruby-value">0</span>]
|
1892
|
+
146: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86_64"</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86"</span> <span class="ruby-operator">&&</span>
|
1893
|
+
147: <span class="ruby-identifier">try_compile_and_run</span>(<span class="ruby-identifier">:c</span>, <span class="ruby-value str">%Q{
|
1894
|
+
148: int
|
1895
|
+
149: main() {
|
1896
|
+
150: __asm__ __volatile__ ("lfence" ::: "memory");
|
1897
|
+
151: return 0;
|
1898
|
+
152: }
|
1899
|
+
153: }</span>))
|
1900
|
+
154: <span class="ruby-keyword kw">end</span>
|
1901
|
+
</pre>
|
1902
|
+
</div>
|
1903
|
+
</div>
|
1904
|
+
</div>
|
1905
|
+
<div class="method">
|
1906
|
+
<div class="title">
|
1907
|
+
<a name="M000066"></a><b>supports_sfence_instruction?</b>()
|
1908
|
+
</div>
|
1909
|
+
<div class="description">
|
1910
|
+
<p>
|
1911
|
+
Returns whether the OS‘s main CPU architecture supports the
|
1912
|
+
x86/x86_64 sfence instruction.
|
1913
|
+
</p>
|
1914
|
+
</div>
|
1915
|
+
<div class="sourcecode">
|
1916
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p>
|
1917
|
+
<div id="M000066_source" class="dyn-source">
|
1918
|
+
<pre>
|
1919
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/operating_system.rb, line 129</span>
|
1920
|
+
129: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">supports_sfence_instruction?</span>
|
1921
|
+
130: <span class="ruby-identifier">arch</span> = <span class="ruby-identifier">cpu_architectures</span>[<span class="ruby-value">0</span>]
|
1922
|
+
131: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86_64"</span> <span class="ruby-operator">||</span> (<span class="ruby-identifier">arch</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"x86"</span> <span class="ruby-operator">&&</span>
|
1923
|
+
132: <span class="ruby-identifier">try_compile_and_run</span>(<span class="ruby-identifier">:c</span>, <span class="ruby-value str">%Q{
|
1924
|
+
133: int
|
1925
|
+
134: main() {
|
1926
|
+
135: __asm__ __volatile__ ("sfence" ::: "memory");
|
1927
|
+
136: return 0;
|
1928
|
+
137: }
|
1929
|
+
138: }</span>))
|
1930
|
+
139: <span class="ruby-keyword kw">end</span>
|
1931
|
+
</pre>
|
1932
|
+
</div>
|
1933
|
+
</div>
|
1934
|
+
</div>
|
1935
|
+
<div class="method">
|
1936
|
+
<div class="title">
|
1937
|
+
<a name="M000080"></a><b>zlib_flags</b>()
|
1938
|
+
</div>
|
1939
|
+
<div class="sourcecode">
|
1940
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000080_source')" id="l_M000080_source">show source</a> ]</p>
|
1941
|
+
<div id="M000080_source" class="dyn-source">
|
1942
|
+
<pre>
|
1943
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/zlib.rb, line 29</span>
|
1944
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zlib_flags</span>
|
1945
|
+
30: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
1946
|
+
31: <span class="ruby-keyword kw">end</span>
|
1947
|
+
</pre>
|
1948
|
+
</div>
|
1949
|
+
</div>
|
1950
|
+
</div>
|
1951
|
+
<div class="method">
|
1952
|
+
<div class="title">
|
1953
|
+
<a name="M000081"></a><b>zlib_libs</b>()
|
1954
|
+
</div>
|
1955
|
+
<div class="sourcecode">
|
1956
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000081_source')" id="l_M000081_source">show source</a> ]</p>
|
1957
|
+
<div id="M000081_source" class="dyn-source">
|
1958
|
+
<pre>
|
1959
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info/zlib.rb, line 33</span>
|
1960
|
+
33: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">zlib_libs</span>
|
1961
|
+
34: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lz'</span>
|
1962
|
+
35: <span class="ruby-keyword kw">end</span>
|
1963
|
+
</pre>
|
1964
|
+
</div>
|
1965
|
+
</div>
|
1966
|
+
</div>
|
1967
|
+
</div>
|
1968
|
+
|
1969
|
+
</div>
|
1970
|
+
|
1971
|
+
</body>
|
1972
|
+
</html>
|