-
Notifications
You must be signed in to change notification settings - Fork 9
Added Raw function to joData #3
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
base: master
Are you sure you want to change the base?
Conversation
Added .raw(parameter, value) functionality to add default parameters in the URI concatenation string.
This test file was using the old "joData" name rather than "jo". Also fixed deprecated function calls, and finally added the new .raw() testing.
Added initial doc for Raw parameters and removed incomplete sentence in description.
|
Thanks for doing this and sharing it back. I've been away from this project for a while, so I'm going to leave it up to @mccow002 to decide when to merge it in. We should requeue a Travis CI build - it looks like the failure was a Gemfile issue. [edit: heh, actually not sure you can retrigger a Travis CI build for a PR without pushing commits] |
|
I see you did some things in the example/test.html, but I might also consider adding unit tests to joDataSpec.js. |
|
Thanks for the response, I may take another look at this. I noticed that the joDataSpec.js was outdated as the joData function was replaced with just 'jo' in one of the prior versions. |
|
I like this function, but before I accept it, I would like to see a jasmine test for it. I see you modified test.html, but that was always just a scratch pad for me to test things as I developed, and I probably shouldn't have even checked it in. You said the spec was outdated due to using jo instead of joData - it's actually the other way around. When I first write this library, I used joData as the global object, but after using it a bit, I decided to shorten it to jo. So the spec file is up to date and should have 100% code coverage of al features except your new one. Thanks for contributing |
|
Thanks for taking the time to reply. I was meaning to say that the function was in fact shortened to 'jo', and that the joDataSpec.js is outdated because it is still using 'joData'. When I open the spec file, I see 'new joData' used throughout, unless I am missing something... I'll be happy to run an updated test and revise the branch before submitting another pull request, but I just wanted to clarify to make sure I am not missing any details here. Thanks again |
Added test for 'raw' function and its save/load local.
Added loadFromJson function to rawSettings to fix and allow save/load from local
|
I was able to add tests for Jasmine and add "Raw" parameter functionality to joData. However, I was not able to determine how to minify the joData source code. If there are instructions on how to do so I can do it, but if it is easier to run the same minification on the source, it would need to be done on the new joData source to override the current .min.js file. Thanks! |
The Raw function allows for adding uri parameters outside of joData. This is necessary to encapsulate the uri query concatenation using joData instead of adding parameters on top of a joData query string after it is built. Also updated the docs and crude test example.
The updated joData script still needs a minified version generated from the jodata.js file to complete the update.