Sha256: 6ead40cb33dbed8dfd612ae1122e3ed405b8b1b84c8ee60c7ca3d80a6a3bc782

Contents?: true

Size: 1.98 KB

Versions: 18

Compression:

Stored size: 1.98 KB

Contents

require 'pathname'

module Takelage

  # takelage bit
  class BitClipboard < SubCommandBase

    include LoggingModule
    include ConfigModule
    include SystemModule
    include GitCheckModule
    include BitCheckModule
    include BitClipboardModule

    #
    # bit copy
    #
    desc 'copy [DIR] [SCOPE]', 'Copy new [DIR] to [SCOPE]'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Copy a directory as a bit component to a bit remote scope
    This command will add a directory as a bit component and tag it.
    The id of the component will be created from the directory name.
    The directory needs to contain a README.bit file 
    or else a new README.bit file will be created.
    The README.bit will be the main file of the component which must not be deleted.
    The tagged bit component will be exported to a bit remote scope.
    LONGDESC
    # Copy a file or directory as a bit component to a bit remote scope.
    def copy(dir_or_file, scope)
      exit bit_clipboard_copy dir_or_file, scope
    end

    #
    # bit paste
    #
    desc 'paste [COMPONENT] [DIR]', 'Paste bit [COMPONENT] into [DIR]'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Paste a bit component into a directory
    LONGDESC
    # Paste a bit component into a directory.
    def paste(cid, dir)
      exit bit_clipboard_paste cid, dir
    end

    #
    # bit pull
    #
    desc 'pull', 'Pull all updates for bit components from bit remote scopes'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Pull all updates for bit components from bit remote scopes
    LONGDESC
    # Pull all updates for bit components from bit remote scopes.
    def pull
      exit bit_clipboard_pull
    end

    #
    # bit push
    #
    desc 'push', 'Push all updates of bit components to bit remote scopes'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Push all updates of bit components to bit remote scopes
    LONGDESC
    # Push all updates of bit components to bit remote scopes.
    def push
      exit bit_clipboard_push
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
takelage-0.13.2 lib/takelage/bit/clipboard/cli.rb
takelage-0.13.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.13.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.12.2 lib/takelage/bit/clipboard/cli.rb
takelage-0.12.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.12.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.11.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.11.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.10.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.9.2 lib/takelage/bit/clipboard/cli.rb
takelage-0.9.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.9.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.8.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.8.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.7.2 lib/takelage/bit/clipboard/cli.rb
takelage-0.7.1 lib/takelage/bit/clipboard/cli.rb
takelage-0.7.0 lib/takelage/bit/clipboard/cli.rb
takelage-0.6.0 lib/takelage/bit/clipboard/cli.rb