Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Conversation

fphilipe
Copy link
Contributor

Previously, the MembershipCache was a subclass of Hash. When serializing to and deserializing from JSON, the MembershipCache would become a Hash and blow up. This is a problem in warden-github-rails where I switched to a custom warden (de)serialization in order to properly support JSON serialization and also to support mocked users in test environments between requests (relevant warden-github-rails commit).

@@ -1,19 +1,18 @@
require 'spec_helper'
require 'byebug'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add byebug to the gemspec's development dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that's a left over. I'm fine with adding it when I need it. I'll remove this one.

@atmos
Copy link
Owner

atmos commented Apr 20, 2016

Hi @fphilipe! Have you tested this in a production application? I can cut a release if this fixes stuff for you.

@fphilipe
Copy link
Contributor Author

Hey @atmos. Yeah, I'm using this in production right now. My latest version of warden-github-rails doesn't play well with warden-github in combination with rails' json cookie serializer (marshal works just fine). I'd appreciate a new cut 😉

Previously, the MembershipCache was a subclass of Hash. When serializing
to and deserializing from JSON, the MembershipCache would become a Hash
and blow up. This is a problem in warden-github-rails where I switched
to a custom warden (de)serialization in order to properly support JSON
serialization and also to support mocked users in test environments
between requests[1].

[1]: fphilipe/warden-github-rails@db82470
@fphilipe fphilipe force-pushed the improve-json-serialization-compatibility branch from a0e6921 to c617777 Compare April 20, 2016 06:42
@atmos atmos merged commit bbe3131 into atmos:master Apr 20, 2016
@atmos
Copy link
Owner

atmos commented Apr 20, 2016

1.3.0 is up on rubygems.

@fphilipe fphilipe deleted the improve-json-serialization-compatibility branch April 20, 2016 07:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants