summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorConnor Shea <connor.james.shea@gmail.com>2016-05-08 15:33:34 -0600
committerConnor Shea <connor.james.shea@gmail.com>2016-05-08 15:33:34 -0600
commit9cc0937b3a41caca89fa6722149248a8f7b0a447 (patch)
tree4e1fdfcb34d69da81b993f59742a35b6bccae413 /lib
parent44501820152083d231459223fe09b9d9641b7c1e (diff)
downloadgitlab-ce-9cc0937b3a41caca89fa6722149248a8f7b0a447.tar.gz
Enable the Rubocop DeprecatedClassMethods cop
This reports uses of `File.exists?` and `Dir.exists?`, which were both deprecated in Ruby and will eventually be removed in favor of `.exist?`. Also fixes all existing uses of the deprecated methods.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell.rb2
-rw-r--r--lib/gitlab/redis.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index 132f9cd1966..3e3986d6382 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -180,7 +180,7 @@ module Gitlab
# exists?('gitlab/cookies.git')
#
def exists?(dir_name)
- File.exists?(full_path(dir_name))
+ File.exist?(full_path(dir_name))
end
protected
diff --git a/lib/gitlab/redis.rb b/lib/gitlab/redis.rb
index 5c352c96de5..f7db7a6391c 100644
--- a/lib/gitlab/redis.rb
+++ b/lib/gitlab/redis.rb
@@ -42,7 +42,7 @@ module Gitlab
config_file = File.expand_path('../../../config/resque.yml', __FILE__)
@url = "redis://localhost:6379"
- if File.exists?(config_file)
+ if File.exist?(config_file)
@url =YAML.load_file(config_file)[rails_env]
end
end