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
Add support for kebab-case KeyDecodingStrategy #105
Conversation
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
+ Coverage 75.82% 76.24% +0.42%
==========================================
Files 38 38
Lines 2039 2054 +15
==========================================
+ Hits 1546 1566 +20
+ Misses 493 488 -5
Continue to review full report at Codecov.
|
I am not sure why the build is not passing, any ideas? |
Hi @acecilia, thank you for the contribution! This is great, and CI has passed, the only unsuccessful checks were related to coverage Would you mind adding a test for the new strategy in the corresponding file in this same PR? |
Sure :) I will add the tests as soon as I find some time. |
…s, to reflect better its content
@MaxDesiatov would it be possible to get a release with this changes? |
@acecilia sure, no problem. I've bumped the version in the podspec, the project file and README, just waiting for the Travis build to pass before I tag the release. |
@acecilia done, the release is tagged and a binary framework for Carthage has just finished building on CI, so it's attached to the release assets (in case you use Carthage) |
@MaxDesiatov Doesn't look like 0.6.0 was pushed to CocoaPods yet. |
@jshier sorry about that, fixed now |
No problem, it's easy to miss. |
See: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles It would also be nice to make all the `convert...` functions declared under `KeyEncodingStrategy` and `KeyDecodingStrategy` public, so consumers can use them when performing a custom conversion. I will be adding tests in case this contribution is desired. * Add support for kebab-case KeyDecodingStrategy * Improvement * Add tests * Rename KeyDecodingStrategyTest to KeyDecodingAndEncodingStrategyTests, to reflect better its content * Prefer isEmpty over count comparison
See: https://en.wikipedia.org/wiki/Letter_case#Special_case_styles
It would also be nice to make all the
convert...
functions declared underKeyEncodingStrategy
andKeyDecodingStrategy
public, so consumers can use them when performing a custom conversion.I will be adding tests in case this contribution is desired.