Publish angel3_merge_map and angel3_mock_request
This commit is contained in:
parent
5db88c8a92
commit
19858b3f6e
18 changed files with 200 additions and 162 deletions
95
packages/framework/.gitignore
vendored
95
packages/framework/.gitignore
vendored
|
@ -1,41 +1,64 @@
|
||||||
# Created by .ignore support plugin (hsz.mobi)
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
.dart_tool
|
||||||
|
.packages
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# If you're building an application, you may want to check-in your pubspec.lock
|
||||||
|
pubspec.lock
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
# If you don't generate documentation locally you can remove this line.
|
||||||
|
doc/api/
|
||||||
|
|
||||||
|
### Dart template
|
||||||
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
|
||||||
|
# SDK 1.20 and later (no longer creates packages directories)
|
||||||
|
|
||||||
|
# Older SDK versions
|
||||||
|
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||||
|
.project
|
||||||
|
.buildlog
|
||||||
|
**/packages/
|
||||||
|
|
||||||
|
|
||||||
|
# Files created by dart2js
|
||||||
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
|
# rules if you intend to use dart2js directly
|
||||||
|
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||||
|
# differentiate from explicit Javascript files)
|
||||||
|
*.dart.js
|
||||||
|
*.part.js
|
||||||
|
*.js.deps
|
||||||
|
*.js.map
|
||||||
|
*.info.json
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
|
||||||
|
# Don't commit pubspec lock file
|
||||||
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
### JetBrains template
|
### JetBrains template
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
*.iml
|
|
||||||
|
|
||||||
## Directory-based project format:
|
|
||||||
# if you remove the above rule, at least ignore the following:
|
|
||||||
|
|
||||||
# User-specific stuff:
|
# User-specific stuff:
|
||||||
# .idea/workspace.xml
|
|
||||||
# .idea/tasks.xml
|
|
||||||
# .idea/dictionaries
|
|
||||||
|
|
||||||
# Sensitive or high-churn files:
|
## VsCode
|
||||||
# .idea/dataSources.ids
|
.vscode/
|
||||||
# .idea/dataSources.xml
|
|
||||||
# .idea/sqlDataSources.xml
|
|
||||||
# .idea/dynamic.xml
|
|
||||||
# .idea/uiDesigner.xml
|
|
||||||
|
|
||||||
# Gradle:
|
|
||||||
# .idea/gradle.xml
|
|
||||||
# .idea/libraries
|
|
||||||
|
|
||||||
# Mongo Explorer plugin:
|
|
||||||
# .idea/mongoSettings.xml
|
|
||||||
|
|
||||||
## File-based project format:
|
## File-based project format:
|
||||||
*.ipr
|
|
||||||
*.iws
|
*.iws
|
||||||
|
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
|
.idea/
|
||||||
/out/
|
/out/
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
.idea_modules/
|
||||||
|
|
||||||
# JIRA plugin
|
# JIRA plugin
|
||||||
|
@ -45,22 +68,4 @@ atlassian-ide-plugin.xml
|
||||||
com_crashlytics_export_strings.xml
|
com_crashlytics_export_strings.xml
|
||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
### Dart template
|
fabric.properties
|
||||||
# Don’t commit the following directories created by pub.
|
|
||||||
.buildlog
|
|
||||||
.pub/
|
|
||||||
build/
|
|
||||||
packages
|
|
||||||
.packages
|
|
||||||
|
|
||||||
# Or the files created by dart2js.
|
|
||||||
*.dart.js
|
|
||||||
*.js_
|
|
||||||
*.js.deps
|
|
||||||
*.js.map
|
|
||||||
|
|
||||||
# Include when developing application packages.
|
|
||||||
pubspec.lock
|
|
||||||
|
|
||||||
doc/api
|
|
||||||
.dart_tool
|
|
||||||
|
|
|
@ -1,2 +1,12 @@
|
||||||
Tobe O <thosakwe@gmail.com>
|
Primary Authors
|
||||||
Thomas Hii <thomashii@dukefirehawk.com>
|
===============
|
||||||
|
|
||||||
|
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||||
|
|
||||||
|
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||||
|
code base to support NNBD.
|
||||||
|
|
||||||
|
* __[Tobe O](thosakwe@gmail.com)__
|
||||||
|
|
||||||
|
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||||
|
is no longer involved with the project.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2016 The Angel Framework
|
Copyright (c) 2021 dukefirehawk.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
93
packages/merge_map/.gitignore
vendored
93
packages/merge_map/.gitignore
vendored
|
@ -1,60 +1,32 @@
|
||||||
# Created by .ignore support plugin (hsz.mobi)
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
### JetBrains template
|
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
||||||
|
|
||||||
# User-specific stuff:
|
# Files and directories created by pub
|
||||||
.idea/workspace.xml
|
.dart_tool
|
||||||
.idea/tasks.xml
|
.packages
|
||||||
.idea/dictionaries
|
.pub/
|
||||||
.idea/vcs.xml
|
build/
|
||||||
.idea/jsLibraryMappings.xml
|
|
||||||
|
|
||||||
# Sensitive or high-churn files:
|
# If you're building an application, you may want to check-in your pubspec.lock
|
||||||
.idea/dataSources.ids
|
pubspec.lock
|
||||||
.idea/dataSources.xml
|
|
||||||
.idea/dataSources.local.xml
|
|
||||||
.idea/sqlDataSources.xml
|
|
||||||
.idea/dynamic.xml
|
|
||||||
.idea/uiDesigner.xml
|
|
||||||
|
|
||||||
# Gradle:
|
# Directory created by dartdoc
|
||||||
.idea/gradle.xml
|
# If you don't generate documentation locally you can remove this line.
|
||||||
.idea/libraries
|
doc/api/
|
||||||
|
|
||||||
# Mongo Explorer plugin:
|
|
||||||
.idea/mongoSettings.xml
|
|
||||||
|
|
||||||
## File-based project format:
|
|
||||||
*.iws
|
|
||||||
|
|
||||||
## Plugin-specific files:
|
|
||||||
|
|
||||||
# IntelliJ
|
|
||||||
/out/
|
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
|
||||||
|
|
||||||
# JIRA plugin
|
|
||||||
atlassian-ide-plugin.xml
|
|
||||||
|
|
||||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
||||||
com_crashlytics_export_strings.xml
|
|
||||||
crashlytics.properties
|
|
||||||
crashlytics-build.properties
|
|
||||||
fabric.properties
|
|
||||||
### Dart template
|
### Dart template
|
||||||
# See https://www.dartlang.org/tools/private-files.html
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
# Files and directories created by pub
|
# Files and directories created by pub
|
||||||
.buildlog
|
|
||||||
.packages
|
# SDK 1.20 and later (no longer creates packages directories)
|
||||||
|
|
||||||
|
# Older SDK versions
|
||||||
|
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||||
.project
|
.project
|
||||||
.pub/
|
.buildlog
|
||||||
build/
|
|
||||||
**/packages/
|
**/packages/
|
||||||
|
|
||||||
|
|
||||||
# Files created by dart2js
|
# Files created by dart2js
|
||||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
# rules if you intend to use dart2js directly
|
# rules if you intend to use dart2js directly
|
||||||
|
@ -67,10 +39,33 @@ build/
|
||||||
*.info.json
|
*.info.json
|
||||||
|
|
||||||
# Directory created by dartdoc
|
# Directory created by dartdoc
|
||||||
doc/api/
|
|
||||||
|
|
||||||
# Don't commit pubspec lock file
|
# Don't commit pubspec lock file
|
||||||
# (Library packages only! Remove pattern if developing an application package)
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
pubspec.lock
|
### JetBrains template
|
||||||
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
.dart_tool
|
# User-specific stuff:
|
||||||
|
|
||||||
|
## VsCode
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
## File-based project format:
|
||||||
|
*.iws
|
||||||
|
|
||||||
|
## Plugin-specific files:
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
.idea/
|
||||||
|
/out/
|
||||||
|
.idea_modules/
|
||||||
|
|
||||||
|
# JIRA plugin
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
|
||||||
|
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||||
|
com_crashlytics_export_strings.xml
|
||||||
|
crashlytics.properties
|
||||||
|
crashlytics-build.properties
|
||||||
|
fabric.properties
|
||||||
|
|
|
@ -1,2 +1,12 @@
|
||||||
Tobe O <thosakwe@gmail.com>
|
Primary Authors
|
||||||
Thomas Hii <thomashii@dukefirehawk.com>
|
===============
|
||||||
|
|
||||||
|
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||||
|
|
||||||
|
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||||
|
code base to support NNBD.
|
||||||
|
|
||||||
|
* __[Tobe O](thosakwe@gmail.com)__
|
||||||
|
|
||||||
|
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||||
|
is no longer involved with the project.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2016 Tobe O
|
Copyright (c) 2021 dukefirehawk.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
# merge_map
|
# angel3_merge_map
|
||||||
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_merge_map)
|
||||||
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map)
|
||||||
|
|
||||||
Combine multiple Maps into one. Equivalent to
|
Combine multiple Maps into one. Equivalent to
|
||||||
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
[Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
|
||||||
in JS.
|
in JS.
|
||||||
|
@ -6,9 +11,9 @@ in JS.
|
||||||
# Example
|
# Example
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
import "package:merge_map/merge_map.dart";
|
import "package:angel3_merge_map/angel3_merge_map.dart";
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
Map map1 = {'hello': 'world'};
|
Map map1 = {'hello': 'world'};
|
||||||
Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
|
Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
|
||||||
Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
|
Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
import 'package:merge_map/merge_map.dart';
|
import 'package:angel3_merge_map/angel3_merge_map.dart';
|
||||||
|
|
||||||
main() {
|
void main() {
|
||||||
Map map1 = {'hello': 'world'};
|
Map map1 = {'hello': 'world'};
|
||||||
Map map2 = {'foo': {'bar': 'baz', 'this': 'will be overwritten'}};
|
Map map2 = {
|
||||||
Map map3 = {'foo': {'john': 'doe', 'this': 'overrides previous maps'}};
|
'foo': {'bar': 'baz', 'this': 'will be overwritten'}
|
||||||
Map merged = mergeMap([map1, map2, map3]);
|
};
|
||||||
print(merged);
|
Map map3 = {
|
||||||
|
'foo': {'john': 'doe', 'this': 'overrides previous maps'}
|
||||||
|
};
|
||||||
|
Map merged = mergeMap([map1, map2, map3]);
|
||||||
|
print(merged);
|
||||||
|
|
||||||
// {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}}
|
// {hello: world, foo: {bar: baz, john: doe, this: overrides previous maps}}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/// Exposes the [mergeMap] function, which... merges Maps.
|
/// Exposes the [mergeMap] function, which... merges Maps.
|
||||||
library merge_map;
|
library angel3_merge_map;
|
||||||
|
|
||||||
_copyValues<K, V>(
|
_copyValues<K, V>(
|
||||||
Map<K, V> from, Map<K, V?>? to, bool recursive, bool acceptNull) {
|
Map<K, V> from, Map<K, V?>? to, bool recursive, bool acceptNull) {
|
||||||
|
@ -28,7 +28,7 @@ Map<K, V> mergeMap<K, V>(Iterable<Map<K, V>> maps,
|
||||||
{bool recursive: true, bool acceptNull: false}) {
|
{bool recursive: true, bool acceptNull: false}) {
|
||||||
Map<K, V> result = <K, V>{};
|
Map<K, V> result = <K, V>{};
|
||||||
maps.forEach((Map<K, V> map) {
|
maps.forEach((Map<K, V> map) {
|
||||||
if (map != null) _copyValues(map, result, recursive, acceptNull);
|
_copyValues(map, result, recursive, acceptNull);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
name: merge_map
|
name: angel3_merge_map
|
||||||
description: Combine multiple Maps into one. Equivalent to Object.assign in JS.
|
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
homepage: https://github.com/thosakwe/merge_map
|
description: Combine multiple Maps into one. Equivalent to Object.assign in JS.
|
||||||
|
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/merge_map
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
test: ^1.17.3
|
test: ^1.17.4
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import "package:merge_map/merge_map.dart";
|
import "package:angel3_merge_map/angel3_merge_map.dart";
|
||||||
import "package:test/test.dart";
|
import "package:test/test.dart";
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|
49
packages/mock_request/.gitignore
vendored
49
packages/mock_request/.gitignore
vendored
|
@ -1,13 +1,32 @@
|
||||||
# See https://www.dartlang.org/tools/private-files.html
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
# Files and directories created by pub
|
# Files and directories created by pub
|
||||||
.buildlog
|
.dart_tool
|
||||||
.packages
|
.packages
|
||||||
.project
|
|
||||||
.pub/
|
.pub/
|
||||||
build/
|
build/
|
||||||
|
|
||||||
|
# If you're building an application, you may want to check-in your pubspec.lock
|
||||||
|
pubspec.lock
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
# If you don't generate documentation locally you can remove this line.
|
||||||
|
doc/api/
|
||||||
|
|
||||||
|
### Dart template
|
||||||
|
# See https://www.dartlang.org/tools/private-files.html
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
|
||||||
|
# SDK 1.20 and later (no longer creates packages directories)
|
||||||
|
|
||||||
|
# Older SDK versions
|
||||||
|
# (Include if the minimum SDK version specified in pubsepc.yaml is earlier than 1.20)
|
||||||
|
.project
|
||||||
|
.buildlog
|
||||||
**/packages/
|
**/packages/
|
||||||
|
|
||||||
|
|
||||||
# Files created by dart2js
|
# Files created by dart2js
|
||||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
# rules if you intend to use dart2js directly
|
# rules if you intend to use dart2js directly
|
||||||
|
@ -20,35 +39,17 @@ build/
|
||||||
*.info.json
|
*.info.json
|
||||||
|
|
||||||
# Directory created by dartdoc
|
# Directory created by dartdoc
|
||||||
doc/api/
|
|
||||||
|
|
||||||
# Don't commit pubspec lock file
|
# Don't commit pubspec lock file
|
||||||
# (Library packages only! Remove pattern if developing an application package)
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
pubspec.lock
|
|
||||||
### JetBrains template
|
### JetBrains template
|
||||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||||
|
|
||||||
# User-specific stuff:
|
# User-specific stuff:
|
||||||
.idea/**/workspace.xml
|
|
||||||
.idea/**/tasks.xml
|
|
||||||
.idea/dictionaries
|
|
||||||
|
|
||||||
# Sensitive or high-churn files:
|
## VsCode
|
||||||
.idea/**/dataSources/
|
.vscode/
|
||||||
.idea/**/dataSources.ids
|
|
||||||
.idea/**/dataSources.xml
|
|
||||||
.idea/**/dataSources.local.xml
|
|
||||||
.idea/**/sqlDataSources.xml
|
|
||||||
.idea/**/dynamic.xml
|
|
||||||
.idea/**/uiDesigner.xml
|
|
||||||
|
|
||||||
# Gradle:
|
|
||||||
.idea/**/gradle.xml
|
|
||||||
.idea/**/libraries
|
|
||||||
|
|
||||||
# Mongo Explorer plugin:
|
|
||||||
.idea/**/mongoSettings.xml
|
|
||||||
|
|
||||||
## File-based project format:
|
## File-based project format:
|
||||||
*.iws
|
*.iws
|
||||||
|
@ -56,9 +57,8 @@ pubspec.lock
|
||||||
## Plugin-specific files:
|
## Plugin-specific files:
|
||||||
|
|
||||||
# IntelliJ
|
# IntelliJ
|
||||||
|
.idea/
|
||||||
/out/
|
/out/
|
||||||
|
|
||||||
# mpeltonen/sbt-idea plugin
|
|
||||||
.idea_modules/
|
.idea_modules/
|
||||||
|
|
||||||
# JIRA plugin
|
# JIRA plugin
|
||||||
|
@ -69,4 +69,3 @@ com_crashlytics_export_strings.xml
|
||||||
crashlytics.properties
|
crashlytics.properties
|
||||||
crashlytics-build.properties
|
crashlytics-build.properties
|
||||||
fabric.properties
|
fabric.properties
|
||||||
.dart_tool
|
|
|
@ -1,2 +1,12 @@
|
||||||
Tobe O <thosakwe@gmail.com>
|
Primary Authors
|
||||||
Thomas Hii <thomashii@dukefirehawk.com>
|
===============
|
||||||
|
|
||||||
|
* __[Thomas Hii](dukefirehawk.apps@gmail.com)__
|
||||||
|
|
||||||
|
Thomas is the current maintainer of the code base. He has refactored and migrated the
|
||||||
|
code base to support NNBD.
|
||||||
|
|
||||||
|
* __[Tobe O](thosakwe@gmail.com)__
|
||||||
|
|
||||||
|
Tobe has written much of the original code prior to NNBD migration. He has moved on and
|
||||||
|
is no longer involved with the project.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2017 Tobe O
|
Copyright (c) 2021 dukefirehawk.com
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
# mock_request
|
# angel3_mock_request
|
||||||
|
[![version](https://img.shields.io/badge/pub-v2.12.4-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
|
||||||
|
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
|
||||||
|
|
||||||
[![Pub](https://img.shields.io/pub/v/mock_request.svg)](https://pub.dartlang.org/packages/mock_request)
|
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request)
|
||||||
[![build status](https://travis-ci.org/thosakwe/mock_request.svg)](https://travis-ci.org/thosakwe/mock_request)
|
|
||||||
|
|
||||||
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
||||||
This makes it possible to test server-side Dart applications without
|
This makes it possible to test server-side Dart applications without
|
||||||
having to ever bind to a port.
|
having to ever bind to a port.
|
||||||
|
|
||||||
This package was originally designed to testing
|
This package was originally designed to testing
|
||||||
[Angel](https://github.com/angel-dart/angel/wiki)
|
[Angel](https://github.com/dukefirehawk/angel)
|
||||||
applications smoother, but works with any Dart-based server. :)
|
applications smoother, but works with any Dart-based server. :)
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
```dart
|
```dart
|
||||||
var rq = new MockHttpRequest('GET', Uri.parse('/foo'));
|
var rq = MockHttpRequest('GET', Uri.parse('/foo'));
|
||||||
await rq.close();
|
await rq.close();
|
||||||
await app.handleRequest(rq); // Run within your server-side application
|
await app.handleRequest(rq); // Run within your server-side application
|
||||||
var rs = rq.response;
|
var rs = rq.response;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:mock_request/mock_request.dart';
|
import 'package:angel3_mock_request/angel3_mock_request.dart';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
var rq =
|
var rq =
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
name: mock_request
|
name: angel3_mock_request
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
description: Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
description: Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request
|
||||||
homepage: https://github.com/thosakwe/mock_request
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.12.0 <3.0.0'
|
sdk: '>=2.12.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
charcode: ^1.2.0
|
charcode: ^1.2.0
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
#angel_framework: ^2.1.0
|
#angel_framework: ^2.1.0
|
||||||
http: ^0.13.0
|
http: ^0.13.2
|
||||||
test: ^1.16.8
|
test: ^1.17.4
|
||||||
|
|
Loading…
Reference in a new issue