This commit is contained in:
thosakwe 2017-04-24 22:32:16 -04:00
parent eb9a46f282
commit 0c57b06cfa
6 changed files with 140 additions and 149 deletions

View file

@ -2,13 +2,9 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment=""> <list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_SDK.xml" />
<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/runConfigurations/All_Tests.xml" afterPath="$PROJECT_DIR$/.idea/runConfigurations/All_Tests.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/hooks.dart" afterPath="$PROJECT_DIR$/lib/hooks.dart" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/hooks.dart" afterPath="$PROJECT_DIR$/lib/hooks.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/map_service.dart" afterPath="$PROJECT_DIR$/lib/src/http/map_service.dart" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/response_context.dart" afterPath="$PROJECT_DIR$/lib/src/http/response_context.dart" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/src/http/response_context.dart" afterPath="$PROJECT_DIR$/lib/src/http/response_context.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$/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$/pubspec.yaml" afterPath="$PROJECT_DIR$/pubspec.yaml" />
@ -35,8 +31,8 @@
<file leaf-file-name="response_context.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="response_context.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart"> <entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="388"> <state relative-caret-position="84">
<caret line="185" column="32" lean-forward="false" selection-start-line="185" selection-start-column="32" selection-end-line="185" selection-end-column="32" /> <caret line="180" column="68" lean-forward="true" selection-start-line="180" selection-start-column="68" selection-end-line="180" selection-end-column="68" />
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -45,60 +41,35 @@
<file leaf-file-name="map_service.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="map_service.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart"> <entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179"> <state relative-caret-position="312">
<caret line="55" column="21" lean-forward="false" selection-start-line="55" selection-start-column="21" selection-end-line="55" selection-end-column="21" /> <caret line="29" column="24" lean-forward="false" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
<folding> <folding>
<element signature="e#0#20#0" expanded="true" /> <element signature="e#0#20#0" expanded="true" />
<marker date="1492277003000" expanded="true" signature="174:3294" ph="{...}" />
<marker date="1492277003000" expanded="true" signature="1401:1771" ph="{...}" />
<marker date="1492277003000" expanded="true" signature="2900:3292" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="angel_http_exception.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="angel_http_exception.dart" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart"> <entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1350"> <state relative-caret-position="696">
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" /> <caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<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>
</file>
<file leaf-file-name="hooks.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="hooks.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/hooks.dart"> <entry file="file://$PROJECT_DIR$/lib/hooks.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200"> <state relative-caret-position="101">
<caret line="85" column="10" lean-forward="false" selection-start-line="85" selection-start-column="10" selection-end-line="85" selection-end-column="10" /> <caret line="238" column="69" lean-forward="true" selection-start-line="238" selection-start-column="69" selection-end-line="238" selection-end-column="69" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<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="349">
<caret line="312" column="3" lean-forward="false" selection-start-line="312" selection-start-column="3" selection-end-line="312" selection-end-column="3" />
<folding>
<element signature="e#38#58#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="controller_test.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="controller_test.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test/controller_test.dart"> <entry file="file://$PROJECT_DIR$/test/controller_test.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -143,7 +114,17 @@
<find>throw</find> <find>throw</find>
<find>upa</find> <find>upa</find>
<find>transform</find> <find>transform</find>
<find>isAfter</find>
<find>isBefore</find>
<find>close</find>
<find>!_isOpen</find>
<find>end</find>
<find>reopen</find>
<find>REDIRECT</find>
</findStrings> </findStrings>
<replaceStrings>
<replace>_isClosed</replace>
</replaceStrings>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@ -160,10 +141,10 @@
<option value="$PROJECT_DIR$/lib/src/http/angel_http_exception.dart" /> <option value="$PROJECT_DIR$/lib/src/http/angel_http_exception.dart" />
<option value="$PROJECT_DIR$/lib/src/http/memory_service.dart" /> <option value="$PROJECT_DIR$/lib/src/http/memory_service.dart" />
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" /> <option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
<option value="$PROJECT_DIR$/lib/src/http/map_service.dart" /> <option value="$PROJECT_DIR$/lib/src/http/map_service.dart" />
<option value="$PROJECT_DIR$/lib/hooks.dart" />
<option value="$PROJECT_DIR$/lib/src/http/server.dart" /> <option value="$PROJECT_DIR$/lib/src/http/server.dart" />
<option value="$PROJECT_DIR$/lib/src/http/response_context.dart" />
<option value="$PROJECT_DIR$/lib/hooks.dart" />
<option value="$PROJECT_DIR$/pubspec.yaml" /> <option value="$PROJECT_DIR$/pubspec.yaml" />
<option value="$PROJECT_DIR$/README.md" /> <option value="$PROJECT_DIR$/README.md" />
</list> </list>
@ -176,10 +157,10 @@
<sorting>DEFINITION_ORDER</sorting> <sorting>DEFINITION_ORDER</sorting>
</component> </component>
<component name="ProjectFrameBounds"> <component name="ProjectFrameBounds">
<option name="x" value="201" /> <option name="x" value="155" />
<option name="y" value="65" /> <option name="y" value="131" />
<option name="width" value="1486" /> <option name="width" value="1416" />
<option name="height" value="909" /> <option name="height" value="843" />
</component> </component>
<component name="ProjectLevelVcsManager"> <component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" /> <ConfirmationsSetting value="2" id="Add" />
@ -316,6 +297,9 @@
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test"> <configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
<method /> <method />
</configuration> </configuration>
<configuration default="true" type="FlutterRunConfigurationType" factoryName="Flutter">
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest"> <configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
<node-interpreter value="project" /> <node-interpreter value="project" />
<working-dir value="" /> <working-dir value="" />
@ -338,6 +322,12 @@
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug"> <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
<method /> <method />
</configuration> </configuration>
<configuration default="true" type="LLVMCommandLineRunConfigurationType" factoryName="LLVM Application" show_console_on_std_err="false" show_console_on_std_out="false">
<option name="VMOptions" />
<option name="arguments" />
<option name="filePath" />
<method />
</configuration>
<configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir=""> <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
<method /> <method />
</configuration> </configuration>
@ -401,7 +391,8 @@
<workItem from="1481390924053" duration="19000" /> <workItem from="1481390924053" duration="19000" />
<workItem from="1483149948840" duration="930000" /> <workItem from="1483149948840" duration="930000" />
<workItem from="1484451782119" duration="617000" /> <workItem from="1484451782119" duration="617000" />
<workItem from="1492276672342" duration="1434000" /> <workItem from="1492276672342" duration="1478000" />
<workItem from="1493086837879" duration="686000" />
</task> </task>
<task id="LOCAL-00001" summary="Re-designed exception"> <task id="LOCAL-00001" summary="Re-designed exception">
<created>1481237183504</created> <created>1481237183504</created>
@ -445,13 +436,17 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1483150975010</updated> <updated>1483150975010</updated>
</task> </task>
<option name="localTasksCounter" value="7" /> <task id="LOCAL-00007" summary="Fixed last batch?">
<created>1492278141283</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1492278141283</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers /> <servers />
</component> </component>
<component name="TestHistory"> <component name="TestHistory">
<history-entry file="All_Tests - 2017.04.15 at 13h 18m 39s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="All_Tests - 2017.04.15 at 13h 40m 48s.xml"> <history-entry file="All_Tests - 2017.04.15 at 13h 40m 48s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" /> <configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry> </history-entry>
@ -461,6 +456,9 @@
<history-entry file="All_Tests - 2017.04.15 at 13h 41m 54s.xml"> <history-entry file="All_Tests - 2017.04.15 at 13h 41m 54s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" /> <configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry> </history-entry>
<history-entry file="All_Tests - 2017.04.24 at 22h 30m 02s.xml">
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
</history-entry>
<history-entry file="Hooked_Tests - 2016.12.10 at 09h 01m 45s.xml"> <history-entry file="Hooked_Tests - 2016.12.10 at 09h 01m 45s.xml">
<configuration name="Hooked Tests" configurationId="DartTestRunConfigurationType" /> <configuration name="Hooked Tests" configurationId="DartTestRunConfigurationType" />
</history-entry> </history-entry>
@ -481,7 +479,7 @@
</history-entry> </history-entry>
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5665000" /> <option name="totallyTimeSpent" value="6395000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
@ -493,23 +491,23 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="201" y="65" width="1486" height="909" extended-state="0" /> <frame x="155" y="131" width="1416" height="843" extended-state="0" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21218638" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<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="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="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.32680538" 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="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.32802936" sideWeight="0.5" order="7" side_tool="false" 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.32802936" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32925338" 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.32680538" 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.2122867" sideWeight="0.5" order="0" 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="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="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="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32756326" sideWeight="0.5" order="2" 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="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" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3262317" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" 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" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" 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.32680538" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" 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="0" side_tool="false" content_ui="tabs" /> <window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<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="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" />
@ -531,7 +529,8 @@
<MESSAGE value="Done???" /> <MESSAGE value="Done???" />
<MESSAGE value="findExpose" /> <MESSAGE value="findExpose" />
<MESSAGE value="I love stack overflows!!!" /> <MESSAGE value="I love stack overflows!!!" />
<option name="LAST_COMMIT_MESSAGE" value="I love stack overflows!!!" /> <MESSAGE value="Fixed last batch?" />
<option name="LAST_COMMIT_MESSAGE" value="Fixed last batch?" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager /> <breakpoint-manager />
@ -542,9 +541,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <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" /> <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#17#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -626,7 +622,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275"> <state relative-caret-position="1275">
<caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" /> <caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -634,7 +629,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" /> <caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -701,7 +695,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275"> <state relative-caret-position="1275">
<caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" /> <caret line="90" column="29" lean-forward="true" selection-start-line="90" selection-start-column="29" selection-end-line="90" selection-end-column="29" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -709,7 +702,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" /> <caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -823,9 +815,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <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" /> <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#17#0" expanded="false" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -833,7 +822,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1020"> <state relative-caret-position="1020">
<caret line="74" column="0" lean-forward="false" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" /> <caret line="74" column="0" lean-forward="false" selection-start-line="74" selection-start-column="0" selection-end-line="74" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -841,7 +829,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275"> <state relative-caret-position="1275">
<caret line="90" column="25" lean-forward="false" selection-start-line="90" selection-start-column="25" selection-end-line="90" selection-end-column="25" /> <caret line="90" column="25" lean-forward="false" selection-start-line="90" selection-start-column="25" selection-end-line="90" selection-end-column="25" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -849,7 +836,6 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="13" column="1" lean-forward="false" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" /> <caret line="13" column="1" lean-forward="false" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -871,6 +857,14 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/service.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="16" column="6" lean-forward="false" selection-start-line="16" selection-start-column="6" selection-end-line="16" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/di_test.dart"> <entry file="file://$PROJECT_DIR$/test/di_test.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
@ -881,71 +875,39 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1350">
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
<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="388">
<caret line="185" column="32" lean-forward="false" selection-start-line="185" selection-start-column="32" selection-end-line="185" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart"> <entry file="file://$PROJECT_DIR$/lib/src/http/map_service.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="179"> <state relative-caret-position="312">
<caret line="55" column="21" lean-forward="false" selection-start-line="55" selection-start-column="21" selection-end-line="55" selection-end-column="21" /> <caret line="29" column="24" lean-forward="false" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
<folding> <folding>
<element signature="e#0#20#0" expanded="true" /> <element signature="e#0#20#0" expanded="true" />
<marker date="1492277003000" expanded="true" signature="174:3294" ph="{...}" />
<marker date="1492277003000" expanded="true" signature="1401:1771" ph="{...}" />
<marker date="1492277003000" expanded="true" signature="2900:3292" ph="{...}" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/service.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="16" column="6" lean-forward="false" selection-start-line="16" selection-start-column="6" selection-end-line="16" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/hooks.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="200">
<caret line="85" column="10" lean-forward="false" selection-start-line="85" selection-start-column="10" selection-end-line="85" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/server.dart"> <entry file="file://$PROJECT_DIR$/lib/src/http/server.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="349"> <state relative-caret-position="220">
<caret line="312" column="3" lean-forward="false" selection-start-line="312" selection-start-column="3" selection-end-line="312" selection-end-column="3" /> <caret line="477" column="31" lean-forward="false" selection-start-line="477" selection-start-column="31" selection-end-line="477" selection-end-column="31" />
<folding> <folding>
<element signature="e#38#58#0" expanded="true" /> <element signature="e#38#58#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/README.md"> <entry file="file://$PROJECT_DIR$/lib/hooks.dart">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]"> <provider selected="true" editor-type-id="text-editor">
<state split_layout="SPLIT"> <state relative-caret-position="101">
<first_editor relative-caret-position="45"> <caret line="238" column="69" lean-forward="true" selection-start-line="238" selection-start-column="69" selection-end-line="238" selection-end-column="69" />
<caret line="3" column="62" lean-forward="false" selection-start-line="3" selection-start-column="62" selection-end-line="3" selection-end-column="62" /> <folding />
<folding> </state>
<marker date="1492278100000" expanded="true" signature="428:616" ph="{...}" /> </provider>
</folding> </entry>
</first_editor> <entry file="file://$PROJECT_DIR$/lib/src/http/response_context.dart">
<second_editor /> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="84">
<caret line="180" column="68" lean-forward="true" selection-start-line="180" selection-start-column="68" selection-end-line="180" selection-end-column="68" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -957,5 +919,26 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
<state split_layout="SPLIT">
<first_editor relative-caret-position="30">
<caret line="2" column="52" lean-forward="false" selection-start-line="2" selection-start-column="52" selection-end-line="2" selection-end-column="52" />
<folding>
<marker date="1493087521000" expanded="true" signature="428:616" ph="{...}" />
</folding>
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/src/http/angel_http_exception.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="696">
<caret line="90" column="46" lean-forward="false" selection-start-line="90" selection-start-column="46" selection-end-line="90" selection-end-column="46" />
<folding />
</state>
</provider>
</entry>
</component> </component>
</project> </project>

