diff options
author | Robert Speicher <robert@gitlab.com> | 2016-05-13 01:41:01 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-05-13 01:41:01 +0300 |
commit | 4735a753407b364f7034cf4dbd6ae621b25396c2 (patch) | |
tree | 649e64a0cf21ff1d733ef7a0d9f4c358deafc207 /lib | |
parent | 5186f6e3bd541ffa13f9f907067c638790b9ebfe (diff) | |
parent | 9cc0937b3a41caca89fa6722149248a8f7b0a447 (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.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/redis.rb | 2 |
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 |