Sha256: 887758b1e4f382e4b1bde92d2d11b9e8791022cbe6540e4468e340c9ac0acd1d

Contents?: true

Size: 890 Bytes

Versions: 7

Compression:

Stored size: 890 Bytes

Contents

require 'lino'
require_relative 'base'

module RubyFly
  module Commands
    class UnpausePipeline < 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]
        team = opts[:team]

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ruby_fly-0.23.0 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.22.0.pre.2 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.22.0.pre.1 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.21.0 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.20.0.pre.1 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.19.0 lib/ruby_fly/commands/unpause_pipeline.rb
ruby_fly-0.18.0.pre.1 lib/ruby_fly/commands/unpause_pipeline.rb