zillabyte-cli 0.9.26 → 0.9.27

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTU0NWM5N2EwMzVkNWIxZDBkMTk0ODcxY2I2YjY5ZGYzMjMwZDFiOA==
4
+ OGRhYWI3NTgwMzQ5ZWM5N2ZlNmMyNjI4N2M1N2RlZDZlNDhmMDIzOA==
5
5
  data.tar.gz: !binary |-
6
- NGE4NjAzOGRlNjBiNjY5ZmU0MzVmYTA0NWM4NDdiZmI4MzVmZDIxMA==
6
+ YTA2NDk2ZDFlYzg5YWM5MDVmNzJhM2Y1OTQxYTI3NjViNjczZGE3MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjViNGQ0Y2Y1YjdkNGQzYzBlMWI2YjcwYjcxNWE4MjBiMDc0NjliODIxNTY1
10
- NTUwMWZmOThmZGM2OWZjNzE4YzgyOTkzYjg5YjMwZjJlMGU3YzQ3NzcyZGZi
11
- ZDU3ZWFlMzRmZmExMmY0NWQ2MzI2ZjkxYjU2OGZmOWUzMzk0MTY=
9
+ ZTllYmU0NTM3Nzg5MjY3MzBhZDAxYTI1MDM5MzhiZDRmNzRlNmI1YjYyZTcx
10
+ NDgzMWE3Y2U3ZGQ4ZGQ0NTUwMDcxZWFhOGEzYjczMjIyN2I3M2IwNjU4Yzc5
11
+ MWVhOTk0YzU3MTE3NzAwOWY0NmZmYTk3ZWFiZGQ4OWM2MDM1MmQ=
12
12
  data.tar.gz: !binary |-
13
- MTgwOGRkM2Y3YmMzMTg3NzU4MDJhMjE4ZGI4M2ZjZDdjMDkyNGU2NDVhNDg5
14
- NmZiYWM3NzNmYjg1NTM3ODBhNjdmOGE0NjUwOGQxOWJlNjQ3MTgwNTEwYjVk
15
- NmI3N2E1ZDE0NDMzY2Q5MTJjNWY4YjAxMTU2YzcwZTRhNmM0NTU=
13
+ N2Y1ZjU3ZjJhMGUzYzBkNzJjOGZlMTFmZjNmYTBkODE5ZjA4YWU2MjdlMWM4
14
+ MzE5NWMyYTU3ZDZjMDM5ZTEwNzA4MzU3MDk5MzdiZTc5YzVmMTliYjM2NTY3
15
+ ZTAxMzdjZWY5Y2Y2Y2U1NDA3YTNmYjI1ODRiZjdiNTQxYWU1MGU=
@@ -1,5 +1,5 @@
1
1
  module Zillabyte
2
2
  module CLI
3
- VERSION = "0.9.26"
3
+ VERSION = "0.9.27"
4
4
  end
5
5
  end
@@ -4,8 +4,8 @@ require("zillabyte/cli/base")
4
4
  #
5
5
  class Zillabyte::Command::Download < Zillabyte::Command::Base
6
6
 
7
- MIN_LOCAL_JAR_VERSION = "0.0.1"
8
- LATEST_JAR_VERSION = "0.0.1"
7
+ MIN_LOCAL_JAR_VERSION = "0.0.2"
8
+ LATEST_JAR_VERSION = "0.0.2"
9
9
  MIN_JAVA_VERSION = "1.7.0"
10
10
 
11
11
  # --local # HIDDEN
@@ -675,12 +675,24 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
675
675
  # Run a flow locally with sample data.
676
676
  #
677
677
  # --dir DIR # Flow directory
678
- # --input_file INTPUT_FILE # Input csv file containing parameters for multiple queries to an rpc
679
- # --output_prefix OUTPUT_PREFIX # Prefix for output file containing app results. Results will be stored in [prefix]_[sink_name].csv for each sink.
678
+ # --input_file INPUT_FILE # Input csv file containing parameters for multiple queries
679
+ # --output_prefix OUTPUT_PREFIX # Prefix for output file containing app results. Results will be stored in [prefix]_[sink_name].csv for each sink.
680
680
  # --env ENV # HIDDEN
681
681
  # --use_local_jar # HIDDEN
682
+ # --verbose # HIDDEN
682
683
  #
683
684
  def local
685
+ require('colorize')
686
+ def on_exit(flow_type)
687
+ display "*"*79
688
+ if flow_type == "component"
689
+ display "If you are happy with your RPC and would like to run it in parallel on our servers, please use `zillabyte execute`.".colorize(:green)
690
+ else
691
+ display "If you are happy with your app and would like to run it in parallel on our servers, please use `zillabyte push`.".colorize(:green)
692
+ end
693
+ display "*"*79
694
+ end
695
+
684
696
  dir = options[:dir]
685
697
  if dir.nil?
686
698
  dir = Dir.pwd
@@ -768,16 +780,31 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
768
780
 
769
781
  match_str = "[f#{meta["name"]}]"
770
782
  display "Begin local execution..."
771
- PTY.spawn(cmd) do |r, w, pid|
772
- done_cycle = false
773
- r.each do |line|
774
- #display line
775
- if(line.include? match_str)
776
- line = line.chomp!.split(match_str).last
777
- display line if !done_cycle
783
+ begin
784
+ PTY.spawn(cmd) do |r, w, pid|
785
+ done_cycle = false
786
+ r.each do |line|
787
+ if options[:verbose]
788
+ display line
789
+ else
790
+ if(line.include? match_str)
791
+ line = line.chomp!.split(match_str).last
792
+ if !done_cycle
793
+ if line.include? "[ERROR]"
794
+ display line.colorize(:red)
795
+ elsif line.include? "sinking tuple:"
796
+ display line.colorize(:green)
797
+ else
798
+ display line
799
+ end
800
+ end
801
+ end
802
+ done_cycle = true if(line.include? "[app][RUN] Transitioned to state WAITING" or line.include? "[app][RUN] Transitioned to state IDLE")
803
+ end
778
804
  end
779
- done_cycle = true if(line.include? "[app] Transitioned to state WAITING" or line.include? "[app] Transitioned to state IDLE")
780
805
  end
806
+ ensure
807
+ on_exit meta["flow_type"]
781
808
  end
782
809
  end
783
810
  alias_command "test", "flows:local"
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.9.26
4
+ version: 0.9.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
11
+ date: 2014-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake