From 82ead161b3a6a34b16abb741382c12d0905b94a5 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sun, 11 Jun 2017 12:57:36 -0400 Subject: [PATCH] +1 --- .idea/workspace.xml | 73 +++++++++++++++++++++++----------------- README.md | 2 +- lib/src/http/server.dart | 7 ++-- pubspec.yaml | 2 +- 4 files changed, 48 insertions(+), 36 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c07a3b9a..aaad1c17 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,6 +3,8 @@ + + @@ -30,7 +32,7 @@ - + @@ -39,14 +41,14 @@ - + - + - + @@ -79,7 +81,7 @@ - + @@ -88,11 +90,11 @@ - + - + @@ -101,8 +103,8 @@ - - + + @@ -172,6 +174,7 @@ debug _printDebug use( + _injec _isClosed @@ -205,8 +208,8 @@ @@ -240,7 +243,6 @@ - @@ -324,6 +326,7 @@ + @@ -460,7 +463,8 @@ - + + 1481237183504 @@ -553,7 +557,14 @@ - @@ -589,7 +600,7 @@ - @@ -606,8 +617,10 @@ + - + + @@ -615,11 +628,9 @@ - - @@ -940,7 +951,7 @@ - + @@ -967,7 +978,7 @@ - + @@ -1001,8 +1012,16 @@ - - + + + + + + + + + + @@ -1011,22 +1030,14 @@ - + - + - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index c4be25d2..99210b04 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # angel_framework -[![pub 1.0.3](https://img.shields.io/badge/pub-1.0.3-brightgreen.svg)](https://pub.dartlang.org/packages/angel_framework) +[![pub 1.0.3+1](https://img.shields.io/badge/pub-1.0.3+1-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) A high-powered HTTP server with support for dependency injection, sophisticated routing and more. diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index cf2ad6f8..5e2b7f14 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -45,7 +45,8 @@ class Angel extends AngelBase { Angel _parent; ServerGenerator _serverGenerator = HttpServer.bind; - final Map _injections = {}; + /// A global Map of manual injections. You usually will not want to touch this. + final Map injections = {}; final Map _preContained = {}; ResponseSerializer _serializer; @@ -243,7 +244,7 @@ class Angel extends AngelBase { /// Shortcut for adding a middleware to inject a key/value pair on every request. void inject(key, value) { - _injections[key] = value; + injections[key] = value; } /// Shortcut for adding a middleware to inject a serialize on every request. @@ -315,7 +316,7 @@ class Angel extends AngelBase { Future createRequestContext(HttpRequest request) { _beforeProcessed.add(request); return RequestContext.from(request, this).then((req) { - return req..injections.addAll(_injections ?? {}); + return req..injections.addAll(injections ?? {}); }); } diff --git a/pubspec.yaml b/pubspec.yaml index 9be20740..76c3009b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.0.3 +version: 1.0.3+1 description: A high-powered HTTP server with DI, routing and more. author: Tobe O homepage: https://github.com/angel-dart/angel_framework