zillabyte-cli 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e9e56f44ff01e3417f093c4c67b5da5bb015ecaf
4
- data.tar.gz: e93688302a3f84c692fca0e25cf5f99407415267
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YjI4NWRmN2UxNWE4MGJhOWRiZGU1ZjYwMzdlMjgyZmNlMmQ4MzdjOQ==
5
+ data.tar.gz: !binary |-
6
+ NDdmYTAxNjQzZjRlMTljYzBjMGE3M2NmNmYwNDAwODIwYmNmNDViMA==
5
7
  SHA512:
6
- metadata.gz: 4a74eb133a070285150df3f401215d1ac52b6bdfe0cf6925efebe6cd08eee769ee35069c0aa1eb56e89da7f2e20bbe172072e2a44c94c9c635aecb118edd782a
7
- data.tar.gz: 4e0fc742cb3396d2f3ac9164898055247cb4e7c7a698782dafa9396545bd0b3a74d7a4be3a523d6d3e293404a7df3d329397382cb6b5f44cc4ddb036af8799a9
8
+ metadata.gz: !binary |-
9
+ NjkxNWFhZDJhZmQ1YTUyNTU3YzhkMWU0ZGY2ZmM1ZmI4M2FlYWMwMzBmOTdl
10
+ MjIyMzAwOWJiMjhmZjM0Y2QzZDVhZjI5MjQwYzVkOWJhNDRiYzI3OWNiNjg3
11
+ NjczNGQxYWI5MDY4YzI1ZDNmYTNlYjhjMjVlZjY3YTViMTE4YzI=
12
+ data.tar.gz: !binary |-
13
+ N2UzNDY1MTA2MjBiNDY2YzZjYmIyYjM3OWFkYjEwMzExMmMyNGZlNmE2OGVk
14
+ OTRiNTAzYzgxYzY3NTdmZTk1ZDYxNjg0NWI2ZjQyYzc5NTEyMzdmMzcwMmEx
15
+ YzcxZDNlMjAwOWRjOThjN2U3ZWY1OWM0ZWIyYTI2MzE0NTk0ZjQ=
@@ -1,5 +1,5 @@
1
1
  module Zillabyte
2
2
  module CLI
3
- VERSION = "0.1.30"
3
+ VERSION = "0.1.31"
4
4
  end
5
5
  end
@@ -62,8 +62,9 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
62
62
  # Uploads an app.
63
63
  #
64
64
  # --config CONFIG_FILE # Use the given config file
65
- # --directory DIR # App directory
65
+ # --dir DIR # App directory
66
66
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
67
+ # --public # Make the flow public
67
68
  #
68
69
  # Examples:
69
70
  #
@@ -79,7 +80,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
79
80
  # Pulls an app source to a directory.
80
81
  #
81
82
  # --force # Pulls even if the directory exists
82
- # --directory DIR # App directory
83
+ # --dir DIR # App directory
83
84
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
84
85
  #
85
86
  # Examples:
@@ -107,7 +108,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
107
108
  #
108
109
  # Performs any necessary initialization for the app.
109
110
  #
110
- # --directory DIR # App directory
111
+ # --dir DIR # App directory
111
112
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
112
113
  # --mode MODE # Specify development or production mode for dependencies #HIDDEN
113
114
  #
@@ -133,7 +134,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
133
134
  error("name required") if name.nil?
134
135
 
135
136
  lang = options[:lang] || options[:language] || "ruby"
136
- dir = options[:dir] || options[:directory] || Dir.pwd
137
+ dir = options[:dir] || Dir.pwd
137
138
  remote = options[:remote] || "zillabyte"
138
139
 
139
140
  dir = File.expand_path(dir) unless dir.nil?
@@ -281,7 +282,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
281
282
  # --config CONFIG_FILE # Use the given config file
282
283
  # --output OUTPUT_FILE # Writes sink output to a file
283
284
  # --cycles CYCLES # Number of cycles to emit [default: 1]
284
- # --directory DIR # App directory
285
+ # --dir DIR # App directory
285
286
  # -i, --interactive # Interactively control input and read output
286
287
  #
287
288
  def test
@@ -306,7 +307,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
306
307
  # Runs a local app with live data.
