forked from puppetlabs/puppet-editor-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(maint) Refactor Sidecar Protocol serialisation
Previously the Sidecar Protocol had the serialisation methods on the BasePuppetObject however this meant anything that wanted to use the serialisation methods also inherited the parameters like key and calling_source. This commit: * Moves the serialisation methods (to_json, from_json!) to BaseClass which BasePuppetObject now inherits from * Adds equality methods on the BaseClass to make it possible to compare Sidecar objects correctly. This is mainly required in spec tests to test for equality (either == or eql?) * Adds a hash method to generate the hash number required when Sidecar objects are put into hashtables There are no test changes as this is a refactor only.
- Loading branch information
1 parent
b1dc150
commit 8ba9d58
Showing
1 changed file
with
49 additions
and
10 deletions.
There are no files selected for viewing
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