zillabyte-cli 0.9.44 → 0.9.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YThlMjI4ODY5ZDFhYzAwZGQwNzMzMDg3N2ZhYjRlMWU0ODM3MzExNw==
4
+ NDIxYzA1NWYzMWUwYWI1ZTE1MzRiZDNjOTkxYjNmNTlmYmVkODVkZA==
5
5
  data.tar.gz: !binary |-
6
- NjQyNmE4OWYxOTY0NzNjZDk1OWUxYTIyNWI0ZGU0NjU4NWY3MzIxZA==
6
+ MTgyZTY4Mjc4MzM5OGFhODEzZTA3YjA5YWVlYzZhNDM0NTFlZDhhNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjM5M2NkYmJhMTAzNDI1M2NlNGU3NTVlNDM4ODEzMTY0MDA5NzBjOTc1MzZj
10
- NjgyNjAzODBjZmZkYmUxNmYxMThjZTZjNjUyNGViODBmNjNiOTliYTMzZWIy
11
- NzY4NmQxZWNmMDk5YjY2MzQwMTE2OTlhYzIyZjAxODQ4MmZjNTQ=
9
+ MWQwNTFlNjY4ODU3ZjU2MDliZjRlMWVhZDAxNjA5M2U2MThmMGY0ZWYwY2My
10
+ N2NkNTgwNGI0YTI0ZGZmYTllNDUzMmI5ZTdkY2M3YzMzNzQ2Y2Y0OTA1MGE4
11
+ ZGI0YzRkZmMzMDk2Y2U1ZjUxNjE2YTQwNmZkNzFjMGUwN2U0NzA=
12
12
  data.tar.gz: !binary |-
13
- ZWVjMjBkNmU5NmYzMTIyOGJkNjI1YjM1ZGZlZWY5ZGYzMDI3ZjlmNTM2MDMw
14
- MWQwOTliZjA4ZmI5OWE0N2UwZjMxZmFhMjZmMzNhZjNhOGY2MzRkOGYzMzky
15
- M2NmMDZjNGVkODhlN2U1OWZhYzQ1ZWMzNTQwMWQ4ODU5MTY1MmY=
13
+ ZjFlNDE5OWE4NjgyMTY2NzgxOTM4M2I2NWY1NTM4ZTU3MWQ5NzM4Nzc3M2Jl
14
+ Nzk3YzcwNGNjZDE1ZDQ3OTdiM2YzNmU0YmIwMzc2NzY3NjY4NzhlMmRlMjU2
15
+ NDNiZjU5MDU1MmM0NGY1MDBiZjM5MGVlMmVhMTQ0MWEzOTQzNzE=
@@ -5,7 +5,7 @@ require("zillabyte/cli/base")
5
5
  class Zillabyte::Command::Download < Zillabyte::Command::Base
6
6
 
7
7
  MIN_LOCAL_JAR_VERSION = "0.0.3"
8
- LATEST_JAR_VERSION = "0.9.44"
8
+ LATEST_JAR_VERSION = "0.9.45"
9
9
  MIN_JAVA_VERSION = "1.7.0"
10
10
 
11
11
  # --local # HIDDEN
@@ -809,24 +809,28 @@ class Zillabyte::Command::Flows < Zillabyte::Command::Base
809
809
  begin
810
810
  PTY.spawn(cmd) do |r, w, pid|
811
811
  done_cycle = false
812
- r.each do |line|
813
- if options[:verbose]
814
- display line
815
- else
816
- if(line.include? match_str)
817
- line = line.chomp!.split(match_str).last
818
- if !done_cycle
819
- if line.include? "[ERROR]"
820
- display line.colorize(:red)
821
- elsif line.include? "sinking tuple:"
822
- display line.colorize(:green)
823
- else
824
- display line
812
+ begin
813
+ r.each do |line|
814
+ if options[:verbose]
815
+ display line
816
+ else
817
+ if(line.include? match_str)
818
+ line = line.chomp!.split(match_str).last
819
+ if !done_cycle
820
+ if line.include? "[ERROR]"
821
+ display line.colorize(:red)
822
+ elsif line.include? "sinking tuple:"
823
+ display line.colorize(:green)
824
+ else
825
+ display line
826
+ end
825
827
  end
