We've faced an issue with configatron.temp due to unexpected side effect
# config changes in rspec case
# leaked into other
configatron.temp do
#leaks
configs.each { |config| configatron.origins[config.origin_id] = { app_id: '123' } }
# doesn't leak
# configatron.origins = configs.map { |cfg| [cfg.origin_id, { app_id: '123' }] }.to_h
example.run
end
After skimming through source code of configatron.temp, I humbly suggest authors to consider implementation of configatron.temp with Marshal.dump and Marshal.load, which looks like straightforward solution with rather strong guarantees.
We've faced an issue with
configatron.tempdue to unexpected side effectAfter skimming through source code of
configatron.temp, I humbly suggest authors to consider implementation ofconfigatron.tempwithMarshal.dumpandMarshal.load, which looks like straightforward solution with rather strong guarantees.