Skip to content

Commit

Permalink
Merge pull request #400 from d-m-u/fixing_zip_requires_that_i_just_broke
Browse files Browse the repository at this point in the history
Add back missing requires for rubyzip
  • Loading branch information
gmcculloug committed Dec 12, 2019
2 parents a4c31f6 + 09524e4 commit 309f9be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/miq_ae_yaml_export_zipfs.rb
Expand Up @@ -18,6 +18,7 @@ def write_data(base_path, export_hash)
end

def export
require 'zip/filesystem'
Zip::File.open(@temp_file_name, Zip::File::CREATE) do |zf|
@zip_file = zf
write_model
Expand Down
1 change: 1 addition & 0 deletions app/models/miq_ae_yaml_import_zipfs.rb
Expand Up @@ -6,6 +6,7 @@ def initialize(domain, options)
end

def load_zip
require 'zip/filesystem'
raise MiqAeException::FileNotFound, "import file: #{@options['zip_file']} not found" \
unless File.exist?(@options['zip_file'])
@zip = Zip::File.open(@options['zip_file'])
Expand Down
1 change: 1 addition & 0 deletions spec/models/miq_ae_yaml_import_export_spec.rb
Expand Up @@ -975,6 +975,7 @@ def check_class_component_counts(counts)
end

def create_bogus_zip_file
require 'zip/filesystem'
Zip::File.open(@zip_file, Zip::File::CREATE) do |zh|
zh.file.open("first.txt", "w") { |f| f.puts "Hello world" }
zh.dir.mkdir("mydir")
Expand Down

0 comments on commit 309f9be

Please sign in to comment.