Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update spanner version #15

Merged
merged 1 commit into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion yaroo/lib/src/_router/router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,8 @@
}

static FunctionalRouteDefinition handler(HTTPMethod method, String path, RequestHandler handler) =>
FunctionalRouteDefinition(HTTPMethod.GET, path, handler);
FunctionalRouteDefinition(method, path, handler);

static FunctionalRouteDefinition notFound(RequestHandler handler, [HTTPMethod method = HTTPMethod.ALL]) =>
FunctionalRouteDefinition(method, '/*', handler);

Check warning on line 67 in yaroo/lib/src/_router/router.dart

View check run for this annotation

Codecov / codecov/patch

yaroo/lib/src/_router/router.dart#L66-L67

Added lines #L66 - L67 were not covered by tests
}
3 changes: 2 additions & 1 deletion yaroo/lib/src/_router/utils.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'dart:io';

String cleanRoute(String route) {
return route.replaceAll(RegExp(r'/+$'), '').replaceAll(RegExp(r'/+'), '/');
final result = route.replaceAll(RegExp(r'/+'), '/').replaceAll(RegExp(r'/$'), '');
return result.isEmpty ? '/' : result;
}

String symbolToString(Symbol symbol) {
Expand Down
4 changes: 2 additions & 2 deletions yaroo/lib/src/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
autoReload: false,
trimBlocks: true,
leftStripBlocks: true,
loader: FileSystemLoader(paths: ['public']),
loader: FileSystemLoader(paths: ['public', 'templates'], extensions: {'j2'}),

Check warning on line 58 in yaroo/lib/src/core.dart

View check run for this annotation

Codecov / codecov/patch

yaroo/lib/src/core.dart#L58

Added line #L58 was not covered by tests
);
app.useViewEngine(JinjaViewEngine(environment));
app.useViewEngine(JinjaViewEngine(environment, fileExt: 'j2'));

Check warning on line 60 in yaroo/lib/src/core.dart

View check run for this annotation

Codecov / codecov/patch

yaroo/lib/src/core.dart#L60

Added line #L60 was not covered by tests
}
}

Expand Down
2 changes: 1 addition & 1 deletion yaroo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
git:
url: https://github.com/codekeyz/pharaoh.git
path: packages/pharaoh
spanner: ^1.0.1+1
spanner: ^1.0.1+2
spookie: ^1.0.2+1
meta: ^1.11.0
collection: ^1.18.0
Expand Down