Class: CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/teuton-get/cli.rb

Instance Method Summary collapse

Instance Method Details

#create_info(testpath = ".") ⇒ Object



24
25
26
27
# File 'lib/teuton-get/cli.rb', line 24

def create_info(testpath = ".")
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.create_info(testpath)
end

#create_repoObject



35
36
37
38
# File 'lib/teuton-get/cli.rb', line 35

def create_repo
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.create_repo(".")
end

#initObject



57
58
59
60
# File 'lib/teuton-get/cli.rb', line 57

def init
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.init
end

#pull(testid, dirpath = ".") ⇒ Object



46
47
48
49
# File 'lib/teuton-get/cli.rb', line 46

def pull(testid, dirpath = ".")
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.download(testid, dirpath)
end

#refreshObject



97
98
99
100
# File 'lib/teuton-get/cli.rb', line 97

def refresh
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.refresh
end

#reposObject



86
87
88
89
# File 'lib/teuton-get/cli.rb', line 86

def repos
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.show_repo_list(options)
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


116
117
118
119
# File 'lib/teuton-get/cli.rb', line 116

def respond_to_missing?(method_name, include_private = false)
  # Respond to missing methods name
  super
end

#search(filter) ⇒ Object



111
112
113
114
# File 'lib/teuton-get/cli.rb', line 111

def search(filter)
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.search(filter, options)
end

#show(test_id) ⇒ Object



71
72
73
74
# File 'lib/teuton-get/cli.rb', line 71

def show(test_id)
  TeutonGet::Format.disable if options["color"] == false
  TeutonGet.show_info(test_id, options)
end

#versionObject



13
14
15
# File 'lib/teuton-get/cli.rb', line 13

def version
  puts "#{TeutonGet::EXECUTABLE} version #{TeutonGet::VERSION}"
end