def to_args
      args = [
        "--name \"#{name}\"",
        "--version \"#{version}\"",
        "--user \"#{user}\"",
        "--group \"#{group}\"",
        "--iteration \"#{iteration}\"",
        "--homepage \"#{homepage}\"",
        "--home \"#{home}\"",
        "--architecture \"#{architecture}\"",
        "--description \"#{description}\"",
        "--maintainer \"#{maintainer}\"",
        "--vendor \"#{vendor}\""
      ]
      args.push "--dependencies #{dependencies.map{|d| "\"#{d}\""}.join}" unless dependencies.nil? || dependencies.empty?
      args.push "--build-dependencies #{build_dependencies.map{|d| "\"#{d}\""}.join}" unless build_dependencies.nil? || build_dependencies.empty?
      args.push "--compile-cache-dir \"#{compile_cache_dir}\"" unless compile_cache_dir.nil? || compile_cache_dir.empty?
      args.push "--before-precompile \"#{before_precompile}\"" unless before_precompile.nil? || before_precompile.empty?
      args.push "--after-precompile \"#{after_precompile}\"" unless after_precompile.nil? || after_precompile.empty?
      args.push "--before-install \"#{before_install}\"" unless before_install.nil? || before_install.empty?
      args.push "--after-install \"#{after_install}\"" unless after_install.nil? || after_install.empty?
      args.push "--before-remove \"#{before_remove}\"" unless before_remove.nil? || before_remove.empty?
      args.push "--after-remove \"#{after_remove}\"" unless after_remove.nil? || after_remove.empty?

      args.push "--license \"#{license}\"" unless license.nil? || license.empty?
      args.push "--buildpack \"#{buildpack}\"" unless buildpack.nil? || buildpack.empty?
      args.push "--buildpack_list \"#{buildpack_list}\"" unless buildpack_list.nil? || buildpack_list.empty?
      args.push "--force-os \"#{force_os}\"" unless force_os.nil? || force_os.empty?
      args.push "--runner \"#{runner}\"" unless runner.nil? || runner.empty?
      args.push "--logrotate-frequency \"#{logrotate_frequency}\"" unless logrotate_frequency.nil? || logrotate_frequency.empty?
      args.push "--logrotate-backlog \"#{logrotate_backlog}\"" unless logrotate_backlog.nil?
      args.push "--env #{env.variables.map{|v| "\"#{v}\""}.join(" ")}" if env.present?
      args.push "--auto" if auto
      args.push "--verbose" if verbose
      args.push "--store-cache" if store_cache
      args.push "--debug" if debug
      args.push "--verify" if verify
      args.push "--no-clean" if !clean
      args.push "--no-edge" if !edge
      args.push "--tmpdir" if !tmpdir
      args
    end
def to_args
      args = [
        "--name \"#{name}\"",
        "--version \"#{version}\"",
        "--user \"#{user}\"",
        "--group \"#{group}\"",
        "--iteration \"#{iteration}\"",
        "--homepage \"#{homepage}\"",
        "--home \"#{home}\"",
        "--architecture \"#{architecture}\"",
        "--description \"#{description}\"",
        "--maintainer \"#{maintainer}\"",
        "--vendor \"#{vendor}\""
      ]
      args.push "--dependencies #{dependencies.map{|d| "\"#{d}\""}.join}" unless dependencies.nil? || dependencies.empty?
      args.push "--build-dependencies #{build_dependencies.map{|d| "\"#{d}\""}.join}" unless build_dependencies.nil? || build_dependencies.empty?
      args.push "--compile-cache-dir \"#{compile_cache_dir}\"" unless compile_cache_dir.nil? || compile_cache_dir.empty?
      args.push "--before-precompile \"#{before_precompile}\"" unless before_precompile.nil? || before_precompile.empty?
      args.push "--after-precompile \"#{after_precompile}\"" unless after_precompile.nil? || after_precompile.empty?
      args.push "--before-install \"#{before_install}\"" unless before_install.nil? || before_install.empty?
      args.push "--after-install \"#{after_install}\"" unless after_install.nil? || after_install.empty?
      args.push "--before-remove \"#{before_remove}\"" unless before_remove.nil? || before_remove.empty?
      args.push "--after-remove \"#{after_remove}\"" unless after_remove.nil? || after_remove.empty?

      args.push "--license \"#{license}\"" unless license.nil? || license.empty?
      args.push "--buildpack \"#{buildpack}\"" unless buildpack.nil? || buildpack.empty?
      args.push "--buildpack_list \"#{buildpack_list}\"" unless buildpack_list.nil? || buildpack_list.empty?
      args.push "--force-os \"#{force_os}\"" unless force_os.nil? || force_os.empty?
      args.push "--runner \"#{runner}\"" unless runner.nil? || runner.empty?
      args.push "--logrotate-frequency \"#{logrotate_frequency}\"" unless logrotate_frequency.nil? || logrotate_frequency.empty?
      args.push "--logrotate-backlog \"#{logrotate_backlog}\"" unless logrotate_backlog.nil?
      args.push "--env #{env.variables.map{|v| "\"#{v}\""}.join(" ")}" if env.present?
      args.push "--auto" if auto
      args.push "--verbose" if verbose
      args.push "--store-cache" if store_cache
      args.push "--debug" if debug
      args.push "--verify" if verify
      args.push "--no-clean" if !clean
      args.push "--no-edge" if !edge
      args.push "--tmpdir" if !tmpdir
      args
    end
TODO: DRY this with cli.rb