Sha256: db2cbe760722a9e8ef2b50f4f17563c5112e3c666f48a31d01e3973413e2bbdc

Contents?: true

Size: 848 Bytes

Versions: 20

Compression:

Stored size: 848 Bytes

Contents

# frozen_string_literal: true

require 'lino'
require_relative 'base'

module RubyHelm
  module Commands
    class Install < Base
      # rubocop:disable Metrics/MethodLength
      def configure_command(builder, opts)
        chart = opts[:chart]
        name = opts[:name]
        values = opts[:values] || {}

        paired_values = values.map do |key, value|
          "#{key}=#{value}"
        end

        builder.with_subcommand('install') do |sub|
          unless values.empty?
            sub = sub.with_option(
              '--set',
              paired_values.join(','),
              separator: ' '
            )
          end
          sub = sub.with_option('--name', name, separator: ' ') if name
          sub
        end
               .with_argument(chart)
      end
      # rubocop:enable Metrics/MethodLength
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ruby_helm-0.6.0.pre.2 lib/ruby_helm/commands/install.rb
ruby_helm-0.6.0.pre.1 lib/ruby_helm/commands/install.rb
ruby_helm-0.5.0 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.6 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.5 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.4 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.3 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.2 lib/ruby_helm/commands/install.rb
ruby_helm-0.4.0.pre.1 lib/ruby_helm/commands/install.rb
ruby_helm-0.3.0 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.10 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.9 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.8 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.7 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.6 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.5 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.4 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.3 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.2 lib/ruby_helm/commands/install.rb
ruby_helm-0.2.0.pre.1 lib/ruby_helm/commands/install.rb