Class: KRL_CMD::CLI

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

Instance Method Summary collapse

Instance Method Details

#account_statsObject



170
171
172
173
174
175
176
# File 'lib/cli.rb', line 170

def 
  begin
    KRL_CMD::Stats.(options)
  rescue => e
    say e.message, :red
  end
end

#appsObject



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

def apps
  KRL_CMD::Apps.go
end

#checkObject



103
104
105
106
107
108
109
# File 'lib/cli.rb', line 103

def check
  begin
    KRL_CMD::Check.go(options)
  rescue => e
    say e.message, :red
  end
end

#checkout(ruleset = "") ⇒ Object

method_option :ruleset, :type => :string, :default => false, :aliases => “-r”, :banner => “Ruleset ID, example: a1x1”



22
23
24
25
26
27
28
29
# File 'lib/cli.rb', line 22

def checkout(ruleset="")
  if ruleset.empty? && options["all"].nil?
    say "Please specify either --ruleset or --all", :red
    say help "checkout"
  else
    KRL_CMD::Checkout.go(ruleset, options)
  end
end

#commitObject



72
73
74
75
76
77
78
# File 'lib/cli.rb', line 72

def commit 
  begin
    KRL_CMD::Commit.go(options)
  rescue => e
    say e.message, :red
  end
end

#create(name) ⇒ Object



34
35
36
# File 'lib/cli.rb', line 34

def create(name)
  KRL_CMD::Create.go(name, options)
end

#deployObject



61
62
63
64
65
66
67
# File 'lib/cli.rb', line 61

def deploy
  begin
    KRL_CMD::Deploy.go(options)
  rescue => e
    say e.message, :red
  end
end

#generate(endpoint) ⇒ Object



123
124
125
126
127
128
129
# File 'lib/cli.rb', line 123

def generate(endpoint)
  begin
    KRL_CMD::Generate.go(endpoint, options)
  rescue => e
    say e.message, :red
  end
end

#infoObject



139
140
141
142
143
144
145
# File 'lib/cli.rb', line 139

def info
  begin
    KRL_CMD::Info.go(options)
  rescue => e
    say e.message, :red
  end
end

#loggingObject



180
181
182
183
184
185
186
# File 'lib/cli.rb', line 180

def logging
  begin
    KRL_CMD::Stats.logging(options)
  rescue => e
    say e.message, :red
  end
end

#noteObject



93
94
95
96
97
98
99
# File 'lib/cli.rb', line 93

def note
  begin
    KRL_CMD::Note.go(options)
  rescue => e
    say e.message, :red
  end
end

#showObject



82
83
84
85
86
87
88
# File 'lib/cli.rb', line 82

def show
  begin
    KRL_CMD::Show.go(options)
  rescue => e
    say e.message, :red
  end
end

#statsObject



150
151
152
153
154
155
156
# File 'lib/cli.rb', line 150

def stats
  begin
    KRL_CMD::Stats.kpis(options)
  rescue => e
    say e.message, :red
  end
end

#stats_interfaceObject



159
160
161
162
163
164
165
# File 'lib/cli.rb', line 159

def stats_interface
  begin
    KRL_CMD::Stats.interface
  rescue => e
    say e.message, :red
  end
end

#stats_queryObject



217
218
219
220
221
222
223
# File 'lib/cli.rb', line 217

def stats_query
  begin
    KRL_CMD::Stats.query(options)
  rescue => e
    say e.message, :red
  end
end

#testObject



132
133
134
135
# File 'lib/cli.rb', line 132

def test
  say "'test' has been deprecated. Use 'generate -e dev'", :red
  help "generate"
end

#updateObject



41
42
43
44
45
46
47
# File 'lib/cli.rb', line 41

def update
  begin
    KRL_CMD::Update.go(options)
  rescue => e
    say e.message, :red
  end
end

#versionsObject



51
52
53
54
55
56
57
# File 'lib/cli.rb', line 51

def versions
  begin
    KRL_CMD::Versions.go(options)
  rescue => e
    say e.message, :red
  end
end