Skip to content

Commit

Permalink
Merge pull request #19629 from d-m-u/updating_rubyzip_again
Browse files Browse the repository at this point in the history
Update rubyzip to 2.0.0

(cherry picked from commit bc83fb6)

https://bugzilla.redhat.com/show_bug.cgi?id=1783403
  • Loading branch information
jrafanie authored and simaishi committed Dec 13, 2019
1 parent 117a9e0 commit fbeb6ea
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -62,7 +62,7 @@ gem "rake", ">=11.0", :require => false
gem "rest-client", "~>2.0.0", :require => false
gem "ripper_ruby_parser", "~>1.2.0", :require => false
gem "ruby-progressbar", "~>1.7.0", :require => false
gem "rubyzip", "~>1.3.0", :require => false
gem "rubyzip", "~>2.0.0", :require => false
gem "rugged", "~>0.27.0", :require => false
gem "simple-rss", "~>1.3.1", :require => false
gem "snmp", "~>1.2.0", :require => false
Expand Down
5 changes: 0 additions & 5 deletions lib/vmdb/util.rb
Expand Up @@ -96,11 +96,6 @@ def self.log_duration_gz(filename)
end

def self.zip_logs(zip_filename, dirs, userid = "system")
require 'zip/filesystem'
# we need to set this flag to true until we can upgrade to rubyzip 2.0.0
# see https://github.com/rubyzip/rubyzip/pull/403#issue-317103816
Zip.validate_entry_sizes = true

zip_dir = Rails.root.join("data", "user", userid)
FileUtils.mkdir_p(zip_dir) unless File.exist?(zip_dir)

Expand Down
5 changes: 0 additions & 5 deletions spec/lib/vmdb/util_spec.rb
Expand Up @@ -123,11 +123,6 @@ def self.assert_zip_entry_from_path(expected_entry, path)
end

context ".add_zip_entry(private)" do
require 'zip/filesystem'
# we need to set this flag to true until we can upgrade to rubyzip 2.0.0
# see https://github.com/rubyzip/rubyzip/pull/403#issue-317103816
Zip.validate_entry_sizes = true

let(:origin_file) { Tempfile.new 'origin' }
let(:symlink_level_1) { create_temp_symlink 'symlink_level_1', origin_file.path }
let(:symlink_level_2) { create_temp_symlink 'symlink_level_2', symlink_level_1 }
Expand Down

0 comments on commit fbeb6ea

Please sign in to comment.