This commit is contained in:
thosakwe 2017-08-28 11:29:27 -04:00
parent 8ebe4bfbfa
commit f2ea859b92
9 changed files with 485 additions and 298 deletions

View file

@ -47,7 +47,7 @@
<entry key="body_parser">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/body_parser-1.0.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/body_parser-1.0.2/lib" />
</list>
</value>
</entry>
@ -68,14 +68,14 @@
<entry key="cli_util">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.2/lib" />
</list>
</value>
</entry>
<entry key="collection">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.3/lib" />
</list>
</value>
</entry>
@ -96,7 +96,7 @@
<entry key="crypto">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.2/lib" />
</list>
</value>
</entry>
@ -138,7 +138,7 @@
<entry key="http">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+13/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+14/lib" />
</list>
</value>
</entry>
@ -170,6 +170,13 @@
</list>
</value>
</entry>
<entry key="js">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1/lib" />
</list>
</value>
</entry>
<entry key="json_god">
<value>
<list>
@ -208,7 +215,7 @@
<entry key="meta">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.0.5/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.1/lib" />
</list>
</value>
</entry>
@ -222,14 +229,21 @@
<entry key="mock_request">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mock_request-1.0.0/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mock_request-1.0.2/lib" />
</list>
</value>
</entry>
<entry key="node_preamble">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.0/lib" />
</list>
</value>
</entry>
<entry key="package_config">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.2/lib" />
</list>
</value>
</entry>
@ -243,14 +257,14 @@
<entry key="path">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.4.1/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.4.2/lib" />
</list>
</value>
</entry>
<entry key="plugin">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+1/lib" />
</list>
</value>
</entry>
@ -268,6 +282,13 @@
</list>
</value>
</entry>
<entry key="quiver_hashcode">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/quiver_hashcode-1.0.0/lib" />
</list>
</value>
</entry>
<entry key="random_string">
<value>
<list>
@ -278,21 +299,21 @@
<entry key="shelf">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.6.7+2/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.6.8/lib" />
</list>
</value>
</entry>
<entry key="shelf_packages_handler">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.0/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.1/lib" />
</list>
</value>
</entry>
<entry key="shelf_static">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.4/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.5/lib" />
</list>
</value>
</entry>
@ -327,7 +348,7 @@
<entry key="stack_trace">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.7.3/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.8.0/lib" />
</list>
</value>
</entry>
@ -355,14 +376,21 @@
<entry key="test">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.21/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.24+2/lib" />
</list>
</value>
</entry>
<entry key="tuple">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/tuple-1.0.1/lib" />
</list>
</value>
</entry>
<entry key="typed_data">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.3/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.4/lib" />
</list>
</value>
</entry>
@ -383,7 +411,7 @@
<entry key="web_socket_channel">
<value>
<list>
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.4/lib" />
<option value="$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.5/lib" />
</list>
</value>
</entry>
@ -403,55 +431,59 @@
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/args-0.13.7/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/async-1.13.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/barback-0.15.2+11/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/body_parser-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/body_parser-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/boolean_selector-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/charcode-1.1.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cli_util-0.1.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/collection-1.14.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/container-0.1.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/convert-2.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/crypto-2.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/csslib-0.14.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/flatten-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/front_end-0.1.0-alpha.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/glob-1.1.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/html-0.13.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+13/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http-0.11.3+14/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_multi_server-2.0.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_parser-3.1.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/http_server-0.9.6/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/isolate-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/js-0.6.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/json_god-2.0.0-beta+1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/kernel-0.3.0-alpha.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/logging-0.11.3+1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/matcher-0.12.1+1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/merge_map-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.0.5/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/meta-1.1.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mime-0.9.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mock_request-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/mock_request-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/node_preamble-1.4.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_config-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/package_resolver-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.4.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/path-1.4.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/plugin-0.2.0+1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pool-1.3.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/pub_semver-1.3.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/quiver_hashcode-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/random_string-0.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.6.7+2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf-0.6.8/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_packages_handler-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_static-0.2.5/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_map_stack_trace-1.1.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_maps-0.10.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/source_span-1.4.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.7.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stack_trace-1.8.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/stream_channel-1.6.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/string_scanner-1.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/term_glyph-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.21/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/test-0.12.24+2/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/tuple-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/typed_data-1.1.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/utf-0.9.0+3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/watcher-0.9.7+3/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.4/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-1.0.5/lib" />
<root url="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/yaml-2.1.12/lib" />
</CLASSES>
<SOURCES />

View file

