summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-03-25 11:06:55 +0100
committerAzul <azul@riseup.net>2016-05-02 08:31:16 -0300
commit00fba5114ae2c6176c88ff0ea152576c5bff657d (patch)
treeba3c7c7410d1f0ec6830ff1244fd016a5c090df7 /config
parent636421bf386e813cb6a87a7499fdedc975b75900 (diff)
upgrade: {File,Dir}.exists? -> exist?
exists? is deprecated in ruby 2.1
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/initializers/customization.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/config/application.rb b/config/application.rb
index 4a70b04..0e00356 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -13,7 +13,7 @@ Bundler.require(*Rails.groups)
APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file|
filepath = File.expand_path(file, File.dirname(__FILE__))
- if File.exists?(filepath) && settings = YAML.load_file(filepath)[Rails.env]
+ if File.exist?(filepath) && settings = YAML.load_file(filepath)[Rails.env]
config.merge(settings)
else
config
diff --git a/config/initializers/customization.rb b/config/initializers/customization.rb
index aaa2939..9f537e9 100644
--- a/config/initializers/customization.rb
+++ b/config/initializers/customization.rb
@@ -26,7 +26,7 @@ Rails.application.config.assets.paths.unshift "#{customization_directory}/styles
#
# Copy files to public
#
-if !defined?(RAKE) && Dir.exists?("#{customization_directory}/public")
+if !defined?(RAKE) && Dir.exist?("#{customization_directory}/public")
require 'fileutils'
FileUtils.cp_r("#{customization_directory}/public/.", "#{Rails.root}/public", :preserve => true)
end