Sha256: 38dbe97fd254dce735ca20e6fe4fdea808c9b6204959dcd5df2e3d272d39c1cb

Contents?: true

Size: 671 Bytes

Versions: 15

Compression:

Stored size: 671 Bytes

Contents

module ZendeskAppsTools

  require 'zendesk_apps_support'

  module PackageHelper

    include ZendeskAppsSupport

    def app_package
      @app_package ||= Package.new(self.app_dir.to_s)
    end

    def zip(archive_path)
      Zip::ZipFile.open(archive_path, 'w') do |zipfile|
        app_package.files.each do |file|
          path = file.relative_path
          say_status "package", "adding #{path}"

          # resolve symlink to source path
          if File.symlink? file.absolute_path
            path = File.readlink(file.absolute_path)
          end
          zipfile.add(file.relative_path, app_dir.join(path).to_s)
        end
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
zendesk_apps_tools-1.20.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.19.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.18.2 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.18.1 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.18.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.17.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.15.1 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.15.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.14.2 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.14.1 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.14.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.13.2 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.13.1 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.13.0 lib/zendesk_apps_tools/package_helper.rb
zendesk_apps_tools-1.12.0 lib/zendesk_apps_tools/package_helper.rb