307
308
  #
308
309
  # --config CONFIG_FILE # Use the given config file
309
- # --directory DIR # App directory
310
+ # --dir DIR # App directory
310
311
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
311
312
  #
312
313
  # HIDDEN:
@@ -320,7 +321,7 @@ class Zillabyte::Command::Apps < Zillabyte::Command::Flows
320
321
  # Outputs the info for the app in the dir.
321
322
  #
322
323
  # --pretty # Pretty prints the info output
323
- # --directory DIR # App directory
324
+ # --dir DIR # App directory
324
325
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
325
326
  #
326
327
  def info
@@ -33,7 +33,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
33
33
  error("name required") if name.nil?
34
34
 
35
35
  lang = options[:lang] || options[:language] || "ruby"
36
- dir = options[:dir] || options[:directory] || Dir.pwd
36
+ dir = options[:dir] || Dir.pwd
37
37
  remote = options[:remote] || "zillabyte"
38
38
 
39
39
  dir = File.expand_path(dir) unless dir.nil?
@@ -98,7 +98,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
98
98
  # Pulls a component source to a directory.
99
99
  #
100
100
  # --force # Pulls even if the directory exists
101
- # --directory DIR # Component directory
101
+ # --dir DIR # Component directory
102
102
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
103
103
  #
104
104
  # Examples:
@@ -127,7 +127,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
127
127
  # Outputs the info for the component in the dir.
128
128
  #
129
129
  # --pretty # Pretty prints the info output
130
- # --directory DIR # Component directory
130
+ # --dir DIR # Component directory
131
131
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
132
132
  #
133
133
  def info
@@ -142,7 +142,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
142
142
  # --config CONFIG_FILE # Use the given config file
143
143
  # --input INPUT_FILE # Uses a CSV for component input
144
144
  # --output OUTPUT_FILE # Write output to a CSV
145
- # --directory DIR # Component directory
145
+ # --dir DIR # Component directory
146
146
  #
147
147
  def test
148
148
  super
@@ -152,7 +152,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
152
152
  #
153
153
  # Performs any necessary initialization for the component.
154
154
  #
155
- # --directory DIR # Component directory
155
+ # --dir DIR # Component directory
156
156
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json HIDDEN
157
157
  #
158
158
  def prep
@@ -176,7 +176,7 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
176
176
  # Runs a local component with live data.
177
177
  #
178
178
  # --config CONFIG_FILE # Use the given config file
179
- # --directory DIR # Component directory
179
+ # --dir DIR # Component directory
180
180
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json HIDDEN
181
181
  #
182
182
  # HIDDEN:
@@ -190,7 +190,8 @@ class Zillabyte::Command::Components < Zillabyte::Command::Flows
190
190
  # Uploads a component.
191
191
  #
192
192
  # --config CONFIG_FILE # Use the given config file
193
- # --directory DIR # Component directory
193
+ # --dir DIR # Component directory
194
+ # --public # Make the flow public
194
195
  #
195
196
  # Examples:
196
197
  #
@@ -12,7 +12,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
12
12
  # Pulls a flow source to a directory.
13
13
  #
14
14
  # --force # Pulls even if the directory exists
15
- # --directory DIR # Flow directory
15
+ # --dir DIR # Flow directory
16
16
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
17
17
  #
18
18
  # Examples:
@@ -24,7 +24,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
24
24
  flow_id = options[:id] || shift_argument
25
25
  type = options[:output_type]
26
26
 
27
- dir = options[:directory] || shift_argument
27
+ dir = options[:dir] || shift_argument
28
28
  error("no directory given", type) if dir.nil?
29
29
  dir = File.expand_path(dir)
30
30
 
@@ -60,18 +60,18 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
60
60
  # Uploads a flow.
61
61
  # --force # Don't ask for confirmation
62
62
  # --config CONFIG_FILE # Use the given config file
63
- # --directory DIR # Flow directory
63
+ # --dir DIR # Flow directory
64
64
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
65
+ # --public # Make the flow public
65
66
  #
66
67
  def push
67
68
  since = Time.now.utc.to_s
68
- dir = options[:directory]
69
+ dir = options[:dir]
69
70
  if dir.nil?
