-
Notifications
You must be signed in to change notification settings - Fork 1
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
Properly Support Multiple File Types #33
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now they support both types of file names
So now they can support whatever has been registered
This puts less responsibility on the provider libraries and more on the initial bootstrap process. Renamed IExternalConfiguration to IExternalProviderConfiguration
Added loads of tests to cover various bits I refactored or added
Added tests for all of the localization parsers, I will then implemented the resx one afterwards
We can now read downloaded resx strings. This was way more awkward than I imagined it to be, I will rip the parts of the lib I referenced to prevent the dependency!
These tests were broken from refactors so theyre now working again
I realised that resx would need its own custom file name logic so I refactored the config to have an object for the filetype details. This has had some knock on effects but means it should be easier supporting unique file types in the future.
The version formatting didn't apply to primary cultures and the culture checking didn't work properly despite the unit tests passing so I have updated the tests to be flakier and fixed the offending code (using ==). Added resx files for external demonstration
There is now an example of config for each type of file
I have been neglecting these so here are some for the most used methods
Minimum allowed coverage is Generated by 🐒 cobertura-action against eabd25c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the ability for external providers to use any file type, previously only Json was supported.
I have refactored the library in order to support this feature and the integration testing passed when working with the github raw api. This pr will make it significantly easier to add extra file types in the future should the need arise.
Unfortunately due to Resx parsing being extremely difficult out of the box, I have taken a dependency on ResXResourcerReader.NetStandard, I ummed and ahhed about adding this but ultimately decided it wasn't a huge impact since this library requires multiple packages that DO have dependencies, the core project doesn't work on its own so it is less of an issue in my opinion. I contemplated splitting the core out to have other libraries for json & resx parsing but decided that would likely be overkill in this situation therefore we now have this added dependency.