lib/geminabox/server.rb in geminabox-0.13.0 vs lib/geminabox/server.rb in geminabox-0.13.1

- old
+ new

@@ -123,11 +123,11 @@ unless self.class.allow_delete? error_response(403, 'Gem deletion is disabled - see https://github.com/cwninja/geminabox/issues/115') end serialize_update do - File.delete file_path if File.exists? file_path + File.delete file_path if File.exist? file_path self.class.reindex(:force_rebuild) redirect url("/") end end @@ -219,11 +219,11 @@ all_gems_with_duplicates.inject(:|) end def all_gems_with_duplicates specs_files_paths.map do |specs_file_path| - if File.exists?(specs_file_path) + if File.exist?(specs_file_path) Marshal.load(Gem.gunzip(Gem.read_binary(specs_file_path))) else [] end end @@ -277,10 +277,10 @@ filename.push(platform) if platform != default_platform spec_file = File.join(settings.data, "quick", "Marshal.#{Gem.marshal_version}", "#{filename.join("-")}.gemspec.rz") File::open(spec_file, 'r') do |unzipped_spec_file| unzipped_spec_file.binmode Marshal.load(Gem.inflate(unzipped_spec_file.read)) - end if File.exists? spec_file + end if File.exist? spec_file end def default_platform 'ruby' end