fmrest-ruby
fmrest-ruby copied to clipboard
Autoloading of token store class
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
Token store classes now have autoloading, but symbol-based autoloading is still missing.