The current implementation of configatron
is
module Kernel
def configatron
@__configatron ||= Configatron::Store.new
end
end
from here
Since Kernel
is included in Object
that makes the method available in every object. However, b/c the method simply sets an instance variable, that store will only be available to each instance. Weird choice for a gem whose whole job is providing a globally accessible store.
In v2.4 they used a similar method to access a singleton, which probably worked much better
module Kernel
# Provides access to the Configatron storage system.
def configatron
Configatron.instance
end
end
from here
Looks like you could solve this yourself using require 'configatron/core'
instead to avoid the monkey-patch, and provide your own singleton wrapper.