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

Add support for kebab-case KeyDecodingStrategy #105

Merged
merged 5 commits into from May 29, 2019

Conversation

acecilia
Copy link
Contributor

@acecilia acecilia commented May 28, 2019

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.

@codecov
Copy link

codecov bot commented May 28, 2019

Codecov Report

Merging #105 into master will increase coverage by 0.42%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...urces/XMLCoder/Auxiliaries/String+Extensions.swift 100% <100%> (ø) ⬆️
...s/XMLCoder/Decoder/XMLKeyedDecodingContainer.swift 84.88% <100%> (+0.17%) ⬆️
Sources/XMLCoder/Encoder/XMLEncoder.swift 83.48% <100%> (+2.53%) ⬆️
...s/XMLCoder/Encoder/XMLKeyedEncodingContainer.swift 80.67% <100%> (+3.28%) ⬆️
Sources/XMLCoder/Decoder/XMLDecoder.swift 77.62% <77.27%> (+0.64%) ⬆️

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 30a56bf...7ee5c32. Read the comment docs.

@acecilia
Copy link
Contributor Author

I am not sure why the build is not passing, any ideas?

@MaxDesiatov
Copy link
Collaborator

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?

@acecilia
Copy link
Contributor Author

Sure :) I will add the tests as soon as I find some time.

@MaxDesiatov MaxDesiatov changed the title Added support for kebab-case KeyDecodingStrategy Add support for kebab-case KeyDecodingStrategy May 28, 2019
@MaxDesiatov MaxDesiatov merged commit effb838 into CoreOffice:master May 29, 2019
@acecilia
Copy link
Contributor Author

@MaxDesiatov would it be possible to get a release with this changes?

@MaxDesiatov
Copy link
Collaborator

@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.

@MaxDesiatov
Copy link
Collaborator

@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)

@jshier
Copy link

jshier commented Jun 17, 2019

@MaxDesiatov Doesn't look like 0.6.0 was pushed to CocoaPods yet.

@MaxDesiatov
Copy link
Collaborator

@jshier sorry about that, fixed now

@jshier
Copy link

jshier commented Jun 17, 2019

No problem, it's easy to miss.

arjungupta0107 pushed a commit to salido/XMLCoder that referenced this pull request Jun 26, 2020
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
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.

None yet

3 participants