rubocop: Update deprecated class methods
This commit is contained in:
parent
7d604c17aa
commit
0d453a8e81
@ -6,13 +6,6 @@
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
Lint/DeprecatedClassMethods:
|
||||
Exclude:
|
||||
- '_plugins/contributors.rb'
|
||||
- '_plugins/events.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/LiteralAsCondition:
|
||||
Exclude:
|
||||
|
||||
@ -105,7 +105,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
## Create cache directory if it doesn't exist
|
||||
if !File.exists?('_cache')
|
||||
if !File.exist?('_cache')
|
||||
Dir.mkdir('_cache')
|
||||
end
|
||||
|
||||
@ -117,7 +117,7 @@ module Jekyll
|
||||
# file has to be updated, they both get updated.
|
||||
corecontributors_cache = '_cache/corecontributors.marshall'
|
||||
sitecontributors_cache = '_cache/sitecontributors.marshall'
|
||||
if File.exists?(corecontributors_cache) && File.exists?(sitecontributors_cache)
|
||||
if File.exist?(corecontributors_cache) && File.exist?(sitecontributors_cache)
|
||||
corecontributors_cache_age = (Time.now - File.stat(corecontributors_cache).mtime).to_i
|
||||
sitecontributors_cache_age = (Time.now - File.stat(sitecontributors_cache).mtime).to_i
|
||||
else
|
||||
|
||||
@ -66,7 +66,7 @@ module Jekyll
|
||||
end
|
||||
|
||||
## Create cache directory if it doesn't exist
|
||||
if !File.exists?('_cache')
|
||||
if !File.exist?('_cache')
|
||||
Dir.mkdir('_cache')
|
||||
end
|
||||
|
||||
@ -78,7 +78,7 @@ module Jekyll
|
||||
events_file = '_events.yml'
|
||||
|
||||
events_file_unix_time = File.stat(events_file).mtime.to_i
|
||||
if File.exists?(conferences_cache)
|
||||
if File.exist?(conferences_cache)
|
||||
conferences_cache_unix_time = File.stat(conferences_cache).mtime.to_i
|
||||
else
|
||||
conferences_cache_unix_time = 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user