FC initializers: remove Hashie

This commit is contained in:
simon lehericey 2018-01-11 14:04:24 +01:00 committed by Simon Lehericey
parent ec69be0f7b
commit f8519c5345
6 changed files with 20 additions and 16 deletions

View file

@ -2,10 +2,11 @@ FRANCE_CONNECT = if !Rails.env.test?
file_path = "#{Rails.root}/config/france_connect.yml"
config_hash = YAML.safe_load(File.read(file_path))
.reduce({}) { |acc, (key, value)| acc[key.gsub('particulier_', '')] = value, acc }
.symbolize_keys
Hashie::Mash.new(particulier: config_hash)
{ particulier: config_hash }
else
Hashie::Mash.new({
{
particulier: {
identifier: 'plop',
secret: 'plip',
@ -15,5 +16,5 @@ else
userinfo_endpoint: 'https://bidon.com/endpoint',
logout_endpoint: 'https://bidon.com/endpoint',
}
})
}
end