Sha256: 44c8858f8f9d1cf52af983d3156814a575d0e1483744f7e6d4795da301358783

Contents?: true

Size: 1.8 KB

Versions: 6

Compression:

Stored size: 1.8 KB

Contents

# frozen_string_literal: true

module Takeltau
  # takeltau bit scope
  class BitScope < SubCommandBase
    include LoggingModule
    include SystemModule
    include ConfigModule
    include GitCheckBit
    include GitCheckWorkspace
    include BitCheckWorkspace
    include BitScopeAdd
    include BitScopeSSH
    include BitScopeList
    include BitScopeNew

    #
    # bit scope add
    #
    desc 'add [SCOPE]', 'Add a bit [SCOPE]'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Add bit remote scope
    This command will add a bit remote scope to a local bit workspace.
    The scope must exist on the bit remote server.
    LONGDESC
    # Add bit remote scope.
    def add(scope)
      exit bit_scope_add scope
    end

    #
    # bit scope new
    #
    desc 'new [SCOPE]', 'Init a new bit [SCOPE]'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Create new bit remote scope
    This command will create a new directory on the remote bit server.
    Then it will run "bit init --bare" in the newly created directory.
    See the bit documentation: http://docs.bit.dev/docs/bit-server
    LONGDESC
    # Create new bit remote scope.
    def new(scope)
      exit bit_scope_new scope
    end

    #
    # bit scope list
    #
    desc 'list', 'List bit remote scopes'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    List bit remote scopes
    This command will list bit remote scopes.
    LONGDESC
    # List bit remote scopes.
    def list
      scopes = bit_scope_list
      exit false if scopes == false
      say scopes unless scopes.to_s.chomp.empty?
      true
    end

    #
    # bit scope ssh
    #
    desc 'ssh', 'Log in to bit remote server'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Log in to bit remote server
    LONGDESC
    # Log in to bit remote server.
    def ssh
      exit bit_scope_ssh
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
takeltau-0.34.15 lib/takeltau/bit/scope/cli.rb
takeltau-0.34.14 lib/takeltau/bit/scope/cli.rb
takeltau-0.34.13 lib/takeltau/bit/scope/cli.rb
takeltau-0.34.12 lib/takeltau/bit/scope/cli.rb
takeltau-0.34.11 lib/takeltau/bit/scope/cli.rb
takeltau-0.34.9 lib/takeltau/bit/scope/cli.rb