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.8.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.8.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.7.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.7.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.6.2 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.6.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.6.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.5.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.4.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.5 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.4 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.3 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.2 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.3.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.2.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.1.1 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.1.0 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.9 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb
capistrano_multiconfig_parallel-2.0.8 lib/capistrano_multiconfig_parallel/helpers/capistrano_helper.rb