diff --git a/Gemfile.lock b/Gemfile.lock index 9f3d3c394..95c65b97b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -98,7 +98,6 @@ GEM ast (2.4.2) autoprefixer-rails (10.4.7.0) execjs (~> 2) - base64 (0.1.1) bindex (0.8.1) bootsnap (1.14.0) msgpack (~> 1.2) @@ -243,7 +242,7 @@ GEM public_suffix (5.0.0) puma (6.0.0) nio4r (~> 2.0) - racc (1.6.0) + racc (1.7.3) rack (2.2.4) rack-mini-profiler (3.0.0) rack (>= 1.2.0) @@ -310,8 +309,7 @@ GEM rspec-mocks (~> 3.12) rspec-support (~> 3.12) rspec-support (3.12.0) - rubocop (1.57.1) - base64 (~> 0.1.1) + rubocop (1.57.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -322,7 +320,7 @@ GEM rubocop-ast (>= 1.28.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.29.0) + rubocop-ast (1.30.0) parser (>= 3.2.1.0) rubocop-performance (1.15.1) rubocop (>= 1.7.0, < 2.0) diff --git a/config/initializers/settings.rb b/config/initializers/settings.rb index 381c25655..a3232590c 100644 --- a/config/initializers/settings.rb +++ b/config/initializers/settings.rb @@ -18,7 +18,10 @@ def instance # rubocop:todo Metrics/AbcSize # but the creates an immutable setting object that messes with tests. # Immutability is good here though, so we should probably fix that. # Added flag onto safe_load to allow read of anchors (aliases) in yml files. - @instance = Hashie::Mash.new(YAML.safe_load_file(configuration_filename, [Symbol], [], true)) + config_file_descriptor = File.open(configuration_filename, 'r:bom|utf-8') + @instance = Hashie::Mash.new(YAML.safe_load(config_file_descriptor, permitted_classes: [Symbol])) + + #@instance = Hashie::Mash.new(safe_content) # To view a list of pipeline groups and respective pipelines: # e.g. Settings.pipelines.group_by(&:pipeline_group).transform_values { |pipelines| pipelines.map(&:name) }