Skip to content

Commit

Permalink
Fix all namings
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Dec 18, 2022
1 parent 9587cec commit 0c0a5d8
Show file tree
Hide file tree
Showing 64 changed files with 124 additions and 97 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/dio.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
name: Dio
name: diox

on:
push:
branches:
- main
- develop*
pull_request:
branches:
- main
- develop*

jobs:
analyze:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/example-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- develop*
pull_request:
branches:
- main
- develop*

jobs:
analyze:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- develop*
pull_request:
branches:
- main
- develop*

jobs:
analyze:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/plugin_cookie_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- develop*
pull_request:
branches:
- main
- develop*

jobs:
analyze:
Expand Down Expand Up @@ -61,3 +59,17 @@ jobs:
with:
name: test-results-${{ matrix.sdk }}
path: plugins/cookie_manager/build/reports/test-results.json

publish-dry-run:
name: Publish dry-run
runs-on: ubuntu-latest
defaults:
run:
working-directory: plugins/cookie_manager
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- run: dart pub get
- run: dart pub publish --dry-run
16 changes: 14 additions & 2 deletions .github/workflows/plugin_http2_adapter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- develop*
pull_request:
branches:
- main
- develop*

jobs:
analyze:
Expand Down Expand Up @@ -55,3 +53,17 @@ jobs:
./scripts/prepare_pinning_certs.sh
- run: cd plugins/http2_adapter && dart pub get
- run: cd plugins/http2_adapter && dart test --chain-stack-traces

publish-dry-run:
name: Publish dry-run
runs-on: ubuntu-latest
defaults:
run:
working-directory: plugins/http2_adapter
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- run: dart pub get
- run: dart pub publish --dry-run
8 changes: 4 additions & 4 deletions dio/README-ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependency_overrides:
## 一个极简的示例

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
final dio = Dio();
Expand Down Expand Up @@ -112,7 +112,7 @@ void getHttp() async {
发起一个 `GET` 请求 :

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
final dio = Dio();
Expand Down Expand Up @@ -409,7 +409,7 @@ dio.interceptors.add(
一个简单的自定义拦截器示例:

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
class CustomInterceptors extends Interceptor {
@override
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
Expand Down Expand Up @@ -783,7 +783,7 @@ token.cancel('cancelled');
但是可以继承 `DioForNative``DioForBrowser`

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';
// 在浏览器中,导入 'package:diox/browser.dart'。
Expand Down
8 changes: 4 additions & 4 deletions dio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dependency_overrides:
### Super simple to use

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
final dio = Dio();
Expand Down Expand Up @@ -116,7 +116,7 @@ in [here](https://github.com/flutterchina/dio/issues/347).
Performing a `GET` request:

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
final dio = Dio();
Expand Down Expand Up @@ -436,7 +436,7 @@ dio.interceptors.add(
Simple interceptor example:

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
class CustomInterceptors extends Interceptor {
@override
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
Expand Down Expand Up @@ -829,7 +829,7 @@ so we don't extend `Dio` class direct.
We can extend `DioForNative` or `DioForBrowser` instead, for example:

```dart
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';
// If in browser, import 'package:diox/browser.dart'.
Expand Down
2 changes: 1 addition & 1 deletion dio/example/dio.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

/// More examples see https://github.com/cfug/diox/blob/main/example
void main() async {
Expand Down
2 changes: 1 addition & 1 deletion dio/lib/dio.dart → dio/lib/diox.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// A powerful Http client for Dart, which supports Interceptors,
/// Global configuration, FormData, File downloading etc. and Dio is
/// very easy to use.
library dio;
library diox;

export 'src/adapter.dart';
export 'src/cancel_token.dart';
Expand Down
2 changes: 1 addition & 1 deletion dio/lib/src/parameter.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

class ListParam<T> {
final ListFormat format;
Expand Down
2 changes: 1 addition & 1 deletion dio/lib/src/progress_stream/browser_progress_stream.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:typed_data';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

Stream<Uint8List> addProgress(
Stream<List<int>> stream,
Expand Down
2 changes: 1 addition & 1 deletion dio/lib/src/progress_stream/io_progress_stream.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:typed_data';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

Stream<Uint8List> addProgress(
Stream<List<int>> stream,
Expand Down
2 changes: 1 addition & 1 deletion dio/test/basic_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/dio_mixin_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/download_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@TestOn('vm')
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

import 'mock/adapters.dart';
Expand Down
2 changes: 1 addition & 1 deletion dio/test/encoding_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/exception_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion dio/test/formdata_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'dart:convert';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() async {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/interceptor_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

import 'mock/adapters.dart';
Expand Down
2 changes: 1 addition & 1 deletion dio/test/mimetype_test.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/mock/adapters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';

class MockAdapter implements HttpClientAdapter {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/options_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@TestOn('vm')
import 'dart:convert';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

import 'mock/adapters.dart';
Expand Down
2 changes: 1 addition & 1 deletion dio/test/pinning_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'dart:io';

import 'package:crypto/crypto.dart';
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion dio/test/readtimeout_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import 'dart:async';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';
import 'package:test/test.dart';

Expand Down
2 changes: 1 addition & 1 deletion dio/test/request_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@TestOn('vm')
import 'dart:convert';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

import 'utils.dart';
Expand Down
2 changes: 1 addition & 1 deletion dio/test/upload_stream_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:convert';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:test/test.dart';

void main() {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/adapter.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:typed_data';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

class MyAdapter implements HttpClientAdapter {
final HttpClientAdapter _adapter = HttpClientAdapter();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/cancel_request.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:async';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

void main() async {
final dio = Dio();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/certificate_pinning.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:io';

import 'package:crypto/crypto.dart';
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';

void main() async {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/cookie_mgr.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:cookie_jar/cookie_jar.dart';
import 'package:diox/dio.dart';
import 'package:diox_cookie_manager/dio_cookie_manager.dart';
import 'package:diox/diox.dart';
import 'package:diox_cookie_manager/diox_cookie_manager.dart';

void main() async {
final dio = Dio();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/custom_cache_interceptor.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

class CacheInterceptor extends Interceptor {
CacheInterceptor();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/dio.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

void main() async {
final dio = Dio();
Expand Down
2 changes: 1 addition & 1 deletion example/lib/download.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

// In this example we download a image and listen the downloading progress.
void main() async {
Expand Down
2 changes: 1 addition & 1 deletion example/lib/download_with_trunks.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:async';
import 'dart:io';

import 'package:diox/dio.dart';
import 'package:diox/diox.dart';

void main() async {
final url = 'http://download.dcloud.net.cn/HBuilder.9.0.2.macosx_64.dmg';
Expand Down
2 changes: 1 addition & 1 deletion example/lib/extend_dio.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:diox/dio.dart';
import 'package:diox/diox.dart';
import 'package:diox/io.dart';

class HttpService extends DioForNative {
Expand Down
Loading

0 comments on commit 0c0a5d8

Please sign in to comment.