allow cache to be an ActiveSupport::Cache object#43
allow cache to be an ActiveSupport::Cache object#43jdoconnor wants to merge 5 commits intofschuindt:masterfrom
Conversation
d139064 to
5822a04
Compare
|
This should be a minor version bump the way it is. There's a major version bump that changes the initialization interface that I will recommend. Old way FirebaseIdToken.configure do |config|
config.redis = Redis.new
config.project_ids = ['your-firebase-project-id']
endnew way FirebaseIdToken.configure do |config|
config.cache_store = ActiveSupport::Cache::RedisCacheStore.new
config.project_ids = ['your-firebase-project-id']
endIf you're ready to make a major version bump, we can get rid of the backward compatible code at and the |
|
@jdoconnor Can it be designed as an option, alongside Redis? So, the users can choose Redis or ActiveSupport::Cache. What are your thoughts regarding that? |
|
it can be. I think it is a bit confusing, because the redis cache option allows for the same base functionality. I'll put that together as a friendlier way to migrate |
and new `cache_store` configuration option
|
Thanks for the feedback. The old config will work and operate like it did before. The new configuration will use the |
|
closing temporarily for a bug I found |
and DRYing up the class chooser based on the configuration
f40f0d0 to
85a6320
Compare
|
ready to be reviewed again. sorry for the back and forth |
|
Really nice PR! I am using the gem in production, and I would love to have that feature. Would you mind reviewing it, and possibly merge it @fschuindt if you have some free time? I really appreciate this gem, it saved me a lot of time! Thanks for the work! |
|
@lsglucas thanks for the kind words |
|
Any updates on this PR? |
| end | ||
|
|
||
| def certificates=(value) | ||
| @certificates = klass |
There was a problem hiding this comment.
Shouldn't this be @certificates = value? Otherwise when you do self.configuration.certificates = FirebaseIdToken::Testing::Certificates in self.test! the testing certificates won't actually be set?
There was a problem hiding this comment.
its been 2.5 years since I wrote this. If you want, I can try to re-gain the context and check or I'm happy to hand this off to someone more recently involved. Let me know
There was a problem hiding this comment.
I'm only looking at Firebase as a potential auth option, I'm not the right person to commit to something like this
This appears to be functional in code. I'm going to be testing it for a while to see if I can get good backward compatibility.
todo