70
71
  dir = Dir.pwd
71
72
  else
72
73
  dir = File.expand_path(dir)
73
74
  end
74
- options[:directory] = dir
75
75
  type = options[:output_type]
76
76
  forced = options[:force]
77
77
 
@@ -145,7 +145,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
145
145
  #
146
146
  # Performs any necessary initialization for the flow.
147
147
  #
148
- # --directory DIR # Flow directory
148
+ # --dir DIR # Flow directory
149
149
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
150
150
  # --mode MODE # Specify development or production mode for dependencies #HIDDEN
151
151
  #
@@ -160,13 +160,12 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
160
160
  error("Unsupported mode #{options[:mode].inspect()}. Zillabyte currently supports development and production.")
161
161
  end
162
162
  type = options[:output_type]
163
- dir = options[:directory] || shift_argument
163
+ dir = options[:dir] || shift_argument
164
164
  if dir.nil?
165
165
  dir = Dir.pwd
166
166
  else
167
167
  dir = File.expand_path(dir)
168
168
  end
169
- options[:directory] = dir
170
169
  meta = Zillabyte::CLI::Config.get_config_info(dir)
171
170
 
172
171
  if meta.nil?
@@ -434,7 +433,7 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
434
433
  # Runs a local flow with live data.
435
434
  #
436
435
  # --config CONFIG_FILE # Use the given config file
437
- # --directory DIR # Flow directory
436
+ # --dir DIR # Flow directory
438
437
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
439
438
  #
440
439
  # HIDDEN:
@@ -444,13 +443,12 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
444
443
  type = options[:output_type]
445
444
 
446
445
  thread_id = options[:thread] || shift_argument || ""
447
- dir = options[:directory] || shift_argument
446
+ dir = options[:dir] || shift_argument
448
447
  if dir.nil?
449
448
  dir = Dir.pwd
450
449
  else
451
450
  dir = File.expand_path(dir)
452
451
  end
453
- options[:directory] = dir
454
452
 
455
453
  meta = Zillabyte::CLI::Config.get_config_info(dir, options)
456
454
 
@@ -471,23 +469,22 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
471
469
  # Outputs the info for the flow in the dir.
472
470
  #
473
471
  # --pretty # Pretty prints the info output
474
- # --directory DIR # Flow directory
472
+ # --dir DIR # Flow directory
475
473
  # --output_type OUTPUT_TYPE # Specify an output type i.e. json #HIDDEN
476
474
  #
477
475
  def info
478
- dir = options[:directory] || shift_argument
476
+ dir = options[:dir] || shift_argument
479
477
  if dir.nil?
480
478
  dir = Dir.pwd
481
479
  else
482
480
  dir = File.expand_path(dir)
483
481
  end
484
- options[:directory] = dir
485
482
 
486
483
  require("securerandom")
487
484
  info_file = "#{dir}/#{SecureRandom.uuid}"
488
485
  type = options[:output_type]
489
486
 
490
- cmd = command("--info --file #{info_file}", type, dir)
487
+ cmd = command("--info --file \"#{info_file}\"", type, dir)
491
488
  require("zillabyte/cli/apps")
492
489
  flow_info = Zillabyte::Command::Apps.get_info(cmd, info_file, dir, options)
493
490
 
@@ -634,17 +631,16 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
634
631
  # --input INPUT_FILE # Uses a CSV for component input (only applicable for components)
635
632
  # --output OUTPUT_FILE # Writes sink output to a file
636
633
  # --cycles CYCLES # Number of cycles to emit [default 1] (only applicable for apps)
637
- # --directory DIR # Flow directory
634
+ # --dir DIR # Flow directory
638
635
  # -i, --interactive # Interactively control input and read output (only applicable for apps)
639
636
  #
640
637
  def test
641
- dir = options[:directory]
638
+ dir = options[:dir]
642
639
  if dir.nil?
643
640
  dir = Dir.pwd
644
641
  else
645
642
  dir = File.expand_path(dir)
646
643
  end
647
- options[:directory] = dir
648
644
 
649
645
  # Get the flow_type
650
646
  require("zillabyte/api/flows")
