fmrest-ruby icon indicating copy to clipboard operation
fmrest-ruby copied to clipboard

Autoloading of token store class

Open pilaf opened this issue 6 years ago • 1 comments

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 avatar Jun 17 '19 17:06 pilaf

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

pilaf avatar Nov 12 '20 09:11 pilaf