Skip to content

Commit 1770a72

Browse files
authored
GHI-8001 - All occurances of File.exists? substituted with File.exist? (#244)
* Added .gitignore * Substituted all occurrences of File.exists? with File.exist? * Fix a typo `File.exists` in cookbooks/ey-nginx/templates/default/fpm-server.conf.erb
1 parent ba3147e commit 1770a72

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

cookbooks/ey-mysql/files/default/mysql_start

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class MysqlStart
6666
log_mysql_event("MySQL did not start, zapping")
6767
begin
6868
pidfile = '/var/run/mysqld/mysqld.pid'
69-
if ::File.exists?(pidfile)
69+
if ::File.exist?(pidfile)
7070
::File.open('/var/run/mysqld/mysqld.pid', 'r') do |f|
7171
pid = f.read.to_i
7272
Process.kill("TERM", pid)

cookbooks/ey-nginx/templates/default/fpm-server.conf.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ server {
8585
fastcgi_intercept_errors off;
8686
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
8787
fastcgi_param SERVER_NAME $hostname;
88-
<% if File.exists?("/etc/newrelic/newrelic.cfg") %>
88+
<% if File.exist?("/etc/newrelic/newrelic.cfg") %>
8989
fastcgi_param PHP_VALUE "newrelic.appname=<%= @env_name %> / <%= @vhost.app.name %>";
9090
<% end %>
9191
}

cookbooks/ey-unicorn/templates/default/unicorn.rb.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ before_fork do |server, worker|
8585
# Using this method we get 0 downtime deploys.
8686
old_pid = "#{server.config[:pid]}.oldbin"
8787

88-
if File.exists?(old_pid) && server.pid != old_pid
88+
if File.exist?(old_pid) && server.pid != old_pid
8989
begin
9090
sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU
9191
Process.kill(sig, File.read(old_pid).to_i)

0 commit comments

Comments
 (0)