Closed TerminalFi closed 4 years ago
@TheSecEng you need to create mock for encode_value
and decode_value
functions. Take a look to this file.
One way to test this change is, is implementing json.loads in sublime.decode_value
.
For example here, i am mocking the behavior of sublime.yes_no_cancel_dialog
function, try to do the same with sublime.decode_value
.
@TheSecEng , please try to run your tests locally, before to push. Thanks in advance for your contribution.
@mfuentesg thanks for some direction, looks like I have that portion working, not sure how to modify the get_local_version
tests to pass since they are using sublime functions
@TheSecEng i will check it after my work hours.
i'll try to help you to write tests
I want to add that the following functions were adding in Sublime Text 3019, likely not a problem.
sublime.encode_value
sublime.decode_value
@mfuentesg I am sorry I can't help more with writing the tests. Have you been able to look at this more?
Hey @TheSecEng thanks for your time, i will try to take it next week.
Who doesn't wait or need currently this feature, do these steps
This feature works only in Unix systems (macOS, Linux, WSL)
cd DIR
or Open terminal here at directory via context menu (available for Linux)git clone https://github.com/TheSecEng/SyncSettings.git
in Terminalcd SyncSettings && git checkout fix/json-handling
in TerminalDone, you should get working solution
Thanks to @mfuentesg - for original best package, thanks billion times @TheSecEng - for fork and fix, thanks billion times and to all contributors of SyncSettings package + Sublime Text teams for fast editor
Regards, Davlik
Who doesn't wait or need currently this feature, do these steps
This feature works only in Unix systems (macOS, Linux, WSL)
- Remove current Sync Settings (Disabling doesn't work)
- Press Cmd/Ctrl + Shift + P, search Browser Packages and click Enter
- Copy directory path and paste go-to directory via
cd DIR
or Open terminal here at directory via context menu (available for Linux)- Run
git clone https://github.com/TheSecEng/SyncSettings.git
in Terminal- Run
cd SyncSettings && git checkout fix/json-handling
in Terminal- Restart Sublime Text
- Press Cmd/Ctrl + Shift + P again, but now search Satisfy Dependencies and click Enter
- Restart Sublime Text
Done, you should get working solution
Thanks to @mfuentesg - for original best package, thanks billion times @TheSecEng - for fork and fix, thanks billion times and to all contributors of SyncSettings package + Sublime Text teams for fast editor
Regards, Davlik
I highly suggest not doing this. I will not be maintaining my branch and it will be deleted once this is merged.
@TheSecEng after this is merged, we will have original package with fixes and these steps does not need. But thanks for warning
@dalisoft @TheSecEng thank you guys, i am very busy with my job, i haven't the bandwidth yet. Give me some time please :D.
Sorry for the inconvenience
@TheSecEng plase find my comments to solve the issue.
@allcontributors please add @TheSecEng for code
@mfuentesg
I've put up a pull request to add @TheSecEng! :tada:
@mfuentesg Thanks, all is good finally.
@allcontributors please add @TheSecEng for code
@mfuentesg
I've put up a pull request to add @TheSecEng! :tada:
As #167 is merged, seems, this way is only one to get it working on ST4 on macOS?
@dalisoft those changes are already deployed and tagged, using latest version of ST should has this fixed.
@mfuentesg I know this changed already merged, but also reverted via #167, isn't? I love ST and amazing plugins made by community, but it's not working, only way to get it working is same comment as linked above. Thanks a lot for your hard work to make this plugin
@dalisoft please find issue here. https://github.com/mfuentesg/SyncSettings/issues/185
@mfuentesg Thanks
@dalisoft https://github.com/mfuentesg/SyncSettings/issues/185 this is already merged, please let me know if it solve your issue 👍🏻
Any other comment, feel free to reopen issue https://github.com/mfuentesg/SyncSettings/issues/185
fixes #144 fixes #119
BLUF Python's json library doesn't allow for trailing comments, or comments 🤷♂️ because it follows JSON Spec. Sublime files however often time have these, as sublime allows them. So too accommodate for that, we use sublimes builtin encode_value and decode_value for handling json.
@mfuentesg Not sure how to implement test case. Sorry, I've not learned python 100%. Could use some general guidance.