View file

@ -1,6 +1,6 @@
# angel_framework # angel_framework
[![pub 1.0.1](https://img.shields.io/badge/pub-1.0.1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_framework) [![pub 1.0.2](https://img.shields.io/badge/pub-1.0.2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_framework)
[![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework) [![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework)
A high-powered HTTP server with support for dependency injection, sophisticated routing and more. A high-powered HTTP server with support for dependency injection, sophisticated routing and more.

View file

@ -241,7 +241,7 @@ HookedServiceEventListener addCreatedAt({
} }
} }
var now = new DateTime.now().toIso8601String(); var now = new DateTime.now().toUtc().toIso8601String();
normalize(obj) async { normalize(obj) async {
if (obj != null) { if (obj != null) {
@ -292,7 +292,7 @@ HookedServiceEventListener addUpdatedAt({
} }
} }
var now = new DateTime.now().toIso8601String(); var now = new DateTime.now().toUtc().toIso8601String();
normalize(obj) async { normalize(obj) async {
if (obj != null) { if (obj != null) {

View file

@ -22,7 +22,7 @@ typedef String ResponseSerializer(data);
class ResponseContext extends Extensible { class ResponseContext extends Extensible {
final _LockableBytesBuilder _buffer = new _LockableBytesBuilder(); final _LockableBytesBuilder _buffer = new _LockableBytesBuilder();
final Map<String, String> _headers = {HttpHeaders.SERVER: 'angel'}; final Map<String, String> _headers = {HttpHeaders.SERVER: 'angel'};
bool _isOpen = true; bool _isOpen = true, _isClosed = false;
/// The [Angel] instance that is sending a response. /// The [Angel] instance that is sending a response.
Angel app; Angel app;
@ -36,10 +36,10 @@ class ResponseContext extends Extensible {
/// Headers that will be sent to the user. /// Headers that will be sent to the user.
Map<String, String> get headers { Map<String, String> get headers {
/// If the response is closed, then this getter will return an immutable `Map`. /// If the response is closed, then this getter will return an immutable `Map`.
/*if (!_isOpen) if (!_isOpen)
return new Map<String, String>.unmodifiable(_headers); return new Map<String, String>.unmodifiable(_headers);
else*/ else
return _headers; return _headers;
} }
/// Serializes response data into a String. /// Serializes response data into a String.
@ -112,7 +112,7 @@ class ResponseContext extends Extensible {
/// Sends a download as a response. /// Sends a download as a response.
download(File file, {String filename}) async { download(File file, {String filename}) async {
// if (!_isOpen) throw _closed(); if (!_isOpen) throw _closed();
headers["Content-Disposition"] = headers["Content-Disposition"] =
'attachment; filename="${filename ?? file.path}"'; 'attachment; filename="${filename ?? file.path}"';
@ -122,15 +122,25 @@ class ResponseContext extends Extensible {
end(); end();
} }
/// Prevents more data from being written to the response. /// Prevents more data from being written to the response, and locks it entire from further editing.
void end() { void close() {
_buffer._lock(); _buffer._lock();
_isOpen = false; _isOpen = false;
_isClosed = true;
}
/// Prevents further request handlers from running on the response, except for response finalizers.
///
/// To disable response finalizers, see [willCloseItself].
void end() {
_isOpen = false;
} }
/// Re-opens a closed response. **NEVER USE THIS IN A PLUGIN**. /// Re-opens a closed response. **NEVER USE THIS IN A PLUGIN**.
/// ///
/// To preserve your sanity, don't use it ever. This is solely for internal use. /// To preserve your sanity, don't use it ever. This is solely for internal use.
///
/// You're going to need this one day, and you'll be happy it was added.
void reopen() { void reopen() {
_buffer._reopen(); _buffer._reopen();
_isOpen = true; _isOpen = true;
@ -150,7 +160,7 @@ class ResponseContext extends Extensible {
/// Returns a JSONP response. /// Returns a JSONP response.
void jsonp(value, {String callbackName: "callback", contentType}) { void jsonp(value, {String callbackName: "callback", contentType}) {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
write("$callbackName(${serializer(value)})"); write("$callbackName(${serializer(value)})");
if (contentType != null) { if (contentType != null) {
@ -166,7 +176,7 @@ class ResponseContext extends Extensible {
/// Renders a view to the response stream, and closes the response. /// Renders a view to the response stream, and closes the response.
Future render(String view, [Map data]) async { Future render(String view, [Map data]) async {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
write(await app.viewGenerator(view, data)); write(await app.viewGenerator(view, data));
headers[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString(); headers[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString();
end(); end();
@ -180,7 +190,7 @@ class ResponseContext extends Extensible {
/// ///
/// See [Router]#navigate for more. :) /// See [Router]#navigate for more. :)
void redirect(url, {bool absolute: true, int code: 302}) { void redirect(url, {bool absolute: true, int code: 302}) {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
headers headers
..[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString() ..[HttpHeaders.CONTENT_TYPE] = ContentType.HTML.toString()
..[HttpHeaders.LOCATION] = ..[HttpHeaders.LOCATION] =
@ -208,7 +218,7 @@ class ResponseContext extends Extensible {
/// Redirects to the given named [Route]. /// Redirects to the given named [Route].
void redirectTo(String name, [Map params, int code]) { void redirectTo(String name, [Map params, int code]) {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
Route _findRoute(Router r) { Route _findRoute(Router r) {
for (Route route in r.routes) { for (Route route in r.routes) {
if (route is SymlinkRoute) { if (route is SymlinkRoute) {
@ -233,7 +243,7 @@ class ResponseContext extends Extensible {
/// Redirects to the given [Controller] action. /// Redirects to the given [Controller] action.
void redirectToAction(String action, [Map params, int code]) { void redirectToAction(String action, [Map params, int code]) {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
// UserController@show // UserController@show
List<String> split = action.split("@"); List<String> split = action.split("@");
@ -263,7 +273,7 @@ class ResponseContext extends Extensible {
/// Copies a file's contents into the response buffer. /// Copies a file's contents into the response buffer.
Future sendFile(File file, Future sendFile(File file,
{int chunkSize, int sleepMs: 0, bool resumable: true}) async { {int chunkSize, int sleepMs: 0, bool resumable: true}) async {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path); headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path);
buffer.add(await file.readAsBytes()); buffer.add(await file.readAsBytes());
@ -274,7 +284,7 @@ class ResponseContext extends Extensible {
/// ///
/// [contentType] can be either a [String], or a [ContentType]. /// [contentType] can be either a [String], or a [ContentType].
void serialize(value, {contentType}) { void serialize(value, {contentType}) {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
var text = serializer(value); var text = serializer(value);
write(text); write(text);
@ -293,13 +303,13 @@ class ResponseContext extends Extensible {
int sleepMs: 0, int sleepMs: 0,
bool resumable: true, bool resumable: true,
Codec<List<int>, List<int>> codec}) async { Codec<List<int>, List<int>> codec}) async {
// if (!_isOpen) throw _closed(); if (_isClosed) throw _closed();
headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path); headers[HttpHeaders.CONTENT_TYPE] = lookupMimeType(file.path);
end(); end();
willCloseItself = true; willCloseItself = true;
var stream = codec != null Stream stream = codec != null
? file.openRead().transform(codec.encoder) ? file.openRead().transform(codec.encoder)
: file.openRead(); : file.openRead();
await stream.pipe(io); await stream.pipe(io);
@ -307,14 +317,14 @@ class ResponseContext extends Extensible {
/// Writes data to the response. /// Writes data to the response.
void write(value, {Encoding encoding: UTF8}) { void write(value, {Encoding encoding: UTF8}) {
/*if (!_isOpen) if (_isClosed)
throw _closed(); throw _closed();
else {*/ else {
if (value is List<int>) if (value is List<int>)
buffer.add(value); buffer.add(value);
else else
buffer.add(encoding.encode(value.toString())); buffer.add(encoding.encode(value.toString()));
//} }
} }
} }
@ -333,7 +343,7 @@ class _LockableBytesBuilderImpl implements _LockableBytesBuilder {
@override @override
void _lock() { void _lock() {
// _closed = true; _closed = true;
} }
@override @override

View file

@ -476,8 +476,6 @@ class Angel extends AngelBase {
_afterProcessed.add(request); _afterProcessed.add(request);
if (!res.willCloseItself) { if (!res.willCloseItself) {
res.reopen();
for (var finalizer in responseFinalizers) { for (var finalizer in responseFinalizers) {
await finalizer(req, res); await finalizer(req, res);
} }

View file

@ -1,5 +1,5 @@
name: angel_framework name: angel_framework
version: 1.0.1 version: 1.0.2
description: A high-powered HTTP server with DI, routing and more. description: A high-powered HTTP server with DI, routing and more.
author: Tobe O <thosakwe@gmail.com> author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework homepage: https://github.com/angel-dart/angel_framework