Sha256: a1188d613e4608243e2ddb50551e37e39df844755bff587a53412aa052d7d501

Contents?: true

Size: 565 Bytes

Versions: 3

Compression:

Stored size: 565 Bytes

Contents

module Braid
  module Commands
    class Remove < Command
      def run(mirror)
        in_work_branch do
          params = config.get(mirror)
          unless params
            msg "Mirror '#{mirror}/' does not exist."
            return
          end

          msg "Removing #{params["type"]} mirror from '#{mirror}/'."

          invoke(:git_rm_r, mirror)

          config.remove(mirror)
          add_config_file

          commit_message = "Remove mirror '#{mirror}/'."
          invoke(:git_commit, commit_message)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evilchelu-braid-0.3.5 lib/braid/commands/remove.rb
evilchelu-braid-0.3.6 lib/braid/commands/remove.rb
evilchelu-braid-0.3.7 lib/braid/commands/remove.rb