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

Error decoding #44

Merged
merged 4 commits into from
May 17, 2018
Merged

Error decoding #44

merged 4 commits into from
May 17, 2018

Conversation

wmcginty
Copy link
Contributor

This PR creates an extension on JSONDecoder that handles DecodableContainer types. This makes it easier for custom errors to conform to DecodingFailureInitializable as they can use this extension in init(decodingError:data:).

Also cleaned up some formatting and tests.

@codecov-io
Copy link

codecov-io commented May 17, 2018

Codecov Report

Merging #44 into release/2.0.0 will increase coverage by 0.24%.
The diff coverage is 100%.

Impacted file tree graph

@@               Coverage Diff                @@
##           release/2.0.0     #44      +/-   ##
================================================
+ Coverage          96.66%   96.9%   +0.24%     
================================================
  Files                 30      31       +1     
  Lines               1048    1065      +17     
================================================
+ Hits                1013    1032      +19     
+ Misses                35      33       -2
Impacted Files Coverage Δ
Sources/Hyperspace/Extensions/URL+Additions.swift 100% <ø> (ø) ⬆️
Sources/Hyperspace/Request/AnyNetworkRequest.swift 100% <ø> (ø) ⬆️
...ces/Hyperspace/Request/Decoding/AnyDecodable.swift 97.91% <ø> (ø)
...ce/Extensions/JSONDecoder+DecodableContainer.swift 100% <100%> (ø)
Tests/DecodingTests.swift 94.7% <100%> (+0.14%) ⬆️
Sources/Hyperspace/Request/NetworkRequest.swift 100% <100%> (ø) ⬆️
.../Hyperspace/Request/URLQueryParameterEncoder.swift 100% <100%> (ø) ⬆️
...yperspace/Extensions/URLQueryItem+Extensions.swift 100% <100%> (+10%) ⬆️
Tests/NetworkActivityIndicatorTests.swift 100% <100%> (ø) ⬆️
...perspace/Request/Decoding/DecodableContainer.swift 100% <100%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a2b0be...151d2ba. Read the comment docs.

@wmcginty wmcginty merged commit 2434f13 into release/2.0.0 May 17, 2018
@wmcginty wmcginty deleted the errorDecoding branch May 17, 2018 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants