Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-05-13 01:41:01 +0300
committerRobert Speicher <robert@gitlab.com>2016-05-13 01:41:01 +0300
commit4735a753407b364f7034cf4dbd6ae621b25396c2 (patch)
tree649e64a0cf21ff1d733ef7a0d9f4c358deafc207 /lib
parent5186f6e3bd541ffa13f9f907067c638790b9ebfe (diff)
parent9cc0937b3a41caca89fa6722149248a8f7b0a447 (diff)
Merge branch 'deprecated-class-methods-cop' into 'master'
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. See merge request !4087
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