From c16a323557bb71c4e63fb675c14faa89af9530e6 Mon Sep 17 00:00:00 2001 From: Lejard Hadrien Date: Wed, 13 Feb 2019 10:05:44 +0100 Subject: [PATCH 1/3] fix travis build --- chopper/example/main.dart | 15 --------------- chopper/lib/src/request.dart | 10 +--------- chopper/pubspec.yaml | 2 +- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/chopper/example/main.dart b/chopper/example/main.dart index 8bb07c57..f828aea1 100644 --- a/chopper/example/main.dart +++ b/chopper/example/main.dart @@ -24,18 +24,3 @@ main() async { chopper.dispose(); } - -class _Converter implements Converter { - @override - FutureOr convertRequest(Request request) { - // TODO: implement convertRequest - return null; - } - - @override - FutureOr> - convertResponse(Response response) { - // TODO: implement convertResponse - return null; - } -} diff --git a/chopper/lib/src/request.dart b/chopper/lib/src/request.dart index afa86d8f..07cb038f 100644 --- a/chopper/lib/src/request.dart +++ b/chopper/lib/src/request.dart @@ -86,15 +86,7 @@ class Request { return uri; } - Map _buildHeaders() { - final heads = Map.from(headers); - - if (json == true) { - heads["Content-Type"] = 'application/json'; - } - - return heads; - } + Map _buildHeaders() => Map.from(headers); Future _toMultipartRequest( String method, diff --git a/chopper/pubspec.yaml b/chopper/pubspec.yaml index 169d8f5b..dcabd67d 100644 --- a/chopper/pubspec.yaml +++ b/chopper/pubspec.yaml @@ -1,6 +1,6 @@ name: chopper description: Chopper is an http client generator using source_gen and inspired from retrofit -version: 2.0.0 +version: 2.0.0+1 homepage: https://github.com/lejard-h/chopper author: Hadrien Lejard From 9672c1d5689621edc121888cd6fa82c558e725aa Mon Sep 17 00:00:00 2001 From: Lejard Hadrien Date: Wed, 13 Feb 2019 10:25:50 +0100 Subject: [PATCH 2/3] fix example --- example/.packages | 140 ++++++++++++------------ example/bin/main_jaguar_serializer.dart | 2 +- example/pubspec.lock | 2 +- 3 files changed, 72 insertions(+), 72 deletions(-) diff --git a/example/.packages b/example/.packages index db2f85cf..c9ada1da 100644 --- a/example/.packages +++ b/example/.packages @@ -1,73 +1,73 @@ -# Generated by pub on 2019-02-12 20:46:04.466053. -analyzer:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/analyzer-0.33.3/lib/ -angular:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/angular-5.1.0/lib/ -angular_ast:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/angular_ast-0.5.7/lib/ -angular_compiler:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/angular_compiler-0.4.1/lib/ -archive:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/archive-2.0.4/lib/ -args:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib/ -async:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib/ -bazel_worker:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/bazel_worker-0.1.13/lib/ -build:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build-1.0.1/lib/ -build_config:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_config-0.3.1+4/lib/ -build_modules:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_modules-1.0.2/lib/ -build_resolvers:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_resolvers-0.2.2+6/lib/ -build_runner:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_runner-1.1.1/lib/ -build_runner_core:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_runner_core-1.1.0/lib/ -build_web_compilers:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/build_web_compilers-0.4.4+2/lib/ -built_collection:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/built_collection-4.0.0/lib/ -built_value:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/built_value-6.1.3/lib/ -charcode:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ +# Generated by pub on 2019-02-13 10:24:13.984523. +analyzer:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/analyzer-0.33.3/lib/ +angular:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/angular-5.1.0/lib/ +angular_ast:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/angular_ast-0.5.7/lib/ +angular_compiler:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/angular_compiler-0.4.1/lib/ +archive:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/archive-2.0.4/lib/ +args:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/args-1.5.0/lib/ +async:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/async-2.0.8/lib/ +bazel_worker:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/bazel_worker-0.1.13/lib/ +build:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build-1.0.1/lib/ +build_config:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_config-0.3.1+4/lib/ +build_modules:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_modules-1.0.2/lib/ +build_resolvers:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_resolvers-0.2.2+6/lib/ +build_runner:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_runner-1.1.1/lib/ +build_runner_core:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_runner_core-1.1.0/lib/ +build_web_compilers:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/build_web_compilers-0.4.4+2/lib/ +built_collection:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/built_collection-4.0.0/lib/ +built_value:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/built_value-6.1.3/lib/ +charcode:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.2/lib/ chopper:../chopper/lib/ chopper_generator:../chopper_generator/lib/ -code_builder:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/code_builder-3.1.3/lib/ -collection:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/ -convert:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib/ -crypto:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib/ -csslib:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib/ -dart_style:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.0/lib/ -fixnum:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/fixnum-0.10.8/lib/ -front_end:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.6+3/lib/ -glob:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib/ -graphs:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/graphs-0.1.2+1/lib/ -html:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib/ -http:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib/ -http_multi_server:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib/ -http_parser:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/ -intl:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/intl-0.15.7/lib/ -io:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib/ -jaguar_serializer:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/jaguar_serializer-2.2.2/lib/ -jaguar_serializer_cli:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/jaguar_serializer_cli-2.2.4/lib/ -js:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/ -json_annotation:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/json_annotation-1.2.0/lib/ -json_serializable:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/json_serializable-1.5.1/lib/ -kernel:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.6+3/lib/ -logging:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib/ -matcher:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.4/lib/ -meta:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib/ -mime:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib/ -package_config:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib/ -path:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib/ -pedantic:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/pedantic-1.1.0/lib/ -plugin:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib/ -pool:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib/ -protobuf:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/protobuf-0.10.2/lib/ -pub_semver:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib/ -pubspec_parse:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/pubspec_parse-0.1.2+2/lib/ -quiver:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib/ -scratch_space:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/scratch_space-0.0.3+2/lib/ -shelf:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib/ -shelf_web_socket:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib/ -source_gen:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/source_gen-0.9.1+3/lib/ -source_maps:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib/ -source_span:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib/ -stack_trace:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/ -stream_channel:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib/ -stream_transform:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/stream_transform-0.0.14+1/lib/ -string_scanner:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib/ -timing:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/timing-0.1.1+1/lib/ -typed_data:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/ -utf:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib/ -watcher:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib/ -web_socket_channel:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib/ -yaml:file:///Users/lejard_h/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib/ +code_builder:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/code_builder-3.1.3/lib/ +collection:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/collection-1.14.11/lib/ +convert:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/convert-2.0.2/lib/ +crypto:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/crypto-2.0.6/lib/ +csslib:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/csslib-0.14.5/lib/ +dart_style:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/dart_style-1.2.0/lib/ +fixnum:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/fixnum-0.10.8/lib/ +front_end:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/front_end-0.1.6+3/lib/ +glob:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/glob-1.1.7/lib/ +graphs:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/graphs-0.1.2+1/lib/ +html:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/html-0.13.3+3/lib/ +http:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/http-0.11.3+17/lib/ +http_multi_server:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.0.5/lib/ +http_parser:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.3/lib/ +intl:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/intl-0.15.7/lib/ +io:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/io-0.3.3/lib/ +jaguar_serializer:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/jaguar_serializer-2.2.2/lib/ +jaguar_serializer_cli:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/jaguar_serializer_cli-2.2.4/lib/ +js:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/js-0.6.1+1/lib/ +json_annotation:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/json_annotation-1.2.0/lib/ +json_serializable:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/json_serializable-1.5.1/lib/ +kernel:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/kernel-0.3.6+3/lib/ +logging:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/logging-0.11.3+2/lib/ +matcher:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.4/lib/ +meta:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/meta-1.1.6/lib/ +mime:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/mime-0.9.6+2/lib/ +package_config:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/package_config-1.0.5/lib/ +path:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/path-1.6.2/lib/ +pedantic:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/pedantic-1.1.0/lib/ +plugin:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/plugin-0.2.0+3/lib/ +pool:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/pool-1.3.6/lib/ +protobuf:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/protobuf-0.10.2/lib/ +pub_semver:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/pub_semver-1.4.2/lib/ +pubspec_parse:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/pubspec_parse-0.1.2+2/lib/ +quiver:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/quiver-2.0.0+1/lib/ +scratch_space:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/scratch_space-0.0.3+2/lib/ +shelf:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/shelf-0.7.3+3/lib/ +shelf_web_socket:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/shelf_web_socket-0.2.2+4/lib/ +source_gen:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/source_gen-0.9.1+3/lib/ +source_maps:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/source_maps-0.10.7/lib/ +source_span:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/source_span-1.4.1/lib/ +stack_trace:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.3/lib/ +stream_channel:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/stream_channel-1.6.8/lib/ +stream_transform:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/stream_transform-0.0.14+1/lib/ +string_scanner:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.4/lib/ +timing:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/timing-0.1.1+1/lib/ +typed_data:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/typed_data-1.1.6/lib/ +utf:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/utf-0.9.0+5/lib/ +watcher:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/watcher-0.9.7+10/lib/ +web_socket_channel:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/web_socket_channel-1.0.9/lib/ +yaml:file:///home/hadrien/.pub-cache/hosted/pub.dartlang.org/yaml-2.1.15/lib/ chopper_example:lib/ diff --git a/example/bin/main_jaguar_serializer.dart b/example/bin/main_jaguar_serializer.dart index 10eea281..b5f6f8de 100644 --- a/example/bin/main_jaguar_serializer.dart +++ b/example/bin/main_jaguar_serializer.dart @@ -44,7 +44,7 @@ main() async { } /// Map all your serializer in a repository -final repository = SerializerRepo(serializers: [ +final repository = SerializerRepoImpl(serializers: [ ResourceSerializer(), ]); diff --git a/example/pubspec.lock b/example/pubspec.lock index 4069012c..8182496c 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -133,7 +133,7 @@ packages: path: "../chopper" relative: true source: path - version: "2.0.0" + version: "2.0.0+1" chopper_generator: dependency: "direct dev" description: From 8ff161bff91bd89b1056b3e895470e5255fd305c Mon Sep 17 00:00:00 2001 From: Lejard Hadrien Date: Wed, 13 Feb 2019 10:42:20 +0100 Subject: [PATCH 3/3] unused import --- chopper/example/main.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/chopper/example/main.dart b/chopper/example/main.dart index f828aea1..c609dd25 100644 --- a/chopper/example/main.dart +++ b/chopper/example/main.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:chopper/chopper.dart'; import 'package:chopper/src/interceptor.dart'; import 'definition.dart';