Sha256: 075ae013e915d1327a06f2e8e9c5c984cb59e1f13f907764a35381410d84096a

Contents?: true

Size: 795 Bytes

Versions: 26

Compression:

Stored size: 795 Bytes

Contents

require 'lino'
require_relative 'base'

module RubyFly
  module Commands
    class GetPipeline < Base
      def configure_command(builder, opts)
        missing_params = [
            :target,
            :pipeline
        ].select { |param| opts[param].nil? }

        unless missing_params.empty?
          description = missing_params.map { |p| "'#{p}'" }.join(', ')
          raise(
              ArgumentError,
              "Error: #{description} required but not provided.")
        end

        target = opts[:target]
        pipeline = opts[:pipeline]

        builder
            .with_subcommand('get-pipeline') do |sub|
              sub = sub.with_option('-t', target)
              sub = sub.with_option('-p', pipeline)
              sub
            end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ruby_fly-0.23.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.22.0.pre.2 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.22.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.21.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.20.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.19.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.18.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.17.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.16.0.pre.2 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.16.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.15.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.14.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.13.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.12.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.11.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.10.0.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.9.0 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.8.0.pre.pre.2 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.8.0.pre.pre.1 lib/ruby_fly/commands/get_pipeline.rb
ruby_fly-0.7.0 lib/ruby_fly/commands/get_pipeline.rb