-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Update json dependency #288
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
Conversation
- Locking the json to an old version seems uneccessary - Forcing multi_json and json_pure monkeypatching broke our test suite - removed the json_pure and so far so good
- in the specs it uses some json gem to render json which calls to_json on the object - in my app it uses an implementation that calls as_json on the object - to get the specs passing, to_json had to include quotes - to get my app to work as_json should not include quotes
|
This PR can't be merged until the build for this PR is fixed, thanks. |
|
@jamesdbloom I spent a little while with this and was unable to make headway. It seems like there is some configuration for the Snap CI build that I don't have access to? It needs to be updated to install a new ruby version on the CI runner. Things I tried:
If you can give me an idea how I can work with that Snap CI build, I'm happy to keep working on it. |
|
The snap-ci build could be updated, however if we update the version of ruby that'll force users of the client to also upgrade.
For MockServer there is a policy of using the lowest version feasible to ensure that people working in restrictive commercial environments that can't easily upgrade their dependencies can continue to use the latest version of the libraries.
Can I please understand more about why we need this upgrade.
Thanks
|
|
Hmm thinking this through from the current point:
Perhaps we could update tests to explicitly use ActiveSupport 4.x then the tests will run against that version and the ruby upgrade won't be necessary? Or perhaps make a separate Rails 5 compatible branch? Or maybe the client code could be updated to not depend on ActiveSupport? Generally, I think the direction of removing the json restrictions will only help to make it more compatible. The tricky part there is how to test with the various possible json gem options out there and make sure they still work? Probably best to start by setting up the test environment to have certain gems installed and at least cover the use cases it had before this change to ensure that if people had it working in a given environment, it should continue working there? That's a lot of question marks... Sorry for generating more questions than answers. I'm happy to tackle one or more of these solutions though once I have an idea what you'd like to see. |
|
@jamesdbloom @radixhound Hey. guys. I read all the comments from this issue and it seems that for a good period of time nothing happened. Is this PR abandoned? I have the same issue with integrating the gem with a Rails 5 application due to the activesupport dependencies. I think it's a big deal to not be able to use it with Rails 5 and we should definitely do something to fix it. |
|
@ovidiubite This branch is working very well for us on our Rails 5 project. I'd love to help get this update merged in but my hands are tied without some guidance. |
|
@radixhound I think I'm also gonna use your branch until we manage to merge the update. Another potential issue for this repo is the end of life for Snap Ci https://blog.snap-ci.com/blog/2017/02/06/2017-02-06-snap-announcement/ but this is another topic. |
|
Unfortunately this PR can't be merged as its failing the build. |
|
On the topic of Snap CI no longer supporting builds, I'm looking at move back to Travis or drone.io to resolve that. |
|
the ruby client has moved to https://github.com/jamesdbloom/mockserver-client-ruby please raised any PRs for this client on that repository |
In order to get the ruby client working with my Rails 5 based project, I had to remove the json dependency constraints as well as activesupport and rest_client constraints since I was locked to newer versions of these.
In theory this client should be designed to work with whatever json package is used by the project that it gets included in, rather than bringing in it's own json dependency.
NB: the specs call the
to_jsonmethod inEnum. My project calls theas_jsonmethod inEnumso theas_jsoncase is not currently covered in the specs.Let me know if this seems like a good direction. I couldn't tell if this was the final version of the ruby client or if there's still a new version in the works. Cheers!