Sha256: 5aaf9757afb7cf73548f3f4f3238bf779666dc3b7ae7ec70eda30055b5b5e487

Contents?: true

Size: 701 Bytes

Versions: 25

Compression:

Stored size: 701 Bytes

Contents

module ThreeScaleToolbox
  module Commands
    module RemoteCommand
      class RemoteRemoveSubcommand < Cri::CommandRunner
        include ThreeScaleToolbox::Command

        def self.command
          Cri::Command.define do
            name        'remove'
            usage       'remove <name>'
            summary     'remote remove'
            description 'Remove remote from list'
            param       :remote_name
            runner RemoteRemoveSubcommand
          end
        end

        def run
          remotes.delete(arguments[:remote_name]) do |el|
            raise ThreeScaleToolbox::Error, "could not remove remote '#{el}'"
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
3scale_toolbox-0.10.0 lib/3scale_toolbox/commands/remote_command/remote_remove.rb
3scale_toolbox-0.9.0 lib/3scale_toolbox/commands/remote_command/remote_remove.rb
3scale_toolbox-0.8.0 lib/3scale_toolbox/commands/remote_command/remote_remove.rb
3scale_toolbox-0.7.0 lib/3scale_toolbox/commands/remote_command/remote_remove.rb
3scale_toolbox-0.6.0 lib/3scale_toolbox/commands/remote_command/remote_remove.rb