zillabyte-cli 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/lib/#zillabyte-cli.rb# +5 -0
- data/lib/zillabyte/api/{flows.rb → apps.rb} +35 -23
- data/lib/zillabyte/api/data.rb +12 -1
- data/lib/zillabyte/api/logs.rb +4 -4
- data/lib/zillabyte/api/queries.rb +15 -6
- data/lib/zillabyte/api/zillalogs.rb +1 -1
- data/lib/zillabyte/api.rb +40 -38
- data/lib/zillabyte/auth.rb +19 -11
- data/lib/zillabyte/cli/#logs.rb# +12 -0
- data/lib/zillabyte/cli/{flows.rb → apps.rb} +407 -177
- data/lib/zillabyte/cli/auth.rb +1 -1
- data/lib/zillabyte/cli/base.rb +5 -4
- data/lib/zillabyte/cli/config.rb +3 -2
- data/lib/zillabyte/cli/counters.rb +1 -1
- data/lib/zillabyte/cli/help.rb +1 -1
- data/lib/zillabyte/cli/helpers/data_schema_builder.rb +1 -1
- data/lib/zillabyte/cli/helpers/table_output_builder.rb +25 -0
- data/lib/zillabyte/cli/log_formatter.rb +4 -3
- data/lib/zillabyte/cli/query.rb +107 -26
- data/lib/zillabyte/cli/relations.rb +226 -78
- data/lib/zillabyte/cli/sources.rb +1 -1
- data/lib/zillabyte/cli/templates/js/simple_function.js +5 -0
- data/lib/zillabyte/cli/templates/python/#simple_function.py# +27 -0
- data/lib/zillabyte/cli/templates/python/simple_function.py +3 -0
- data/lib/zillabyte/cli/templates/ruby/{simple_function.rb → simple_app.rb} +6 -6
- data/lib/zillabyte/cli/templates/ruby/zillabyte.conf.yaml +1 -1
- data/lib/zillabyte/cli/version.rb +1 -1
- data/lib/zillabyte/cli/zillalogs.rb +1 -1
- data/lib/zillabyte/command.rb +10 -2
- data/lib/zillabyte/common/{progress.rb → session.rb} +1 -1
- data/lib/zillabyte/helpers.rb +9 -4
- data/lib/zillabyte-cli/version.rb +1 -1
- data/zillabyte-cli.gemspec +2 -0
- metadata +25 -7
data/lib/zillabyte/helpers.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# require "vendor/zillabyte/okjson"
|
2
|
+
require "json"
|
2
3
|
|
3
4
|
module Zillabyte
|
4
5
|
module Helpers
|
@@ -14,11 +15,15 @@ module Zillabyte
|
|
14
15
|
end
|
15
16
|
|
16
17
|
|
17
|
-
def error(message)
|
18
|
-
|
18
|
+
def error(message, format=nil)
|
19
|
+
if format == "json"
|
20
|
+
$stderr.puts(({"error"=>message}).to_json)
|
21
|
+
else
|
22
|
+
$stderr.puts(format_with_bang(message))
|
23
|
+
end
|
19
24
|
exit(1)
|
20
25
|
end
|
21
|
-
|
26
|
+
|
22
27
|
def format_with_bang(message)
|
23
28
|
return '' if message.to_s.strip == ""
|
24
29
|
" ! " + message.split("\n").join("\n ! ")
|
@@ -46,4 +51,4 @@ module Zillabyte
|
|
46
51
|
end
|
47
52
|
|
48
53
|
end
|
49
|
-
end
|
54
|
+
end
|
data/zillabyte-cli.gemspec
CHANGED
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.require_paths = ["lib"]
|
22
22
|
|
23
23
|
spec.add_development_dependency "rake"
|
24
|
+
#spec.add_development_dependency "pry"
|
24
25
|
|
25
26
|
spec.add_dependency "netrc", "~> 0.7.7"
|
26
27
|
spec.add_dependency "rest-client", "~> 1.6.1"
|
@@ -28,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
28
29
|
spec.add_dependency "excon", "~> 0.31"
|
29
30
|
spec.add_dependency "terminal-table", "~> 1.4"
|
30
31
|
spec.add_dependency "activesupport", "~> 3.2.11"
|
32
|
+
spec.add_dependency "actionpack", "~> 3.2.13"
|
31
33
|
spec.add_dependency "multi_json", "~> 1.0"
|
32
34
|
spec.add_dependency "mini_portile", "~> 0.5.0"
|
33
35
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillabyte-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zillabyte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 3.2.11
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: actionpack
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 3.2.13
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.2.13
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: multi_json
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -229,9 +243,10 @@ extensions: []
|
|
229
243
|
extra_rdoc_files: []
|
230
244
|
files:
|
231
245
|
- bin/zillabyte
|
246
|
+
- lib/#zillabyte-cli.rb#
|
247
|
+
- lib/zillabyte/api/apps.rb
|
232
248
|
- lib/zillabyte/api/base.rb
|
233
249
|
- lib/zillabyte/api/data.rb
|
234
|
-
- lib/zillabyte/api/flows.rb
|
235
250
|
- lib/zillabyte/api/locks.rb
|
236
251
|
- lib/zillabyte/api/logs.rb
|
237
252
|
- lib/zillabyte/api/metrics.rb
|
@@ -242,13 +257,15 @@ files:
|
|
242
257
|
- lib/zillabyte/api/zillalogs.rb
|
243
258
|
- lib/zillabyte/api.rb
|
244
259
|
- lib/zillabyte/auth.rb
|
260
|
+
- lib/zillabyte/cli/#logs.rb#
|
261
|
+
- lib/zillabyte/cli/apps.rb
|
245
262
|
- lib/zillabyte/cli/auth.rb
|
246
263
|
- lib/zillabyte/cli/base.rb
|
247
264
|
- lib/zillabyte/cli/config.rb
|
248
265
|
- lib/zillabyte/cli/counters.rb
|
249
|
-
- lib/zillabyte/cli/flows.rb
|
250
266
|
- lib/zillabyte/cli/help.rb
|
251
267
|
- lib/zillabyte/cli/helpers/data_schema_builder.rb
|
268
|
+
- lib/zillabyte/cli/helpers/table_output_builder.rb
|
252
269
|
- lib/zillabyte/cli/host.rb
|
253
270
|
- lib/zillabyte/cli/log_formatter.rb
|
254
271
|
- lib/zillabyte/cli/query.rb
|
@@ -256,17 +273,18 @@ files:
|
|
256
273
|
- lib/zillabyte/cli/sources.rb
|
257
274
|
- lib/zillabyte/cli/templates/js/simple_function.js
|
258
275
|
- lib/zillabyte/cli/templates/js/zillabyte.conf.yaml
|
276
|
+
- lib/zillabyte/cli/templates/python/#simple_function.py#
|
259
277
|
- lib/zillabyte/cli/templates/python/requirements.txt
|
260
278
|
- lib/zillabyte/cli/templates/python/simple_function.py
|
261
279
|
- lib/zillabyte/cli/templates/python/zillabyte.conf.yaml
|
262
280
|
- lib/zillabyte/cli/templates/ruby/Gemfile
|
263
|
-
- lib/zillabyte/cli/templates/ruby/
|
281
|
+
- lib/zillabyte/cli/templates/ruby/simple_app.rb
|
264
282
|
- lib/zillabyte/cli/templates/ruby/zillabyte.conf.yaml
|
265
283
|
- lib/zillabyte/cli/version.rb
|
266
284
|
- lib/zillabyte/cli/zillalogs.rb
|
267
285
|
- lib/zillabyte/cli.rb
|
268
286
|
- lib/zillabyte/command.rb
|
269
|
-
- lib/zillabyte/common/
|
287
|
+
- lib/zillabyte/common/session.rb
|
270
288
|
- lib/zillabyte/common/tar.rb
|
271
289
|
- lib/zillabyte/common.rb
|
272
290
|
- lib/zillabyte/helpers.rb
|
@@ -299,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
299
317
|
version: '0'
|
300
318
|
requirements: []
|
301
319
|
rubyforge_project:
|
302
|
-
rubygems_version: 2.
|
320
|
+
rubygems_version: 2.1.10
|
303
321
|
signing_key:
|
304
322
|
specification_version: 4
|
305
323
|
summary: The Official Zillabyte CLI Gem
|