use rubyzip version 1.1.0

allows the creation of zip files over 4GB

fixes #CNVS-10492

Change-Id: Ia7bb37937572d8b11be3d0072a807217ab480ef3
Reviewed-on: https://gerrit.instructure.com/31069
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
This commit is contained in:
James Williams 2014-02-28 09:05:57 -07:00
parent 39f937f72e
commit 7a3785e1dd
5 changed files with 7 additions and 4 deletions

View File

@ -168,7 +168,7 @@ gem 'rscribd', '1.2.0'
gem 'net-ldap', '0.3.1', :require => 'net/ldap'
gem 'ruby-saml-mod', '0.1.24'
gem 'rubycas-client', '2.2.1'
gem 'rubyzip', '1.0.0', :require => 'zip'
gem 'rubyzip', '1.1.0', :require => 'zip', :github => 'rubyzip/rubyzip', :ref => '2697c7ea4fba6dca66acd4793965501b06ea8df6'
gem 'zip-zip', '0.2' # needed until plugins use the new namespace
gem 'safe_yaml', '0.9.7', :require => false
gem 'safe_yaml-instructure', '0.8.0', :require => false

View File

@ -5,6 +5,8 @@
require 'zip'
Zip.write_zip64_support = true
Zip::Entry::class_eval do
def fix_name_encoding
@name.force_encoding('UTF-8')

View File

@ -66,7 +66,7 @@ module Canvas::Migration
else
:unknown
end
rescue Zip::ZipError
rescue Zip::Error
# Not a valid zip file
:invalid_archive
end

View File

@ -97,7 +97,8 @@ describe Quizzes::QuizSubmissionZipper do
zip_attachment: attachment).zip!
attachment.reload
attachment.should be_zipped
names = Zip::File.foreach(attachment.full_filename) { |f| f.name }
names = []
Zip::File.foreach(attachment.full_filename) { |f| names << f.name }
names.length.should == 1
names.first.should == "user#{student.id}_question_#{question.id}_#{attach.id}_#{attach.display_name}"
end

View File

@ -1,3 +1,3 @@
gem 'moodle2cc', '0.1.11'
gem 'moodle2cc', '0.1.12'
gem 'happymapper', '0.4.1'
gem 'thor', '0.18.1'