20300: Update test to new Rails API.
[arvados.git] / services / api / script / arvados-git-sync.rb
index ceebc3518a08d22586a4f6ee2b184f1d90744253..9f8f050c1096e2a030e704f9b51c5820a74e45f4 100755 (executable)
@@ -26,7 +26,9 @@ DEBUG = 1
 # if present, overriding base config parameters as specified
 path = File.absolute_path('../../config/arvados-clients.yml', __FILE__)
 if File.exist?(path) then
-  cp_config = YAML.safe_load_file(path)[ENV['RAILS_ENV']]
+  cp_config = File.open(path) do |f|
+    YAML.safe_load(f, filename: path)[ENV['RAILS_ENV']]
+  end
 else
   puts "Please create a\n #{path}\n file"
   exit 1