@@ -17,6 +17,7 @@ class Zillabyte::Command::RPC < Zillabyte::Command::Flows
17
17
  # queries without listing any inputs on the command line. Each line
18
18
  # of the file should correspond to a unique query.
19
19
  #
20
+ # --forever # Let the RPC run until killed
20
21
  # --async # Run the command asynchronously
21
22
  # --input_file INTPUT_FILE # Input csv file containing parameters for multiple queries
22
23
  # --output_file OUTPUT_FILE # Output csv file containing query parameters and run ids
@@ -35,12 +36,13 @@ class Zillabyte::Command::RPC < Zillabyte::Command::Flows
35
36
  require("csv")
36
37
 
37
38
  component_id = options[:id] || shift_argument
38
- async = options[:async] || false
39
39
 
40
40
  if component_id.nil?
41
41
  component_id = read_name_from_conf(options)
42
42
  end
43
43
 
44
+ async = options[:async] || false
45
+ forever = options[:forever] || false
44
46
  type = options[:output_type]
45
47
  file = options[:input_file]
46
48
  out_file = options[:output_file]
@@ -60,6 +62,10 @@ class Zillabyte::Command::RPC < Zillabyte::Command::Flows
60
62
  end
61
63
 
62
64
  opts = {:rpc_inputs => component_args} if component_args.size != 0
65
+ if forever
66
+ opts[:forever] = 1
67
+ display "Running until killed..."
68
+ end
63
69
  res = api.components.rpc(component_id, opts)
64
70
 
65
71
  input_par_for_id = {}
@@ -22,12 +22,8 @@ class LogFetcher
22
22
  exit_on = [exit_on] unless exit_on.is_a?(Array)
23
23
 
24
24
  @color_map = {}
25
-
26
- if(hash["server"] == "localhost")
27
- cmd = "tail -n 500 -F /tmp/flows/f#{hash["flow"]}/flow_logs/flow_#{hash["flow"]}.log"
28
- else
29
- cmd = "curl -G http://#{hash["flow"]}:#{hash["token"]}@#{ip}:#{hash["port"]}/getLogs?flow=#{hash["flow"]}"
30
- end
25
+
26
+ cmd = "curl -G http://#{hash["flow"]}:#{hash["token"]}@#{ip}:#{hash["port"]}/getLogs?flow=#{hash["flow"]}"
31
27
 
32
28
  begin
33
29
  PTY.spawn( cmd ) do |r, w, pid|
@@ -261,8 +261,8 @@ class Zillabyte::Runner::AppRunner < Zillabyte::Command::Base
261
261
  def cdisplay(name, message, useName=true)
262
262
 
263
263
  color = @colors[name] || :default
264
- if message == ""
265
- display ""
264
+ if message.nil? || message == ""
265
+ return
266
266
  else
267
267
 
268
268
  if message.is_a?(Array)
@@ -148,7 +148,7 @@ class Zillabyte::Runner::ComponentOperation
148
148
  end
149
149
 
150
150
  # Build tuples
