Class: KRL_CMD::CLI
- Inherits:
-
Thor
- Object
- Thor
- KRL_CMD::CLI
- Defined in:
- lib/cli.rb
Instance Method Summary collapse
- #account_stats ⇒ Object
- #apps ⇒ Object
- #check ⇒ Object
-
#checkout(ruleset = "") ⇒ Object
method_option :ruleset, :type => :string, :default => false, :aliases => “-r”, :banner => “Ruleset ID, example: a1x1”.
- #commit ⇒ Object
- #create(name) ⇒ Object
- #deploy ⇒ Object
- #generate(endpoint) ⇒ Object
- #info ⇒ Object
- #logging ⇒ Object
- #note ⇒ Object
- #show ⇒ Object
- #stats ⇒ Object
- #stats_interface ⇒ Object
- #stats_query ⇒ Object
- #test ⇒ Object
- #update ⇒ Object
- #versions ⇒ Object
Instance Method Details
#account_stats ⇒ Object
170 171 172 173 174 175 176 |
# File 'lib/cli.rb', line 170 def account_stats begin KRL_CMD::Stats.account_kpis() rescue => e say e., :red end end |
#check ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/cli.rb', line 103 def check begin KRL_CMD::Check.go() rescue => e say e., :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? && ["all"].nil? say "Please specify either --ruleset or --all", :red say help "checkout" else KRL_CMD::Checkout.go(ruleset, ) end end |
#commit ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/cli.rb', line 72 def commit begin KRL_CMD::Commit.go() rescue => e say e., :red end end |
#create(name) ⇒ Object
34 35 36 |
# File 'lib/cli.rb', line 34 def create(name) KRL_CMD::Create.go(name, ) end |
#deploy ⇒ Object
61 62 63 64 65 66 67 |
# File 'lib/cli.rb', line 61 def deploy begin KRL_CMD::Deploy.go() rescue => e say e., :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, ) rescue => e say e., :red end end |
#info ⇒ Object
139 140 141 142 143 144 145 |
# File 'lib/cli.rb', line 139 def info begin KRL_CMD::Info.go() rescue => e say e., :red end end |
#logging ⇒ Object
180 181 182 183 184 185 186 |
# File 'lib/cli.rb', line 180 def logging begin KRL_CMD::Stats.logging() rescue => e say e., :red end end |
#note ⇒ Object
93 94 95 96 97 98 99 |
# File 'lib/cli.rb', line 93 def note begin KRL_CMD::Note.go() rescue => e say e., :red end end |
#show ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/cli.rb', line 82 def show begin KRL_CMD::Show.go() rescue => e say e., :red end end |
#stats ⇒ Object
150 151 152 153 154 155 156 |
# File 'lib/cli.rb', line 150 def stats begin KRL_CMD::Stats.kpis() rescue => e say e., :red end end |
#stats_interface ⇒ Object
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., :red end end |
#stats_query ⇒ Object
217 218 219 220 221 222 223 |
# File 'lib/cli.rb', line 217 def stats_query begin KRL_CMD::Stats.query() rescue => e say e., :red end end |
#test ⇒ Object
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 |