diff options
author | Azul <azul@riseup.net> | 2016-03-25 11:06:55 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-05-02 08:31:16 -0300 |
commit | 00fba5114ae2c6176c88ff0ea152576c5bff657d (patch) | |
tree | ba3c7c7410d1f0ec6830ff1244fd016a5c090df7 /lib/gemfile_tools.rb | |
parent | 636421bf386e813cb6a87a7499fdedc975b75900 (diff) |
upgrade: {File,Dir}.exists? -> exist?
exists? is deprecated in ruby 2.1
Diffstat (limited to 'lib/gemfile_tools.rb')
-rw-r--r-- | lib/gemfile_tools.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gemfile_tools.rb b/lib/gemfile_tools.rb index dce2448..d1c00dc 100644 --- a/lib/gemfile_tools.rb +++ b/lib/gemfile_tools.rb @@ -68,7 +68,7 @@ def local_config empty_hash.default_proc = proc{|h, k| h.key?(k.to_s) ? h[k.to_s] : nil} ["defaults.yml", "config.yml"].inject(empty_hash.dup) {|config, file| filepath = File.join(File.expand_path("../../config", __FILE__), file) - if File.exists?(filepath) + if File.exist?(filepath) new_config = YAML.load_file(filepath) ['development', 'test','production'].each do |env| config[env] ||= empty_hash.dup @@ -87,7 +87,7 @@ end # or nil if not actually a gem directory # def gem_info(gem_dir) - if Dir.exists?(gem_dir) + if Dir.exist?(gem_dir) gemspec = Dir["#{gem_dir}/*.gemspec"] if gemspec.any? gem_name = File.basename(gemspec.first).sub(/\.gemspec$/,'') |