Skip to content
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

Autoloading of token store class #9

Open
pilaf opened this issue Jun 17, 2019 · 1 comment
Open

Autoloading of token store class #9

pilaf opened this issue Jun 17, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@pilaf
Copy link
Collaborator

pilaf commented Jun 17, 2019

Currently you need to manually require the token store class and assign it to FmRest.token_store= as the Ruby class object.

E.g.:

require "fmrest"
require "fmrest/token_store/redis"

FmRest.token_store = FmRest::TokenStore::Redis

While we want to still allow the above example to work, it would be good if we could set the token store with a symbol and autoload it if it's one of the default token stores included with the gem. E.g.:

require "fmrest"

FmRest.token_store = :redis # this would automatically require fmrest/token_store/redis.rb and set the proper class
@pilaf pilaf added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Jun 17, 2019
@pilaf
Copy link
Collaborator Author

pilaf commented Nov 12, 2020

Token store classes now have autoloading, but symbol-based autoloading is still missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant