diff --git a/.gitignore b/.gitignore index efa8ebc7..718b4b01 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,7 @@ crashlytics.properties crashlytics-build.properties fabric.properties + +.idea +.dart_tool +*.iml \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index c65900a0..639900d1 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,28 +1,6 @@ - - - - - - - - - - - General - - - XPath - - - - - AngularJS - - - - + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index 51fa8762..b6a601b4 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/runConfigurations/Navigate_Tests.xml b/.idea/runConfigurations/Navigate_Tests.xml deleted file mode 100644 index 40a1098f..00000000 --- a/.idea/runConfigurations/Navigate_Tests.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Params_Tests.xml b/.idea/runConfigurations/Params_Tests.xml deleted file mode 100644 index dbb5cceb..00000000 --- a/.idea/runConfigurations/Params_Tests.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/Server_Tests.xml b/.idea/runConfigurations/Server_Tests.xml deleted file mode 100644 index d2df89e9..00000000 --- a/.idea/runConfigurations/Server_Tests.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index de2210c9..a9e2c109 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1 +1,4 @@ -language: dart \ No newline at end of file +language: dart +dart: + - dev + - stable \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f30bc69..a5ce0ed4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,4 +5,10 @@ * `MiddlewarePipeline.routingResults` now accepts an `Iterable`, instead of just a `List`. * Removed deprecated `Route.as`, as well as `Router.registerMiddleware`. -* Completely removed `Route.requestMiddleware`. \ No newline at end of file +* Completely removed `Route.requestMiddleware`. + +# 2.0.7 +* Minor strong mode updates to work with stricter Dart 2. + +# 2.0.5 +* Patch to work with `combinator@1.0.0`. \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index eae1e42a..7c403f75 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,3 +1,7 @@ analyzer: strong-mode: - implicit-casts: false \ No newline at end of file +<<<<<<< HEAD + implicit-casts: false +======= + implicit-casts: false +>>>>>>> 6bf72feffc1af269e2ebfa5d1fbcd4f08ba3ea90 diff --git a/lib/src/grammar.dart b/lib/src/grammar.dart index bc038768..219c4ad3 100644 --- a/lib/src/grammar.dart +++ b/lib/src/grammar.dart @@ -1,6 +1,7 @@ part of angel_route.src.router; class RouteGrammar { + static final RegExp rgx = new RegExp(r'\((.+)\)'); static final Parser notSlash = match(new RegExp(r'[^/]+')).value((r) => r.span.text); @@ -13,7 +14,7 @@ class RouteGrammar { static final Parser parameterSegment = chain([ parameterName, - match('?').value((r) => true).opt(), + match('?').value((r) => true).opt(), regExp.opt(), ]).map((r) { var s = new ParameterSegment(r.value[0] as String, r.value[2] as RegExp); @@ -45,7 +46,7 @@ class RouteGrammar { static final Parser routeDefinition = routeSegment .separatedBy(match('/')) - .map((r) => new RouteDefinition(r.value ?? [])) + .map((r) => new RouteDefinition(r.value ?? [])) .surroundedBy(match('/').star().opt()); } diff --git a/lib/src/middleware_pipeline.dart b/lib/src/middleware_pipeline.dart index 141d9e66..4f34007e 100644 --- a/lib/src/middleware_pipeline.dart +++ b/lib/src/middleware_pipeline.dart @@ -18,5 +18,6 @@ class MiddlewarePipeline { return _handlers = handlers; } - MiddlewarePipeline(this.routingResults); + MiddlewarePipeline(Iterable routingResults) + : this.routingResults = routingResults.toList(); } diff --git a/test/server_test.dart b/test/server_test.dart index 11a7abdc..59ddf561 100644 --- a/test/server_test.dart +++ b/test/server_test.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:angel_route/angel_route.dart'; +import 'package:dart2_constant/convert.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart';