Sha256: e1e99a1402f3c72dbabfd10592397134e87a413d2fe7a6a71ac8bd7c85f9fe13

Contents?: true

Size: 682 Bytes

Versions: 17

Compression:

Stored size: 682 Bytes

Contents

# takelage self
module SelfModule

  # Backend method for config self.
  def self_list

    # use Thorfile which requires relative takelage.rb
    thorfile_dir = "#{File.dirname(__FILE__)}/../"

    # use thor list to get the list of commands and subcommands
    cmd_thor_list = "bash -c '" +
        "cd #{thorfile_dir} && " +
        "thor list" +
        "'"
    thor_list = `#{cmd_thor_list}`

    # manipulate thor list output
    thor_list.gsub! "takelage\n", ''
    thor_list.gsub! "------\n", ''
    thor_list.gsub! 'thor ', 'tau '
    thor_list.gsub! /(.*)takelage:c_l_i:(.*)#(.*)/, '\1\2               #\3'
    thor_list.gsub! /.*COMMAND.*\n/, ''

    thor_list
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

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