lib/geminabox/server.rb in geminabox-1.1.0 vs lib/geminabox/server.rb in geminabox-1.1.1

- old
+ new

@@ -128,10 +128,11 @@ end get '/gems/:gemname' do gems = Hash[load_gems.by_name] @gem = gems[params[:gemname]] + @allow_delete = self.class.allow_delete? halt 404 unless @gem erb :gem end delete '/gems/*.gem' do @@ -241,11 +242,11 @@ end def all_gems_with_duplicates specs_files_paths.map do |specs_file_path| if File.exist?(specs_file_path) - Marshal.load(Gem.gunzip(Gem.read_binary(specs_file_path))) + Marshal.load(Gem::Util.gunzip(Gem.read_binary(specs_file_path))) else [] end end end @@ -309,10 +310,10 @@ filename = [gem_name, version] filename.push(platform) if platform != default_platform spec_file = File.join(Geminabox.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)) + Marshal.load(Gem::Util.inflate(unzipped_spec_file.read)) end if File.exist? spec_file end def default_platform 'ruby'