Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back missing requires for rubyzip #400

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/models/miq_ae_yaml_export_zipfs.rb
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions app/models/miq_ae_yaml_import_zipfs.rb
Original file line number Diff line number Diff line change
@@ -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'])
1 change: 1 addition & 0 deletions spec/models/miq_ae_yaml_import_export_spec.rb
Original file line number Diff line number Diff line change
@@ -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")