Module: PolicyManager
- Defined in:
- lib/policy_manager/exporter/zip_generator.rb,
lib/policy_manager.rb,
lib/policy_manager/rule.rb,
lib/policy_manager/config.rb,
lib/policy_manager/engine.rb,
lib/policy_manager/script.rb,
lib/policy_manager/version.rb,
lib/policy_manager/exporter.rb,
lib/policy_manager/anonimizer.rb,
app/models/policy_manager/term.rb,
lib/policy_manager/exporter/view.rb,
app/models/policy_manager/user_term.rb,
lib/policy_manager/exporter/handler.rb,
lib/policy_manager/portability_rule.rb,
app/jobs/policy_manager/exporter_job.rb,
lib/policy_manager/exporter/json_link.rb,
lib/policy_manager/exporter/json_view.rb,
app/helpers/policy_manager/terms_helper.rb,
app/jobs/policy_manager/application_job.rb,
app/helpers/policy_manager/scripts_helper.rb,
app/helpers/policy_manager/exporter_helper.rb,
lib/policy_manager/bootstrap_link_renderer.rb,
app/helpers/policy_manager/user_terms_helper.rb,
app/models/policy_manager/application_record.rb,
app/helpers/policy_manager/application_helper.rb,
app/mailers/policy_manager/application_mailer.rb,
app/mailers/policy_manager/portability_mailer.rb,
app/models/policy_manager/portability_request.rb,
lib/policy_manager/exporter/paginator_renderer.rb,
app/controllers/policy_manager/terms_controller.rb,
lib/generators/policy_manager/paperclip_generator.rb,
app/controllers/policy_manager/exporter_controller.rb,
app/controllers/policy_manager/categories_controller.rb,
app/controllers/policy_manager/user_terms_controller.rb,
app/controllers/policy_manager/application_controller.rb,
app/helpers/policy_manager/portability_requests_helper.rb,
app/helpers/policy_manager/user_portability_requests_helper.rb,
app/controllers/policy_manager/portability_requests_controller.rb,
app/controllers/policy_manager/user_portability_requests_controller.rb
Overview
This is a simple example which uses rubyzip to recursively generate a zip file from the contents of a specified directory. The directory itself is not included in the archive, rather just its contents.
Usage:
directory_to_zip = "/tmp/input"
output_file = "/tmp/out.zip"
zf = ZipFileGenerator.new(directory_to_zip, output_file)
zf.write()
Defined Under Namespace
Modules: ApplicationHelper, ExporterHelper, Generators, PortabilityRequestsHelper, ScriptsHelper, TermsHelper, UserPortabilityRequestsHelper, UserTermsHelper Classes: Anonimizer, ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, BootstrapLinkRenderer, CategoriesController, Config, Engine, Exporter, ExporterController, ExporterHandler, ExporterJob, ExporterView, JsonExporterView, JsonLink, PaginatorRenderer, PortabilityMailer, PortabilityRequest, PortabilityRequestsController, PortabilityRule, Rule, Script, Term, TermsController, UserPortabilityRequestsController, UserTerm, UserTermsController, ZipGenerator
Constant Summary collapse
- VERSION =
'0.5.1'