]> git.openstreetmap.org Git - chef.git/commitdiff
Use the global File class for file tests
authorTom Hughes <tom@compton.nu>
Sun, 17 Mar 2019 11:39:22 +0000 (11:39 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 17 Mar 2019 11:39:22 +0000 (11:39 +0000)
cookbooks/web/resources/rails_port.rb

index 2d19c731ad426510cf8d61dbc732b2ac79d79397..3fc09915306cd31366b39c456275c0bfb4455e24 100644 (file)
@@ -282,13 +282,13 @@ action :create do
     mode 0o664
     content application_yml
     notifies :run, "execute[#{rails_directory}/public/assets]"
-    only_if { File.exist?("#{rails_directory}/config/example.application.yml") }
+    only_if { ::File.exist?("#{rails_directory}/config/example.application.yml") }
   end
 
   file "delete:#{rails_directory}/config/application.yml" do
     path "#{rails_directory}/config/application.yml"
     action :delete
-    not_if { File.exist?("#{rails_directory}/config/example.application.yml") }
+    not_if { ::File.exist?("#{rails_directory}/config/example.application.yml") }
   end
 
   settings = new_resource.to_hash.slice(
@@ -341,7 +341,7 @@ action :create do
     mode 0o664
     content YAML.dump(settings)
     notifies :run, "execute[#{rails_directory}/public/assets]"
-    only_if { File.exist?("#{rails_directory}/config/settings.yml") }
+    only_if { ::File.exist?("#{rails_directory}/config/settings.yml") }
   end
 
   if new_resource.piwik_configuration