@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="1.0.8">
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="1.0.9+1">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/primitives_test.dart" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/repeat_request_test.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/encoders_buffer_test.dart" afterPath="$PROJECT_DIR$/test/encoders_buffer_test.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/streaming_test.dart" afterPath="$PROJECT_DIR$/test/streaming_test.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/tool/travis.sh" afterPath="$PROJECT_DIR$/tool/travis.sh" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGELOG.md" afterPath="$PROJECT_DIR$/CHANGELOG.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/controller.dart" afterPath="$PROJECT_DIR$/lib/src/http/controller.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/server.dart" afterPath="$PROJECT_DIR$/lib/src/http/server.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/all.dart" afterPath="$PROJECT_DIR$/test/all.dart" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
@ -33,8 +38,8 @@
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="189">
<caret line="9" column="14" lean-forward="false" selection-start-line="9" selection-start-column="14" selection-end-line="9" selection-end-column="14" />
<first_editor relative-caret-position="0">
<caret line="0" column="9" lean-forward="false" selection-start-line="0" selection-start-column="9" selection-end-line="0" selection-end-column="9" />
<folding />
</first_editor>
<second_editor />
@ -42,6 +47,18 @@
</provider>
</entry>
</file>
<file leaf-file-name="primitives_test.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/test/primitives_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#22#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="view_generator_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/view_generator_test.dart">
<provider selected="true" editor-type-id="text-editor">
@ -64,11 +81,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="all.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/all.dart">
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="4" column="28" lean-forward="false" selection-start-line="4" selection-start-column="28" selection-end-line="4" selection-end-column="28" />
<state relative-caret-position="21">
<caret line="1" column="15" lean-forward="false" selection-start-line="1" selection-start-column="15" selection-end-line="1" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="controller.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="181" column="10" lean-forward="false" selection-start-line="181" selection-start-column="10" selection-end-line="181" selection-end-column="10" />
<folding />
</state>
</provider>
@ -86,54 +113,22 @@
</provider>
</entry>
</file>
<file leaf-file-name="streaming_test.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/test/streaming_test.dart">
<file leaf-file-name="server.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="168">
<caret line="8" column="7" lean-forward="false" selection-start-line="8" selection-start-column="7" selection-end-line="8" selection-end-column="7" />
<state relative-caret-position="-10">
<caret line="398" column="0" lean-forward="true" selection-start-line="398" selection-start-column="0" selection-end-line="398" selection-end-column="0" />
<folding>
<element signature="e#0#20#0" expanded="true" />
<element signature="e#38#58#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="response_context.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<caret line="347" column="11" lean-forward="false" selection-start-line="347" selection-start-column="11" selection-end-line="347" selection-end-column="11" />
<folding>
<element signature="e#48#68#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="controller_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/controller_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="146">
<caret line="46" column="20" lean-forward="false" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="di_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/di_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="252">
<caret line="18" column="20" lean-forward="false" selection-start-line="18" selection-start-column="20" selection-end-line="18" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="routing_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="438">
<state relative-caret-position="441">
<caret line="25" column="18" lean-forward="false" selection-start-line="25" selection-start-column="18" selection-end-line="25" selection-end-column="18" />
<folding />
</state>
@ -151,8 +146,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>streamFil`</find>
<find>g</find>
<find>group('</find>
<find>group(</find>
<find>group\'</find>
@ -168,7 +161,6 @@
<find>group\('[^']+'</find>
<find>group\('[^']+',</find>
<find>group\('[^']+', (</find>
<find>group\('[^']+',</find>
<find>group\('[^']+', \</find>
<find>group\('[^']+', \()</find>
<find>group\('[^']+', \(</find>
@ -176,11 +168,14 @@
<find>group\('[^']+', \(\) as</find>
<find>group\('[^']+', \(\) a</find>
<find>group\('[^']+', \(\)</find>
<find>group\('[^']+', \(\)</find>
<find>group\('[^']+', \(\)\s</find>
<find>group\('[^']+', \(\)\s*</find>
<find>group\('[^']+', \(\)\s*a</find>
<find>group\('[^']+', \(\)\s*as</find>
<find>_hand</find>
<find>_handle</find>
<find>handleContaine</find>
<find>_handlerC</find>
</findStrings>
<replaceStrings>
<replace>_isClosed</replace>
@ -229,7 +224,6 @@
<option value="$PROJECT_DIR$/lib/common.dart" />
<option value="$PROJECT_DIR$/analysis_options.yaml" />
<option value="$PROJECT_DIR$/test/exception_test.dart" />
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
<option value="$PROJECT_DIR$/lib/src/http/service.dart" />
<option value="$PROJECT_DIR$/lib/src/safe_stream_controller.dart" />
<option value="$PROJECT_DIR$/test/services_test.dart" />
@ -245,17 +239,20 @@
<option value="$PROJECT_DIR$/performance/hello/angel.md" />
<option value="$PROJECT_DIR$/performance/hello/raw.md" />
<option value="$PROJECT_DIR$/lib/hooks.dart" />
<option value="$PROJECT_DIR$/lib/src/http/server.dart" />
<option value="$PROJECT_DIR$/test/all.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
<option value="$PROJECT_DIR$/test/controller_test.dart" />
<option value="$PROJECT_DIR$/test/di_test.dart" />
<option value="$PROJECT_DIR$/test/routing_test.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/tool/travis.sh" />
<option value="$PROJECT_DIR$/test/encoders_buffer_test.dart" />
<option value="$PROJECT_DIR$/test/streaming_test.dart" />
<option value="$PROJECT_DIR$/test/repeat_request_test.dart" />
<option value="$PROJECT_DIR$/lib/src/http/server.dart" />
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
<option value="$PROJECT_DIR$/test/all.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
<option value="$PROJECT_DIR$/test/primitives_test.dart" />
</list>
</option>
</component>
@ -347,10 +344,64 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="framework" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lib" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="src" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="http" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -379,7 +430,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Dart Test.All Tests (PRODUCTION)">
<component name="RunManager" selected="Dart Test.All Tests">
<configuration default="true" type="BashConfigurationType" factoryName="Bash">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="INTERPRETER_PATH" value="C:\Windows\system32\bash.exe" />
@ -466,6 +517,16 @@
<recursive>false</recursive>
<method />
</configuration>
<configuration default="false" name="tests in primitives_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/primitives_test.dart" />
<option name="testName" value="primitives_test.dart" />
<method />
</configuration>
<configuration default="false" name="tests in repeat_request_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/repeat_request_test.dart" />
<option name="testName" value="repeat_request_test.dart" />
<method />
</configuration>
<configuration default="false" name="tests in encoders_buffer_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/test/encoders_buffer_test.dart" />
<option name="testName" value="encoders_buffer_test.dart" />
@ -537,31 +598,33 @@
<option name="testName" value="precontained_test.dart" />
<method />
</configuration>
<list size="24">
<item index="0" class="java.lang.String" itemvalue="Dart Test.tests in encoders_buffer_test.dart" />
<item index="1" class="java.lang.String" itemvalue="Dart Test.tests in streaming_test.dart" />
<item index="2" class="java.lang.String" itemvalue="Dart Test.can create data in services_test.dart" />
<item index="3" class="java.lang.String" itemvalue="Dart Test.can delete data in services_test.dart" />
<item index="4" class="java.lang.String" itemvalue="Dart Test.can use app.properties like members in util_test.dart" />
<item index="5" class="java.lang.String" itemvalue="Dart Command Line App.performance::hello" />
<item index="6" class="java.lang.String" itemvalue="Dart Test.tests in accepts_test.dart" />
<item index="7" class="java.lang.String" itemvalue="Dart Test.contains provider in before and after in hooked_test.dart" />
<item index="8" class="java.lang.String" itemvalue="Dart Test.tests in server_test.dart" />
<item index="9" class="java.lang.String" itemvalue="Dart Test.tests in anonymous_service_test.dart" />
<item index="10" class="java.lang.String" itemvalue="Dart Test.tests in exception_test.dart" />
<item index="11" class="java.lang.String" itemvalue="Dart Test.tests in typed_service_test.dart" />
<item index="12" class="java.lang.String" itemvalue="Dart Test.default view generator in view_generator_test.dart" />
<item index="13" class="java.lang.String" itemvalue="Dart Test.tests in precontained_test.dart" />
<item index="14" class="java.lang.String" itemvalue="Dart Test.Controller Tests" />
<item index="15" class="java.lang.String" itemvalue="Dart Test.DI Tests" />
<item index="16" class="java.lang.String" itemvalue="Dart Test.Hooked Tests" />
<item index="17" class="java.lang.String" itemvalue="Dart Test.Routing Tests" />
<item index="18" class="java.lang.String" itemvalue="Dart Command Line App.All Tests (for coverage)" />
<item index="19" class="java.lang.String" itemvalue="Dart Command Line App.All Tests (PRODUCTION)" />
<item index="20" class="java.lang.String" itemvalue="Dart Test.tests in server_test.dart (PRODUCTION)" />
<item index="21" class="java.lang.String" itemvalue="Dart Test.All Tests" />
<item index="22" class="java.lang.String" itemvalue="Dart Test.All Tests (PRODUCTION)" />
<item index="23" class="java.lang.String" itemvalue="Dart Command Line App.performance::hello::raw" />
<list size="26">
<item index="0" class="java.lang.String" itemvalue="Dart Test.tests in primitives_test.dart" />
<item index="1" class="java.lang.String" itemvalue="Dart Test.tests in repeat_request_test.dart" />
<item index="2" class="java.lang.String" itemvalue="Dart Test.tests in encoders_buffer_test.dart" />
<item index="3" class="java.lang.String" itemvalue="Dart Test.tests in streaming_test.dart" />
<item index="4" class="java.lang.String" itemvalue="Dart Test.can create data in services_test.dart" />
<item index="5" class="java.lang.String" itemvalue="Dart Test.can delete data in services_test.dart" />
<item index="6" class="java.lang.String" itemvalue="Dart Test.can use app.properties like members in util_test.dart" />
<item index="7" class="java.lang.String" itemvalue="Dart Command Line App.performance::hello" />
<item index="8" class="java.lang.String" itemvalue="Dart Test.tests in accepts_test.dart" />
<item index="9" class="java.lang.String" itemvalue="Dart Test.contains provider in before and after in hooked_test.dart" />
<item index="10" class="java.lang.String" itemvalue="Dart Test.tests in server_test.dart" />
<item index="11" class="java.lang.String" itemvalue="Dart Test.tests in anonymous_service_test.dart" />
<item index="12" class="java.lang.String" itemvalue="Dart Test.tests in exception_test.dart" />
<item index="13" class="java.lang.String" itemvalue="Dart Test.tests in typed_service_test.dart" />
<item index="14" class="java.lang.String" itemvalue="Dart Test.default view generator in view_generator_test.dart" />
<item index="15" class="java.lang.String" itemvalue="Dart Test.tests in precontained_test.dart" />
<item index="16" class="java.lang.String" itemvalue="Dart Test.Controller Tests" />
<item index="17" class="java.lang.String" itemvalue="Dart Test.DI Tests" />
<item index="18" class="java.lang.String" itemvalue="Dart Test.Hooked Tests" />
<item index="19" class="java.lang.String" itemvalue="Dart Test.Routing Tests" />
<item index="20" class="java.lang.String" itemvalue="Dart Command Line App.All Tests (for coverage)" />
<item index="21" class="java.lang.String" itemvalue="Dart Command Line App.All Tests (PRODUCTION)" />
<item index="22" class="java.lang.String" itemvalue="Dart Test.tests in server_test.dart (PRODUCTION)" />
<item index="23" class="java.lang.String" itemvalue="Dart Test.All Tests" />
<item index="24" class="java.lang.String" itemvalue="Dart Test.All Tests (PRODUCTION)" />
<item index="25" class="java.lang.String" itemvalue="Dart Command Line App.performance::hello::raw" />
</list>
</component>
<component name="ShelveChangesManager" show_recycled="false">
@ -605,7 +668,8 @@
<workItem from="1499967777286" duration="36000" />
<workItem from="1500824399224" duration="86000" />
<workItem from="1501768538452" duration="11206000" />
<workItem from="1502831499213" duration="6986000" />
<workItem from="1502831499213" duration="7608000" />
<workItem from="1503931951079" duration="2209000" />
</task>
<task id="LOCAL-00001" summary="Re-designed exception">
<created>1481237183504</created>
@ -814,39 +878,39 @@
<servers />
</component>
<component name="TestHistory">
<history-entry file="All_Tests - 2017.08.15 at 18h 52m 20s.xml">
<history-entry file="All_Tests - 2017.08.28 at 11h 25m 10s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="All_Tests_(PRODUCTION) - 2017.08.15 at 18h 54m 11s.xml">
<configuration name="All Tests (PRODUCTION)" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 20m 14s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="All_Tests_(PRODUCTION) - 2017.08.15 at 18h 57m 36s.xml">
<configuration name="All Tests (PRODUCTION)" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 21m 03s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 50m 15s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 22m 04s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 50m 24s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 22m 16s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 50m 39s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 22m 23s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 50m 52s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 22m 46s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 51m 38s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 22m 55s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 51m 54s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 24m 16s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="tests_in_streaming_test_dart - 2017.08.15 at 18h 52m 00s.xml">
<configuration name="tests in streaming_test.dart" configurationId="DartTestRunConfigurationType" />
<history-entry file="tests_in_primitives_test_dart - 2017.08.28 at 11h 24m 26s.xml">
<configuration name="tests in primitives_test.dart" configurationId="DartTestRunConfigurationType" />
</history-entry>
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="44361000" />
<option name="totallyTimeSpent" value="47192000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -863,14 +927,13 @@
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3292683" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Tool Output" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32616082" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32616082" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Dart Analysis" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3272933" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34314835" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5696489" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18455844" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295583" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="ANTLR Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -883,6 +946,7 @@
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295583" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
</component>
@ -893,7 +957,6 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="Fixed todo" />
<MESSAGE value="Done???" />
<MESSAGE value="findExpose" />
<MESSAGE value="I love stack overflows!!!" />
@ -918,27 +981,14 @@
<MESSAGE value="Working on 1.0.8, including performance tuning" />
<MESSAGE value="Remove reopen" />
<MESSAGE value="1.0.8" />
<option name="LAST_COMMIT_MESSAGE" value="1.0.8" />
<MESSAGE value="1.0.9+1" />
<option name="LAST_COMMIT_MESSAGE" value="1.0.9+1" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$USER_HOME$/AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/json_god-2.0.0-beta+1/lib/src/serialize.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="245">
<caret line="40" column="27" lean-forward="false" selection-start-line="40" selection-start-column="27" selection-end-line="40" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.travis.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/hooked_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2730">
@ -964,7 +1014,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4011">
<caret line="197" column="4" lean-forward="false" selection-start-line="197" selection-start-column="4" selection-end-line="197" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
@ -993,7 +1042,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="683">
<caret line="139" column="71" lean-forward="true" selection-start-line="139" selection-start-column="71" selection-end-line="139" selection-end-column="71" />
<folding />
</state>
</provider>
</entry>
@ -1001,7 +1049,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="10" column="23" lean-forward="true" selection-start-line="10" selection-start-column="23" selection-end-line="10" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
@ -1009,9 +1056,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="97">
<caret line="77" column="20" lean-forward="true" selection-start-line="77" selection-start-column="20" selection-end-line="77" selection-end-column="20" />
<folding>
<element signature="e#0#22#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
@ -1078,7 +1122,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="95">
<caret line="295" column="0" lean-forward="true" selection-start-line="295" selection-start-column="0" selection-end-line="295" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -1118,7 +1161,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="277">
<caret line="26" column="0" lean-forward="true" selection-start-line="26" selection-start-column="0" selection-end-line="26" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -1151,7 +1193,6 @@
<state split_layout="SPLIT">
<first_editor relative-caret-position="84">
<caret line="4" column="9" lean-forward="false" selection-start-line="4" selection-start-column="9" selection-end-line="4" selection-end-column="9" />
<folding />
</first_editor>
<second_editor />
</state>
@ -1162,7 +1203,6 @@
<state split_layout="SPLIT">
<first_editor relative-caret-position="231">
<caret line="11" column="7" lean-forward="false" selection-start-line="11" selection-start-column="7" selection-end-line="11" selection-end-column="7" />
<folding />
</first_editor>
<second_editor />
</state>
@ -1180,19 +1220,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="147">
<caret line="7" column="8" lean-forward="true" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<folding>
<element signature="e#75#92#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="59">
<caret line="549" column="8" lean-forward="false" selection-start-line="549" selection-start-column="8" selection-end-line="565" selection-end-column="9" />
<folding>
<element signature="e#38#58#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -1200,15 +1227,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="227" column="26" lean-forward="false" selection-start-line="227" selection-start-column="26" selection-end-line="227" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
@ -1216,7 +1234,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="209">
<caret line="226" column="17" lean-forward="false" selection-start-line="226" selection-start-column="17" selection-end-line="226" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
@ -1224,15 +1241,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="183">
<caret line="94" column="23" lean-forward="false" selection-start-line="94" selection-start-column="23" selection-end-line="94" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="21">
<caret line="1" column="14" lean-forward="false" selection-start-line="1" selection-start-column="14" selection-end-line="1" selection-end-column="14" />
<folding />
</state>
</provider>
</entry>
@ -1240,25 +1248,22 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="399">
<caret line="19" column="6" lean-forward="false" selection-start-line="19" selection-start-column="6" selection-end-line="19" selection-end-column="6" />
<folding>
<element signature="e#75#92#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="228">
<state relative-caret-position="7098">
<caret line="347" column="11" lean-forward="false" selection-start-line="347" selection-start-column="11" selection-end-line="347" selection-end-column="11" />
<folding>
<element signature="e#48#68#0" expanded="true" />
<element signature="e#48#68#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/controller_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="146">
<state relative-caret-position="819">
<caret line="46" column="20" lean-forward="false" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
<folding />
</state>
@ -1274,23 +1279,12 @@
</entry>
<entry file="file://$PROJECT_DIR$/test/routing_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="438">
<state relative-caret-position="441">
<caret line="25" column="18" lean-forward="false" selection-start-line="25" selection-start-column="18" selection-end-line="25" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="189">
<caret line="9" column="14" lean-forward="false" selection-start-line="9" selection-start-column="14" selection-end-line="9" selection-end-column="14" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/view_generator_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -1301,19 +1295,13 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tool/travis.sh">
<entry file="file://$PROJECT_DIR$/test/streaming_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="42">
<caret line="2" column="12" lean-forward="false" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/all.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="4" column="28" lean-forward="false" selection-start-line="4" selection-start-column="28" selection-end-line="4" selection-end-column="28" />
<folding />
<state relative-caret-position="630">
<caret line="30" column="0" lean-forward="true" selection-start-line="30" selection-start-column="0" selection-end-line="30" selection-end-column="0" />
<folding>
<element signature="e#0#20#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
@ -1327,15 +1315,80 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/streaming_test.dart">
<entry file="file://$PROJECT_DIR$/test/repeat_request_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="168">
<caret line="8" column="7" lean-forward="false" selection-start-line="8" selection-start-column="7" selection-end-line="8" selection-end-column="7" />
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="4" selection-end-column="32" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-10">
<caret line="398" column="0" lean-forward="true" selection-start-line="398" selection-start-column="0" selection-end-line="398" selection-end-column="0" />
<folding>
<element signature="e#38#58#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/controller.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="181" column="10" lean-forward="false" selection-start-line="181" selection-start-column="10" selection-end-line="181" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/all.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="319">
<caret line="32" column="39" lean-forward="false" selection-start-line="32" selection-start-column="39" selection-end-line="32" selection-end-column="39" />
<folding>
<element signature="e#0#38#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tool/travis.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="42">
<caret line="2" column="12" lean-forward="false" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="21">
<caret line="1" column="15" lean-forward="false" selection-start-line="1" selection-start-column="15" selection-end-line="1" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="0">
<caret line="0" column="9" lean-forward="false" selection-start-line="0" selection-start-column="9" selection-end-line="0" selection-end-column="9" />
<folding />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/primitives_test.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding>
<element signature="e#0#22#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

View file

@ -1,3 +1,9 @@
# 1.0.9+1
* Closed [#162](https://github.com/angel-dart/framework/issues/162), fixing a caching bug
that would cause multiple requests to the same URL to fail.
* Resolved dependency injection of primitives (namely `String`), no longer triggering
errors about `String has no constructor`, etc.
# 1.0.9
* Closed [#161](https://github.com/angel-dart/framework/issues/161). `addCreated`/`addUpdatedAt` no longer
crash when `serialize` is `false`.

View file

@ -10,6 +10,8 @@ import 'response_context.dart';
import 'routable.dart';
import 'server.dart' show Angel, preInject;
const List<Type> _primitiveTypes = const [String, int, num, double, Null];
/// Contains a list of the data required for a DI-enabled method to run.
///
/// This improves performance by removing the necessity to reflect a method
@ -186,11 +188,11 @@ RequestHandler handleContained(handler, InjectionRequest injection) {
requirement.last is Type) {
String key = requirement.first;
Type type = requirement.last;
if (req.params.containsKey(key) ||
req.injections.containsKey(key) ||
req.properties.containsKey(key) ||
req.app.properties.containsKey(key)) {
req.app.properties.containsKey(key) ||
_primitiveTypes.contains(type)) {
inject(key);
} else
inject(type);

View file

@ -10,6 +10,7 @@ export 'package:container/container.dart';
import 'package:flatten/flatten.dart';
import 'package:json_god/json_god.dart' as god;
import 'package:meta/meta.dart';
import 'package:tuple/tuple.dart';
import '../safe_stream_controller.dart';
import 'angel_base.dart';
import 'angel_http_exception.dart';
@ -28,8 +29,8 @@ final RegExp _straySlashes = new RegExp(r'(^/+)|(/+$)');
typedef Future<HttpServer> ServerGenerator(InternetAddress address, int port);
/// Handles an [AngelHttpException].
typedef Future AngelErrorHandler(AngelHttpException err, RequestContext req,
ResponseContext res);
typedef Future AngelErrorHandler(
AngelHttpException err, RequestContext req, ResponseContext res);
/// A function that configures an [Angel] server in some way.
typedef Future AngelConfigurer(Angel app);
@ -37,16 +38,16 @@ typedef Future AngelConfigurer(Angel app);
/// A powerful real-time/REST/MVC server class.
class Angel extends AngelBase {
final SafeCtrl<HttpRequest> _afterProcessed =
new SafeCtrl<HttpRequest>.broadcast();
new SafeCtrl<HttpRequest>.broadcast();
final SafeCtrl<HttpRequest> _beforeProcessed =
new SafeCtrl<HttpRequest>.broadcast();
new SafeCtrl<HttpRequest>.broadcast();
final SafeCtrl<AngelFatalError> _fatalErrorStream =
new SafeCtrl<AngelFatalError>.broadcast();
new SafeCtrl<AngelFatalError>.broadcast();
final SafeCtrl<Controller> _onController =
new SafeCtrl<Controller>.broadcast();
new SafeCtrl<Controller>.broadcast();
final List<Angel> _children = [];
final Map<String, List> _handlerCache = {};
final Map<String, Tuple3<MiddlewarePipeline, Map, Match>> _handlerCache = {};
Router _flattened;
bool _isProduction;
@ -213,17 +214,17 @@ class Angel extends AngelBase {
await service.close();
});
for (var plugin in justBeforeStop)
await plugin(this);
for (var plugin in justBeforeStop) await plugin(this);
return server;
}
@override
void dumpTree({callback(String tree),
String header: 'Dumping route tree:',
String tab: ' ',
bool showMatchers: false}) {
void dumpTree(
{callback(String tree),
String header: 'Dumping route tree:',
String tab: ' ',
bool showMatchers: false}) {
if (isProduction) {
if (_flattened == null) _flattened = flatten(this);
@ -232,8 +233,8 @@ class Angel extends AngelBase {
header: header?.isNotEmpty == true
? header
: (isProduction
? 'Dumping flattened route tree:'
: 'Dumping route tree:'),
? 'Dumping flattened route tree:'
: 'Dumping route tree:'),
tab: tab ?? ' ',
showMatchers: showMatchers == true);
} else {
@ -242,8 +243,8 @@ class Angel extends AngelBase {
header: header?.isNotEmpty == true
? header
: (isProduction
? 'Dumping flattened route tree:'
: 'Dumping route tree:'),
? 'Dumping flattened route tree:'
: 'Dumping route tree:'),
tab: tab ?? ' ',
showMatchers: showMatchers == true);
}
@ -264,8 +265,8 @@ class Angel extends AngelBase {
_serializer = serializer;
}
Future getHandlerResult(handler, RequestContext req,
ResponseContext res) async {
Future getHandlerResult(
handler, RequestContext req, ResponseContext res) async {
/*if (handler is RequestMiddleware) {
var result = await handler(req, res);
@ -303,8 +304,8 @@ class Angel extends AngelBase {
}
/// Runs some [handler]. Returns `true` if request execution should continue.
Future<bool> executeHandler(handler, RequestContext req,
ResponseContext res) async {
Future<bool> executeHandler(
handler, RequestContext req, ResponseContext res) async {
var result = await getHandlerResult(handler, req, res);
if (result is bool) {
@ -326,7 +327,7 @@ class Angel extends AngelBase {
}
Future<ResponseContext> createResponseContext(HttpResponse response,
[RequestContext correspondingRequest]) =>
[RequestContext correspondingRequest]) =>
new Future<ResponseContext>.value(
new ResponseContext(response, this, correspondingRequest)
..serializer = (_serializer ?? god.serialize)
@ -403,27 +404,25 @@ class Angel extends AngelBase {
if (requestedUrl.isEmpty) requestedUrl = '/';
var pipeline = _handlerCache.putIfAbsent(requestedUrl, () {
Router r =
isProduction ? (_flattened ?? (_flattened = flatten(this))) : this;
var tuple = _handlerCache.putIfAbsent(requestedUrl, () {
Router r = isProduction ? (_flattened ??= flatten(this)) : this;
var resolved =
r.resolveAll(requestedUrl, requestedUrl, method: req.method);
for (var result in resolved)
req.params.addAll(result.allParams);
if (resolved.isNotEmpty) {
var route = resolved.first.route;
req.inject(Match, route.match(requestedUrl));
}
var m = new MiddlewarePipeline(resolved);
req.inject(MiddlewarePipeline, m);
return new List.from(before)
..addAll(m.handlers)..addAll(after);
r.resolveAll(requestedUrl, requestedUrl, method: req.method);
return new Tuple3(
new MiddlewarePipeline(resolved),
resolved.fold<Map>({}, (out, r) => out..addAll(r.allParams)),
resolved.isEmpty ? null : resolved.first.route.match(requestedUrl),
);
});
req.inject(MiddlewarePipeline, tuple.item1);
req.params.addAll(tuple.item2);
req.inject(Match, tuple.item3);
var pipeline = new List.from(before)
..addAll(tuple.item1.handlers)
..addAll(after);
for (var handler in pipeline) {
try {
if (!await executeHandler(handler, req, res)) break;
@ -464,9 +463,7 @@ class Angel extends AngelBase {
void _walk(Router router) {
if (router is Angel) {
router
..before.forEach(_add)
..after.forEach(_add);
router..before.forEach(_add)..after.forEach(_add);
}
router.requestMiddleware.forEach((k, v) => _add(v));
@ -488,8 +485,8 @@ class Angel extends AngelBase {
/// Run a function after injecting from service container.
/// If this function has been reflected before, then
/// the execution will be faster, as the injection requirements were stored beforehand.
Future runContained(Function handler, RequestContext req,
ResponseContext res) {
Future runContained(
Function handler, RequestContext req, ResponseContext res) {
if (_preContained.containsKey(handler)) {
return handleContained(handler, _preContained[handler])(req, res);
}
@ -498,23 +495,23 @@ class Angel extends AngelBase {
}
/// Runs with DI, and *always* reflects. Prefer [runContained].
Future runReflected(Function handler, RequestContext req,
ResponseContext res) async {
Future runReflected(
Function handler, RequestContext req, ResponseContext res) async {
var h =
handleContained(handler, _preContained[handler] = preInject(handler));
handleContained(handler, _preContained[handler] = preInject(handler));
return await h(req, res);
// return await closureMirror.apply(args).reflectee;
}
/// Use [sendResponse] instead.
@deprecated
Future sendRequest(HttpRequest request, RequestContext req,
ResponseContext res) =>
Future sendRequest(
HttpRequest request, RequestContext req, ResponseContext res) =>
sendResponse(request, req, res);
/// Sends a response.
Future sendResponse(HttpRequest request, RequestContext req,
ResponseContext res,
Future sendResponse(
HttpRequest request, RequestContext req, ResponseContext res,
{bool ignoreFinalizers: false}) {
_afterProcessed.add(request);
@ -524,7 +521,7 @@ class Angel extends AngelBase {
Future finalizers = ignoreFinalizers == true
? new Future.value()
: responseFinalizers.fold<Future>(
new Future.value(), (out, f) => out.then((_) => f(req, res)));
new Future.value(), (out, f) => out.then((_) => f(req, res)));
if (res.isOpen) res.end();
@ -540,7 +537,7 @@ class Angel extends AngelBase {
if (res.encoders.isNotEmpty) {
var allowedEncodings =
(req.headers[HttpHeaders.ACCEPT_ENCODING] ?? []).map((str) {
(req.headers[HttpHeaders.ACCEPT_ENCODING] ?? []).map((str) {
// Ignore quality specifications in accept-encoding
// ex. gzip;q=0.8
if (!str.contains(';')) return str;
@ -558,8 +555,7 @@ class Angel extends AngelBase {
}
if (encoder != null) {
request.response.headers
.set(HttpHeaders.CONTENT_ENCODING, key);
request.response.headers.set(HttpHeaders.CONTENT_ENCODING, key);
outputBuffer = res.encoders[key].convert(outputBuffer);
break;
}
@ -580,9 +576,7 @@ class Angel extends AngelBase {
await configurer(this);
if (configurer is Controller)
_onController.add(controllers[configurer
.findExpose()
.path] = configurer);
_onController.add(controllers[configurer.findExpose().path] = configurer);
}
/// Starts the server, wrapped in a [runZoned] call.
@ -686,9 +680,8 @@ class Angel extends AngelBase {
/// An instance mounted on a server started by the [serverGenerator].
factory Angel.custom(ServerGenerator serverGenerator,
{@deprecated bool debug: false}) =>
new Angel()
.._serverGenerator = serverGenerator;
{@deprecated bool debug: false}) =>
new Angel().._serverGenerator = serverGenerator;
factory Angel.fromSecurityContext(SecurityContext context,
{@deprecated bool debug: false}) {
@ -709,7 +702,7 @@ class Angel extends AngelBase {
factory Angel.secure(String certificateChainPath, String serverKeyPath,
{bool debug: false, String password}) {
var certificateChain =
Platform.script.resolve(certificateChainPath).toFilePath();
Platform.script.resolve(certificateChainPath).toFilePath();
var serverKey = Platform.script.resolve(serverKeyPath).toFilePath();
var serverContext = new SecurityContext();
serverContext.useCertificateChain(certificateChain, password: password);

View file

@ -1,5 +1,5 @@
name: angel_framework
version: 1.0.9
version: 1.0.10
description: A high-powered HTTP server with DI, routing and more.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework
@ -17,6 +17,7 @@ dependencies:
meta: ^1.0.0
mime: ^0.9.3
random_string: ^0.0.1
tuple: ^1.0.0
dev_dependencies:
matcher: ^0.12.0
mock_request: ^1.0.0

View file

@ -7,6 +7,8 @@ import 'exception_test.dart' as exception;
import 'general_test.dart' as general;
import 'hooked_test.dart' as hooked;
import 'precontained_test.dart' as precontained;
import 'primitives_test.dart' as primitives;
import 'repeat_request_test.dart' as repeat_request;
import 'routing_test.dart' as routing;
import 'serialize_test.dart' as serialize;
import 'server_test.dart' as server;
@ -28,6 +30,8 @@ main() {
group('general', general.main);
group('hooked', hooked.main);
group('precontained', precontained.main);
group('primitives', primitives.main);
group('repeat request', repeat_request.main);
group('routing', routing.main);
group('serialize', serialize.main);
group('server', server.main);

67
test/primitives_test.dart Normal file
View file

@ -0,0 +1,67 @@
import 'dart:convert';
import 'dart:io';
import 'package:angel_framework/angel_framework.dart';
import 'package:mock_request/mock_request.dart';
import 'package:test/test.dart';
main() {
Angel app;
setUp(() {
app = new Angel()..inject('global', 305); // Pitbull!
app.get('/string/:string', (String string) => string);
app.get(
'/num/parsed/:num',
waterfall([
(RequestContext req) {
req.params['n'] = num.parse(req.params['num']);
return true;
},
(num n) => n,
]));
app.get('/num/global', (num global) => global);
app.fatalErrorStream.listen((e) {
stderr..writeln(e.error)..writeln(e.stack);
});
});
tearDown(() => app.close());
test('String type annotation', () async {
var rq = new MockHttpRequest('GET', Uri.parse('/string/hello'))..close();
await app.handleRequest(rq);
var rs = await rq.response.transform(UTF8.decoder).join();
expect(rs, JSON.encode('hello'));
});
test('Primitive after parsed param injection', () async {
var rq = new MockHttpRequest('GET', Uri.parse('/num/parsed/24'))..close();
await app.handleRequest(rq);
var rs = await rq.response.transform(UTF8.decoder).join();
expect(rs, JSON.encode(24));
});
test('globally-injected primitive', () async {
var rq = new MockHttpRequest('GET', Uri.parse('/num/global'))..close();
await app.handleRequest(rq);
var rs = await rq.response.transform(UTF8.decoder).join();
expect(rs, JSON.encode(305));
});
test('unparsed primitive throws error', () async {
try {
var rq = new MockHttpRequest('GET', Uri.parse('/num/unparsed/32'))
..close();
var req = await app.createRequestContext(rq);
var res = await app.createResponseContext(rq.response, req);
await app.runContained((num unparsed) => unparsed, req, res);
throw new StateError('ArgumentError should be thrown if a parameter cannot be resolved.');
} on ArgumentError {
// Success
}
});
}

View file

@ -0,0 +1,29 @@
import 'dart:async';
import 'dart:convert';
import 'package:angel_framework/angel_framework.dart';
import 'package:mock_request/mock_request.dart';
import 'package:test/test.dart';
main() {
MockHttpRequest mk(int id) {
return new MockHttpRequest('GET', Uri.parse('/test/$id'))..close();
}
test('can request the same url twice', () async {
var app = new Angel()..get('/test/:id', (id) => 'Hello $id');
var rq1 = mk(1), rq2 = mk(2), rq3 = mk(1);
await Future.wait([rq1, rq2, rq3].map(app.handleRequest));
var body1 = await rq1.response.transform(UTF8.decoder).join(),
body2 = await rq2.response.transform(UTF8.decoder).join(),
body3 = await rq3.response.transform(UTF8.decoder).join();
print('Response #1: $body1');
print('Response #2: $body2');
print('Response #3: $body3');
expect(
body1,
allOf(
isNot(body2),
equals(body3),
));
});
}