Sha256: 860b862523123b68e756a5881cbdfaed94e079302b01b5f19cd634a3d389883f

Contents?: true

Size: 1.81 KB

Versions: 17

Compression:

Stored size: 1.81 KB

Contents

# frozen_string_literal: true

module Takelage
  # takelage bit scope
  class BitScope < SubCommandBase
    include LoggingModule
    include SystemModule
    include ConfigModule
    include GitCheckMain
    include GitCheckWorkspace
    include BitCheckWorkspace
    include BitScopeAdd
    include BitScopeInbit
    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 inbit
    #
    desc 'inbit', '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 inbit
      exit bit_scope_inbit
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
takelage-0.29.14 lib/takelage/bit/scope/cli.rb
takelage-0.29.13 lib/takelage/bit/scope/cli.rb
takelage-0.29.11 lib/takelage/bit/scope/cli.rb
takelage-0.29.10 lib/takelage/bit/scope/cli.rb
takelage-0.29.8 lib/takelage/bit/scope/cli.rb
takelage-0.29.6 lib/takelage/bit/scope/cli.rb
takelage-0.29.0 lib/takelage/bit/scope/cli.rb
takelage-0.28.26 lib/takelage/bit/scope/cli.rb
takelage-0.28.24 lib/takelage/bit/scope/cli.rb
takelage-0.28.14 lib/takelage/bit/scope/cli.rb
takelage-0.28.11 lib/takelage/bit/scope/cli.rb
takelage-0.28.8 lib/takelage/bit/scope/cli.rb
takelage-0.28.7 lib/takelage/bit/scope/cli.rb
takelage-0.28.5 lib/takelage/bit/scope/cli.rb
takelage-0.27.1 lib/takelage/bit/scope/cli.rb
takelage-0.27.0 lib/takelage/bit/scope/cli.rb
takelage-0.26.7 lib/takelage/bit/scope/cli.rb