Permalink
Browse files

add spray/master

  • Loading branch information...
1 parent 5137f07 commit efedac3543f61248145874912662c973caa08d7e @earldouglas earldouglas committed Nov 26, 2012
Showing 610 changed files with 37,764 additions and 0 deletions.
View
@@ -0,0 +1,7 @@
+/.idea/
+target/
+lib_managed/
+src_managed/
+test-output/
+*.iml
+*.pyc
View
@@ -0,0 +1,253 @@
+Version 1.1-M5 (2012-11-09)
+---------------------------
+- Upgraded to Scala 2.10.0-RC2 and Akka 2.1.0-RC2
+- spray-can:
+
+ + fixed NPE in RequestChunkAggregation
+ + removed stray logging statement from RequestChunkAggregation
+ + fixed incorrect rendering of chunked responses to HEAD requests
+
+- spray-http: fixed incorrect test for response encoding acceptance
+- spray-httpx: removed dangerous StatusCodeMarshaller
+- spray-io:
+
+ + improved logging of errors in the SslTlsSupport pipeline stage
+ + reworked connection closing, added ConfirmedClose reason, fixed #147
+
+- spray-routing:
+
+ + added option for disabling automatic file-chunking
+ + removed HttpService.routingSettings method, provision of RoutingSettings now fully implicit
+ + renamed Directive.map and .flatMap to .hmap/.hflatMap, re-added .map and .flatMap pimps for single-value directives
+ + improved HttpService 'runRoute' wrapper to also work in "sub-route" actors
+ + removed 'filter' directive, converted all applications to 'extract(...).flatMap'
+ + added 'pathTest' directive
+ + improve rendering of directory listings
+ + changed default redirection type to '302 Moved Permanently'
+ + improved host directive
+ + added 'dynamicIf' directives
+ + improved and flexibilized DebuggingDirectives
+ + add 'complete' overload taking a single StatusCode parameter
+
+- spray-can & spray-servlet: increased default idle and request timeouts to 120s and 30s respectively
+- spray-testkit: improved provision of custom RouteTestTimeout
+- spray-util: added 'installDebuggingEventStreamLoggers' convenience helper
+- smaller fixes and improvements
+
+
+Version 1.1-M4 (2012-10-19)
+---------------------------
+- Upgraded to Scala 2.10.0-RC1 and Akka 2.1.0-RC1
+
+
+Version 1.0-M4 (2012-10-19)
+---------------------------
+- Upgraded to parboiled 1.1.3 and spray-json 1.2.2
+- routing: further flexibilized directive combination with StandardRoutes
+- routing: (re)added 'complete' overload taking a Future[HttpResponse], closes #143
+- routing: added new directives:
+
+ + unmatchedPath
+ + listDirectoryContents
+ + getFromBrowseableDirectory / getFromBrowseableDirectories
+
+- smaller fixes and improvements
+
+
+Version 1.0-M3 (2012-10-12)
+---------------------------
+Largest refactoring in the history of the project.
+Lots of breaking changes. Most importantly:
+
+- Completely new documentation at http://spray.io
+- Renamed group id from "cc.spray" to "io.spray"
+- Renamed packages from "cc.spray..." to simply "spray..."
+- Completely refactored suite module structure (from 4 to 10+1 modules)
+- Improved naming of many identifiers across the board
+- Completely new architecture underneath routing DSL
+- Completely new Marshalling and Unmarshalling infrastructure
+- ...
+
+
+Version 1.0-M2 (2012-05-16)
+---------------------------
+- spray-io
+
+ + Added SslTlsSupport pipeline stage
+ + Fixed SetTimeout messages not working
+ + Fixed closing of already closed connections improperly handled
+ + Fixed bug in wiring of certain pipeline stages
+ + Dropped 'confirm-sends' config setting, added 'ack:Boolean' field to IoWorker.Send
+ + Renamed 'SendCompleted' event to 'AckSend'
+ + Made IoWorkerThread daemonic
+ + Improved pipeline architecture for reduced call stack depth
+
+- spray-can
+
+ + Added SSL/TLS support to HttpServer and HttpClient
+ + Added 'ack-sends' setting to client and server config
+ + Added 'transparent-head-requests' server config setting
+ + Added HttpClient.SetRequestTimeout message
+ + Fixed HttpServer not handling 'Expect: 100-continue' headers
+ + Fixed HttpClient not properly handling HEAD requests to resources containing a message body
+ + Fixed #99 (getFromFile(Name) sometimes throws IllegalStateException when streaming file content)
+ + Fixed SetTimeout messages not working
+ + Enabled validity verification on HttpRequests and HttpResponses
+ + Extended HttpDialog to also accept ActorContexts as dispatcher container
+
+- spray-base
+
+ + http: fixed custom mediatypes not being matched
+ + http: fixed ArrayIndexOutOfBoundsException during header parsing of unregistered CustomMediaTypes
+ + http: fixed IPv6 Host header parsing failure
+ + Fixed #108 (FormDataUnmarshaller should be more resilient)
+ + Fixed incorrect error message in HttpContentExtractor
+ + Fixed several memory leaks in streamMarshaller
+
+- spray-server
+
+ + Fixed actorSystem dependency in DebuggingDirectives incorrectly named
+ + Make ErrorHandling#responseForException public
+
+- spray-client
+
+ + Improve 'unmarshal' pipeline step to accept all 2xx responses instead of only 200
+
+- general
+
+ + Added basic, but still incomplete, sphinx-based documentation system for new spray website
+ + Upgraded to Akka 2.0.1
+ + Extended simple-http-server and simple-http-client examples with optional SSL/TLS support
+ + Fixed EOL related test failures on Windows
+ + Lots of smaller fixes and improvements
+
+
+Version 1.0-M1 (2012-04-05)
+---------------------------
+- Moved spray-can sources into spray codebase
+- Added spray-io component (and spray-util for common code)
+- Upgraded all components and examples to Akka 2.0
+
+
+Version 0.9.0 (2012-03-07)
+--------------------------
+- Fixed another problem in the request retry logic (spray-client)
+- Fixed incorrect response status code for authentication failures with invalid credentials
+- Fixed "LruCache implementations also caching exceptions"
+- Readded time-to-live based expiration to ExpiringLruCache
+- Closed #87 (wrap non-200 responses in special exception)
+- Closed #88 (added PathElement PathMatcher)
+
+
+Version 0.9.0-RC4 (2012-02-27)
+------------------------------
+- Fixed spray-client retries not always honoring Pipelined dispatch strategy
+- Added missing location pointer to entity of generated redirection responses
+- Added directives: reject, cookie, optionalCookie, setCookie, deleteCookie,
+ headerValue, headerValuePF, clientIP, provide and transformRejections
+- Made FilterResult and SprayRoute1 monadic
+- Added another overload to the 'authenticate' directive
+- Added 'toOption' pimp to Strings (in utils)
+
+
+Version 0.9.0-RC3 (2012-02-22)
+------------------------------
+- Fixed #78 (spray-client: unexpected closing of connection not properly handled)
+
+
+Version 0.9.0-RC2 (2012-02-17)
+------------------------------
+- Upgrade to Akka 1.3.1
+- Fixed getFromResource directive to not serve "content" of resources ending with slash
+- Made cacheResults directive honor 'Cache-Control: max-age' header
+- Added default Marshaller for Option[T] (#81)
+- Added TwirlSupport trait
+- Improved DebuggingDirectives trait, added logRequestResponse directive
+- Improved relaxed header parsing to also accept custom HttpCharsets
+
+
+Version 0.9.0-RC1 (2012-02-03)
+------------------------------
+- Upgrades:
+
+ + Scala 2.9.1
+ + Akka 1.3
+ + spray-json 1.1.0
+ + spray-can 0.9.2
+ + SBT 0.11.2
+
+- Changed dependency on akka-actor from scope 'compile' to scope 'provided'
+- Added support for chunked responses, including chunk compression and automatic file chunking
+- Added new directives: completeWith, redirect, autoChunk, dynamic, transformUnchunkedResponse, transformChunkedResponse
+- Added default Marshallers for Eithers, HttpResults, HttpExceptions, Streams, Futures and Array[Byte]
+- Added support for JSON (de)serialization via lift-json
+- Added support for template rendering via Scalate
+- Added support for LDAP authentication
+- Added support for asynchronous and cached authentication
+- Added option for relaxed header parsing (issue #68)
+- Added DebuggingDirectives trait
+- Simplified custom rendering of Rejections to HttpResponses
+- Improved LruCache implementation to use com.googlecode.concurrentlinkedhashmap
+- Fixed #72 (Different HttpConduits sometimes and erroneously share connections)
+- Fixed #59 (Factor out Rejection Conversion)
+- Fixed #67 ('cacheResults' directive should honor 'Cache-Control: no-cache' request header)
+- Fixed most occurrences of implicit ambiguities with SprayJsonSupport
+- Fixed several bugs in header parsing and rendering
+- Extended spray-example-spray-can to show off new streaming features
+- Lots of other fixes, additions and improvements
+
+
+Version 0.8.0 (2011-11-16)
+--------------------------
+- Upgrades:
+
+ + Scala 2.9.1
+ + Akka 1.2
+ + spray-json 1.0.1
+ + SBT 0.11.1 (many thx to Steffen for contributing the original buildfile)
+
+- Support for 'application/x-www-form-urlencoded' as well as 'multipart/form-data' form content (many thx to Julien for contributing a lot of the implementation)
+- Support for 'multipart/mixed' content (un)marshalling
+- Support for spray-can as the first non-servlet-container web server
+- Completely rewritten spray-client, now based on the new spray-can HttpClient
+- Completely rewritten servlet connector layer for improved performance and stability
+- Three new example projects:
+
+ + spray-client-example
+ + spray-example-simple
+ + spray-example-spray-can
+
+- Unified SimpleParsers and Unmarshallers into a joint 'Deserializer' hierarchy
+- Removed 'optionalContent' directive (use 'content(as[Option[T]])' instead)
+- Renamed 'spray-http' module to 'spray-base'
+- Renamed cc.spray.marshalling to cc.spray.typeconversion
+- Renamed SprayJsonMarshalling to SprayJsonSupport
+- Moved encoding/decoding to for cc.spray.encoding
+- Simplified case class extraction, now 'as(T)' rather than 'as(instanceOf(T))'
+- Simplified SprayTest infrastructure making the 'DontDetach' trait obsolete
+- Lots of other fixes, additions and improvements
+
+
+Version 0.7.0 (2011-07-27)
+--------------------------
+A great number of changes and improvements, most importantly:
+
+- removed dependency on Akka Mist
+- upgraded to Scala 2.9.0-1 and Akka 1.1.3
+- split into spray-server, spray-client and spray-http
+- added support for
+
+ + gzip/deflate encodings
+ + authentication/authorization (incl. HTTP Basic Auth)
+ + proper server-side caching
+ + even better path and parameter matching
+ + case class extractions
+ + spray-json (un)marshalling
+ + Tomcat 6
+
+- closed 27 tickets
+
+
+Version 0.5.0 (2011-03-31)
+--------------------------
+first public release
View
@@ -0,0 +1,15 @@
+This software is licensed under the Apache 2 license, quoted below.
+
+Copyright (C) 2011-2012 spray.io
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not
+use this file except in compliance with the License. You may obtain a copy of
+the License at
+
+ [http://www.apache.org/licenses/LICENSE-2.0]
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+License for the specific language governing permissions and limitations under
+the License.
View
@@ -0,0 +1 @@
+Please see <http://spray.io/> for all documentation
@@ -0,0 +1,92 @@
+import os
+import codecs
+from os import path
+
+from docutils import nodes
+from docutils.parsers.rst import Directive, directives
+
+class IncludeCode(Directive):
+ """
+ Include a code example from a file with sections delimited with special comments.
+ """
+
+ has_content = False
+ required_arguments = 1
+ optional_arguments = 0
+ final_argument_whitespace = False
+ option_spec = {
+ 'snippet': directives.unchanged_required
+ }
+
+ def run(self):
+ document = self.state.document
+ arg0 = self.arguments[0]
+ (filename, sep, section) = arg0.partition('#')
+
+ if not document.settings.file_insertion_enabled:
+ return [document.reporter.warning('File insertion disabled', line=self.lineno)]
+ env = document.settings.env
+ if filename.startswith('/') or filename.startswith(os.sep):
+ rel_fn = filename[1:]
+ else:
+ docdir = path.dirname(env.doc2path(env.docname, base=None))
+ rel_fn = path.join(docdir, filename)
+ try:
+ fn = path.join(env.srcdir, rel_fn)
+ except UnicodeDecodeError:
+ # the source directory is a bytestring with non-ASCII characters;
+ # let's try to encode the rel_fn in the file system encoding
+ rel_fn = rel_fn.encode(sys.getfilesystemencoding())
+ fn = path.join(env.srcdir, rel_fn)
+
+ encoding = self.options.get('encoding', env.config.source_encoding)
+ codec_info = codecs.lookup(encoding)
+ try:
+ f = codecs.StreamReaderWriter(open(fn, 'U'),
+ codec_info[2], codec_info[3], 'strict')
+ lines = f.readlines()
+ f.close()
+ except (IOError, OSError):
+ return [document.reporter.warning(
+ 'Include file %r not found or reading it failed' % fn,
+ line=self.lineno)]
+ except UnicodeError:
+ return [document.reporter.warning(
+ 'Encoding %r used for reading included file %r seems to '
+ 'be wrong, try giving an :encoding: option' %
+ (encoding, fn))]
+
+ snippet = self.options.get('snippet')
+ current_snippets = ""
+ res = []
+ for line in lines:
+ comment = line.rstrip().split("//", 1)[1] if line.find("//") >= 0 else ""
+ if comment.startswith("#") and len(comment) > 1:
+ current_snippets = comment
+ indent = line.find("//")
+ elif len(line) > 2 and line[2] == '"' and not current_snippets.startswith("#"):
+ current_snippets = line[2:]
+ indent = 4
+ elif comment == "#" and current_snippets.startswith("#"):
+ current_snippets = ""
+ elif len(line) > 2 and line[2] == '}' and not current_snippets.startswith("#"):
+ current_snippets = ""
+ elif current_snippets.find(snippet) >= 0 and comment.find("hide") == -1:
+ res.append(line[indent:].rstrip() + '\n')
+ elif comment.find(snippet) >= 0:
+ array = line.split("//", 1)
+ l = array[0].rstrip() if array[1].startswith("/") > 0 else array[0].strip()
+ res.append(l + '\n')
+
+ text = ''.join(res)
+
+ if text == "":
+ return [document.reporter.warning('Snippet "' + snippet + '" not found!', line=self.lineno)]
+
+ retnode = nodes.literal_block(text, text, source=fn)
+ document.settings.env.note_dependency(rel_fn)
+ return [retnode]
+
+def setup(app):
+ app.require_sphinx('1.0')
+ app.add_directive('includecode', IncludeCode)
Oops, something went wrong.

0 comments on commit efedac3

Please sign in to comment.