diff --git a/akka-docs-dev/_sphinx/exts/includecode2.py b/akka-docs-dev/_sphinx/exts/includecode2.py index 01394cc929..9e6a12dc09 100644 --- a/akka-docs-dev/_sphinx/exts/includecode2.py +++ b/akka-docs-dev/_sphinx/exts/includecode2.py @@ -48,7 +48,7 @@ class IncludeCode2(Directive): lines = f.readlines() f.close() except (IOError, OSError): - return [document.reporter.warning( + return [document.reporter.error( 'Include file %r not found or reading it failed' % fn, line=self.lineno)] except UnicodeError: @@ -98,8 +98,7 @@ class IncludeCode2(Directive): text = ''.join(res) if text == "": - # in includecode2 it indeed is a warning, an empty code block will be inserted - return [document.reporter.warning('Snippet "' + snippet + '" not found!', line=self.lineno)] + return [document.reporter.error('Snippet "' + snippet + '" not found!', line=self.lineno)] retnode = nodes.literal_block(text, text, source=fn) document.settings.env.note_dependency(rel_fn) diff --git a/akka-docs-dev/rst/java/stream-io.rst b/akka-docs-dev/rst/java/stream-io.rst index 743c2b5be8..24715b03fa 100644 --- a/akka-docs-dev/rst/java/stream-io.rst +++ b/akka-docs-dev/rst/java/stream-io.rst @@ -96,7 +96,7 @@ logic in Flows and attaching those to :class:`StreamIO` in order to implement yo In this example both client and server may need to close the stream based on a parsed command - ``BYE`` in the case of the server, and ``q`` in the case of the client. This is implemented by using a custom :class:`PushStage` -(see :ref:`stream-using-push-pull-stage-java`) which completes the stream once it encounters such command. +which completes the stream once it encounters such command. Streaming File IO ================= diff --git a/akka-docs-dev/rst/scala/code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala b/akka-docs-dev/rst/scala/code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala index 0fc064685e..7030faaec0 100644 --- a/akka-docs-dev/rst/scala/code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala +++ b/akka-docs-dev/rst/scala/code/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala @@ -33,7 +33,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abcdef") ~> route ~> check { responseAs[String] shouldEqual "The length of the request URI is 25" } - //#0extract + //# } "0extractLog" in { //#0extractLog @@ -47,7 +47,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abcdef") ~> route ~> check { responseAs[String] shouldEqual "It's amazing!" } - //#0extractLog + //# } "withMaterializer-0" in { //#withMaterializer-0 @@ -78,7 +78,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/special/sample") ~> route ~> check { responseAs[String] shouldEqual s"Materialized by ${special.##}!" } - //#withMaterializer-0 + //# } "extractMaterializer-0" in { //#extractMaterializer-0 @@ -97,7 +97,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/sample") ~> route ~> check { responseAs[String] shouldEqual s"Materialized by ${materializer.##}!" } - //#extractMaterializer-0 + //# } "withExecutionContext-0" in compileOnlySpec { //#withExecutionContext-0 @@ -126,7 +126,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/special/sample") ~> route ~> check { responseAs[String] shouldEqual s"Run on ${special.##}!" } - //#withExecutionContext-0 + //# } "extractExecutionContext-0" in compileOnlySpec { //#extractExecutionContext-0 @@ -148,7 +148,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/sample") ~> route ~> check { responseAs[String] shouldEqual s"Run on ${system.dispatcher.##}!" } - //#extractExecutionContext-0 + //# } "0withLog" in { //#0withLog @@ -179,7 +179,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/special/sample") ~> route ~> check { responseAs[String] shouldEqual s"Logging using $special!" } - //#0withLog + //# } "withSettings-0" in compileOnlySpec { //#withSettings-0 @@ -210,7 +210,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/sample") ~> route ~> check { responseAs[String] shouldEqual "{}" } - //#withSettings-0 + //# } "textract" in { //#textract @@ -227,7 +227,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abcdef?ghi=12") ~> route ~> check { responseAs[String] shouldEqual "The path is /abcdef and the query is ghi=12" } - //#textract + //# } "tprovide" in { //#tprovide @@ -241,7 +241,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "Value is test and its length is 4" } - //#tprovide + //# } "0mapResponse" in { //#0mapResponse @@ -253,7 +253,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abcdef?ghi=12") ~> route ~> check { status shouldEqual StatusCodes.BadGateway } - //#0mapResponse + //# } "1mapResponse-advanced-json" in { //#1mapResponse-advanced @@ -275,7 +275,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { def apiRoute(innerRoutes: ⇒ Route): Route = mapResponse(nonSuccessToEmptyJsonEntity)(innerRoutes) } - //#1mapResponse-advanced + //# import StatusCodes._ val __system = system @@ -296,7 +296,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "{}" } - //#1mapResponse-advanced + //# } "mapRouteResult" in { //#mapRouteResult @@ -320,7 +320,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { status shouldEqual StatusCodes.OK } - //#mapRouteResult + //# } "mapRouteResultFuture" in { //#mapRouteResultFuture @@ -344,7 +344,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { status shouldEqual StatusCodes.OK header[Server] shouldEqual Some(Server("MyServer 1.0")) } - //#mapRouteResultFuture + //# } "mapResponseEntity" in { //#mapResponseEntity @@ -361,7 +361,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "testabc" } - //#mapResponseEntity + //# } "mapResponseHeaders" in { //#mapResponseHeaders @@ -381,7 +381,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { header("id") shouldEqual None header("id2").get.value shouldEqual "67890" } - //#mapResponseHeaders + //# } "mapInnerRoute" in { //#mapInnerRoute @@ -404,7 +404,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "Got IllegalArgumentException 'BLIP! BLOP! Everything broke'" } - //#mapInnerRoute + //# } "mapRejections" in { //#mapRejections @@ -423,7 +423,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abc") ~> route ~> check { status shouldEqual StatusCodes.OK } - //#mapRejections + //# } "recoverRejections" in { //#recoverRejections @@ -467,7 +467,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { status shouldEqual StatusCodes.NotFound responseAs[String] shouldEqual "Literally nothing to see here." } - //#recoverRejections + //# } "recoverRejectionsWith" in { //#recoverRejectionsWith @@ -498,7 +498,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { status shouldEqual StatusCodes.OK responseAs[String] shouldEqual "Nothing to see here, move along." } - //#recoverRejectionsWith + //# } "0mapRequest" in { //#0mapRequest @@ -513,7 +513,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "The request method was POST" } - //#0mapRequest + //# } "mapRequestContext" in { //#mapRequestContext @@ -531,7 +531,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abc/def/ghi") ~> route ~> check { responseAs[String] shouldEqual "POST" } - //#mapRequestContext + //# } "0mapRouteResult" in { //#0mapRouteResult @@ -548,7 +548,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { rejections.nonEmpty shouldEqual true } - //#0mapRouteResult + //# } "mapRouteResultPF" in { //#mapRouteResultPF @@ -566,7 +566,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { rejection shouldEqual AuthorizationFailedRejection } - //#mapRouteResultPF + //# } "mapRouteResultWithPF-0" in { //#mapRouteResultWithPF-0 @@ -584,7 +584,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { rejection shouldEqual AuthorizationFailedRejection } - //#mapRouteResultWithPF-0 + //# } "mapRouteResultWith-0" in { //#mapRouteResultWith-0 @@ -605,7 +605,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { rejection shouldEqual AuthorizationFailedRejection } - //#mapRouteResultWith-0 + //# } "pass" in { //#pass @@ -615,7 +615,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "abc" } - //#pass + //# } "0provide" in { //#0provide @@ -629,7 +629,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "prefix:test" } - //#0provide + //# } "cancelRejections-filter-example" in { //#cancelRejections-filter-example @@ -650,7 +650,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { rejections shouldEqual Nil handled shouldEqual false } - //#cancelRejections-filter-example + //# } "cancelRejection-example" in { //#cancelRejection-example @@ -666,7 +666,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { rejections shouldEqual Nil handled shouldEqual false } - //#cancelRejection-example + //# } "extractRequest-example" in { //#extractRequest-example @@ -682,7 +682,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "Request method is GET and content-type is none/none" } - //#extractRequest-example + //# } "extractSettings-examples" in { //#extractSettings-examples @@ -695,7 +695,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual s"RoutingSettings.renderVanityFooter = true" } - //#extractSettings-examples + //# } "mapSettings-examples" in { //#mapSettings-examples @@ -714,7 +714,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual s"RoutingSettings.fileGetConditional = false" } - //#mapSettings-examples + //# } "extractRequestContext-example" in { //#extractRequestContext-example @@ -732,7 +732,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/") ~> route ~> check { responseAs[String] shouldEqual "Request method is GET and content-type is none/none" } - //#extractRequestContext-example + //# } "extractUri-example" in { //#extractUri-example @@ -749,7 +749,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/test") ~> route ~> check { responseAs[String] shouldEqual "Full URI: http://example.com/test" } - //#extractUri-example + //# } "mapUnmatchedPath-example" in { //#mapUnmatchedPath-example @@ -778,7 +778,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/123456/abc") ~> route ~> check { responseAs[String] shouldEqual "Content" } - //#mapUnmatchedPath-example + //# } "extractUnmatchedPath-example" in { //#extractUnmatchedPath-example @@ -796,7 +796,7 @@ class BasicDirectivesExamplesSpec extends RoutingSpec { Get("/abc/456") ~> route ~> check { responseAs[String] shouldEqual "Unmatched: '/456'" } - //#extractUnmatchedPath-example + //# } private def compileOnlySpec(block: => Unit) = pending