826
828
  end
829
+ done_cycle = true if(line.include? "[app][RUN] Transitioned to state WAITING" or line.include? "[app][RUN] Transitioned to state IDLE")
827
830
  end
828
- done_cycle = true if(line.include? "[app][RUN] Transitioned to state WAITING" or line.include? "[app][RUN] Transitioned to state IDLE")
829
831
  end
832
+ rescue Errno::EIO => e
833
+ # process has finished
830
834
  end
831
835
  end
832
836
  rescue Exception => e
@@ -1,17 +1,15 @@
1
1
  import zillabyte
2
2
 
3
- def prep(controller):
4
- return
5
-
6
3
  # This is the heart of your algorithm. It's processed on every
7
4
  # web page. This algorithm is run in parallel on possibly hundreds
8
5
  # of machines.
9
- def execute(controller, tup):
10
- if("hello world" in tup["html"]):
11
- controller.emit("has_hello_world",{"url":tup["url"]})
12
- return
6
+ class MyEach:
7
+ def execute(self, controller, tup):
8
+ if("hello world" in tup["html"]):
9
+ controller.emit("has_hello_world",{"url":tup["url"]})
10
+ return
13
11
 
14
12
  app = zillabyte.app(name = "hello_world")
15
- app.source(matches = "homepages")\
16
- .each(execute = execute)\
13
+ app.source("homepages")\
14
+ .each(MyEach)\
17
15
  .sink(name = "has_hello_world", columns = [{"url":"string"}])
@@ -30,26 +30,30 @@ class LogFetcher
30
30
  PTY.spawn( cmd ) do |r, w, pid|
31
31
  @pid = pid;
32
32
  break if @terminate
33
- r.each do |line|
34
- begin
35
- op = line.match(/\[(.*?)\]/)[0].to_s[1...-1]
36
-
37
- op_name = op.split(".")[0]
38
- next if op_name != operation and operation != "_ALL_"
39
- line_split = line.split("[")
40
- print line_split[0] + "[" + op.colorize(color_for(op)) + line_split[1..-1].join("[")[op.length..-1] unless line.include?("[HIDDEN]")
41
-
42
- done = false
43
- exit_on.each do |exit_str|
44
- if line.include? exit_str
45
- done = true
46
- break
33
+ begin
34
+ r.each do |line|
35
+ begin
36
+ op = line.match(/\[(.*?)\]/)[0].to_s[1...-1]
37
+
38
+ op_name = op.split(".")[0]
39
+ next if op_name != operation and operation != "_ALL_"
40
+ line_split = line.split("[")
41
+ print line_split[0] + "[" + op.colorize(color_for(op)) + line_split[1..-1].join("[")[op.length..-1] unless line.include?("[HIDDEN]")
42
+
43
+ done = false
44
+ exit_on.each do |exit_str|
45
+ if line.include? exit_str
46
+ done = true
47
+ break
48
+ end
47
49
  end
50
+ break if done
51
+ rescue Exception => e
52
+ next
48
53
  end
49
- break if done
50
- rescue Exception => e
51
- next
52
54
  end
55
+ rescue Errno::EIO => e
56
+ # process has finished
53
57
  end
54
58
  end
55
59
  rescue PTY::ChildExited => e
@@ -87,4 +91,4 @@ class LogFetcher
87
91
  lf
88
92
  end
89
93
 
90
- end
94
+ end
@@ -1,5 +1,5 @@
1
1
  module Zillabyte
2
2
  module CLI
3
- VERSION = "0.9.44"
3
+ VERSION = "0.9.45"
4
4
  end
5
5
  end
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.44
4
+ version: 0.9.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-03 00:00:00.000000000 Z
11
+ date: 2014-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake