Sha256: 173dc699a5dc4ca891b49d82df8200e54b2ecf83bf6b05d1ce7cb58f1ff765f9

Contents?: true

Size: 767 Bytes

Versions: 38

Compression:

Stored size: 767 Bytes

Contents

module CapistranoMulticonfigParallel
  # helper methods used for capistrano actions
  module CapistranoHelper
  module_function

    def filtered_env_keys_format(keys, version = false)
      keys.map { |key| env_key_format(key, version) }
    end

    def env_prefix(key, version = false)
      key != CapistranoMulticonfigParallel.env_job_key_id && version == true ? '-S' : ''
    end

    def env_key_format(key, version = false)
      version == true ? key.downcase : key
    end

    def trace_flag(version = false)
      version == true ? '--verbose' : '--trace'
    end

    def setup_flags_for_job(options)
      array_options = []
      options.each do |key, value|
        array_options << "--#{key}=#{value}"
      end
      array_options
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
capistrano_multiconfig_parallel-2.0.6 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.5 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.4 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.3 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc7 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc6 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc5 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc4 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc3 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc2 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.rc1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.beta5 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.beta4 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.beta3 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.beta2 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.0.beta1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb