mockacino supports status codes via config file#2
Open
grzegorzleszek wants to merge 2 commits intomichaelarmstrong:masterfrom
grzegorzleszek:status_code
Open
mockacino supports status codes via config file#2grzegorzleszek wants to merge 2 commits intomichaelarmstrong:masterfrom grzegorzleszek:status_code
grzegorzleszek wants to merge 2 commits intomichaelarmstrong:masterfrom
grzegorzleszek:status_code
Conversation
mockacino.rb
Outdated
Owner
There was a problem hiding this comment.
looks good, i guess only 2 things i'd change, rename the default config to config.conf or config.txt just so that people's text editors automatically will support it.
Also, right now it only supports hard coding a status code in there right? it'd be better if it was key value pair based file so its extensible in the future.
So instead of the contents being just '404' for example, the contents could be statusCode = '404' or similar... That way we can expand it in the future without breaking old features.
What do you think ?
Author
There was a problem hiding this comment.
Sounds great.
Now it is key value based, so example config.conf will be :
status, 204
Config file name is "config.conf"; config file is key value pair based, eg: status, 204
This file contains hidden or 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
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.
let me know what u think ;)