passbook icon indicating copy to clipboard operation
passbook copied to clipboard

Multiple Compressor support

Open frozon opened this issue 10 years ago • 0 comments

Ok, here is an implementation in order to support multiple compressor.

To add a new one, juste create another compressor with this skeleton:

require 'passbook/compressors/base'

module Passbook
  module Compressor

    class COMPRESSOR_NAME < Base

      ###
      # Human-readable name of the compressors
      #
      def name
        "COMPRESSOR_NAME"
      end

      ###
      # Output zip string
      #
      def outputZip pass, files, manifest, signature
        # Your compression process
      end

    end

  end
end

Do not forget to run tests and add the compressor name to all_compressors in lib/passbook/compressor.rb

frozon avatar Jun 26 '14 06:06 frozon