151
- args = msg.gsub(/[\'\"]/, '').split(' ')
151
+ args = msg.scan(/(?:\w|"[^"]*")+/).map {|s| s.gsub(/[\'\"]/, '')}
152
152
  component_args = []
153
153
 
154
154
  while(true) do
@@ -232,11 +232,11 @@ class Zillabyte::Runner::ComponentRunner < Zillabyte::Command::Base
232
232
  while true
233
233
 
234
234
  fields = @node_map[source]['fields'].map {|h| h.keys[0].upcase }
235
- display "Enter an input tuple in the form : #{fields.join('1 ')}1 #{fields.join('2 ')}2 ..."
235
+ display "Enter an input tuple in the form : #{fields.join(' ')}"
236
236
  msg = ask
237
237
 
238
238
  if msg != "end"
239
- args = msg.split(' ')
239
+ args = msg.scan(/(?:\w|"[^"]*")+/)
240
240
  if (args.length % fields.length != 0)
241
241
  display "Error: Argument length must be a multiple of the schema length"
242
242
  next
@@ -273,8 +273,8 @@ class Zillabyte::Runner::ComponentRunner < Zillabyte::Command::Base
273
273
 
274
274
  def cdisplay(name, message, useName=true)
275
275
  color = @colors[name] || :default
276
- if message == ""
277
- display ""
276
+ if message.nil? || message == ""
277
+ return
278
278
  else
279
279
 
280
280
  if message.is_a?(Array)
@@ -426,8 +426,10 @@ module Zillabyte; module Runner; class MultilangOperation
426
426
  # Read STDOUT from program straight to user
427
427
  if r == stdout
428
428
  msg = r.gets
429
- msg = msg.sub(/\n/, "")
430
- cdisplay("LOG: #{msg}")
429
+ if !msg.nil?
430
+ msg = msg.sub(/\n/, "")
431
+ cdisplay("LOG: #{msg}")
432
+ end
431
433
  next
432
434
  end
433
435
 
@@ -559,8 +561,9 @@ module Zillabyte; module Runner; class MultilangOperation
559
561
  end
560
562
 
561
563
  end
562
- rescue Errno::EIO
563
- cdisplay("Errno:EIO error")
564
+ rescue => e
565
+ cdisplay e.message
566
+ cdisplay e.backtrace
564
567
  ensure
565
568
  # cleanup
566
569
  pid = wait_thread[:pid]
@@ -569,7 +572,6 @@ module Zillabyte; module Runner; class MultilangOperation
569
572
  File.delete("#{ml_pipe}.in")
570
573
  stdout.close
571
574
  stderr.close
572
- Process.kill('INT', pid)
573
575
  end
574
576
  end
575
577
  rescue PTY::ChildExited
metadata CHANGED
@@ -1,167 +1,167 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zillabyte-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-08 00:00:00.000000000 Z
11
+ date: 2014-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: netrc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.7.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.7.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.6.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.6.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: excon
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.31'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.31'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: terminal-table
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.4'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.4'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: activesupport
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 3.2.11
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 3.2.11
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: multi_json
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: bundler
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: '1.3'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '1.3'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: colorize
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.6'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0.6'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: indentation
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ~>
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0.1'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: mkfifo
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  description: The Official Zillabyte CLI Gem
@@ -179,7 +179,6 @@ files:
179
179
  - bin/zb
180
180
  - bin/zbd
181
181
  - bin/zillabyte
182
- - lib/#zillabyte-cli.rb#
183
182
  - lib/zillabyte-cli.rb
184
183
  - lib/zillabyte-cli/version.rb
185
184
  - lib/zillabyte/api.rb
@@ -198,8 +197,6 @@ files:
198
197
  - lib/zillabyte/api/zillalogs.rb
199
198
  - lib/zillabyte/auth.rb
200
199
  - lib/zillabyte/cli.rb
201
- - lib/zillabyte/cli/#logs.rb#
202
- - lib/zillabyte/cli/#repl.rb#
203
200
  - lib/zillabyte/cli/apps.rb
204
201
  - lib/zillabyte/cli/auth.rb
205
202
  - lib/zillabyte/cli/base.rb
@@ -236,7 +233,6 @@ files:
236
233
  - lib/zillabyte/cli/templates/components/ruby/Gemfile
237
234
  - lib/zillabyte/cli/templates/components/ruby/component.rb.erb
238
235
  - lib/zillabyte/cli/templates/components/ruby/zillabyte.conf.yaml
239
- - lib/zillabyte/cli/templates/python/#simple_function.py#
240
236
  - lib/zillabyte/cli/untitled.md
241
237
  - lib/zillabyte/cli/version.rb
242
238
  - lib/zillabyte/cli/zillalogs.rb
@@ -260,28 +256,22 @@ homepage: http://www.zillabyte.com
260
256
  licenses:
261
257
  - MIT
262
258
  metadata: {}
263
- post_install_message: |2
264
-
265
- Getting Started with Zillabyte
266
- ==============================
267
-
268
- (1) Register for an auth token at http://zillabyte.com
269
- (2) Log in by running 'zillabyte login' in the command line
270
- (3) Build an empty app by running 'zillabyte apps:init'
271
- Or... check out our Quick Starts by visiting http://docs.zillabyte.com/
272
-
273
- Questions, comments? Please visit us at http://docs.zillabyte.com
259
+ post_install_message: ! "\nGetting Started with Zillabyte\n==============================\n\n(1)
260
+ Register for an auth token at http://zillabyte.com\n(2) Log in by running 'zillabyte
261
+ login' in the command line\n(3) Build an empty app by running 'zillabyte apps:init'\n
262
+ \ Or... check out our Quick Starts by visiting http://docs.zillabyte.com/\n\nQuestions,
263
+ comments? Please visit us at http://docs.zillabyte.com\n"
274
264
  rdoc_options: []
275
265
  require_paths:
276
266
  - lib
277
267
  required_ruby_version: !ruby/object:Gem::Requirement
278
268
  requirements:
279
- - - ">="
269
+ - - ! '>='
280
270
  - !ruby/object:Gem::Version
281
271
  version: '0'
282
272
  required_rubygems_version: !ruby/object:Gem::Requirement
283
273
  requirements:
284
- - - ">="
274
+ - - ! '>='
285
275
  - !ruby/object:Gem::Version
286
276
  version: '0'
287
277
  requirements: []
@@ -1,5 +0,0 @@
1
- require "zillabyte-cli/version"
2
- require "zillabyte/api"
3
- require "zillabyte/cli"
4
- require "zillabyte/common"
5
- require "zillabyte/queries"
@@ -1,12 +0,0 @@
1
- require "zillabyte/cli/base"
2
-
3
- # manage custom logs
4
- #
5
- class Zillabyte::Command::Logs < Zillabyte::Command::Base
6
-
7
-
8
-
9
-
10
-
11
-
12
- end
@@ -1,43 +0,0 @@
1
- require "zillabyte/cli/base"
2
- require 'readline'
3
- # REPL console for zillabyte commands
4
- #
5
- class Zillabyte::Command::Repl < Zillabyte::Command::Base
6
-
7
- # repl
8
- #
9
- # start a console session for zillabyte
10
- # --quiet # HIDDEN
11
- # --history HISTORY# HIDDEN hack to allow history for readline
12
- def index
13
- if !options[:quiet]
14
- v = `zillabyte version`
15
- display "\n#{v}Type q,exit or Ctrl+D to quit\n\n"
16
- end
17
- server = `echo $ZILLABYTE_API_HOST` || ""
18
- prompt = ""
19
- if server && server.chomp.length > 0
20
- prompt = "#{server.chomp} "
21
- end
22
- prompt += "zillabyte $ "
23
- if options[:history]
24
- #p options[:history]
25
- history = JSON.parse(options[:history])
26
- history.last(50).each do |his|
27
- # TODO: Handle single quotes ??
28
- Readline::HISTORY << his
29
- end
30
- end
31
- # TODO: Add tab completion for basic commands, app/relation names etc.
32
- while cmd = Readline.readline(prompt, true)
33
- if cmd && cmd.length > 0
34
- if cmd.downcase == "exit" || cmd.downcase == "q"
35
- display "" # TODO Make Ctrl+D print a newline too
36
- return
37
- else
38
- exec "zillabyte #{cmd}; zillabyte repl --quiet --history '#{Readline::HISTORY.to_a.to_json}'"
39
- end
40
- end
41
- end
42
- end
43
- end
@@ -1,27 +0,0 @@
1
- import zillabyte
2
-
3
- def prep(controller):
4
- return
5
-
6
- # This is the heart of your algorithm. It's processed on every
7
- # web page. This algorithm is run in parallel on possibly hundreds
8
- # of machines.
9
- def execute(controller, tup):
10
- if("hello world" in tup.values["html"]):
11
- controller.emit("has_hello_world",{"url":tup.values["url"]})
12
- return
13
-
14
- zillabyte.simple_function(\
15
- # This directive instructs zillabyte to give your function every
16
- # web page in our known universe. Your function will have access
17
- # to two fields: URL and HTML
18
- matches = "select * from web_pa", \
19
-
20
- # This directive tells Zillabyte what kind of data your function
21
- # produces. In this case, we're saying we will emit a tuple that
22
- # is one-column wide and contains the field 'URL'
23
- emits = [["has_hello_world", [{"url":"string"}]]], \
24
-
25
- prepare = prep, \
26
- execute = execute\
27
- )