zillabyte 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDgzZWY4MDg3YjI5MDg1YzQwZjNiNWNmYWM0M2E4Nzc2MTdkYzFlMg==
5
- data.tar.gz: !binary |-
6
- YzdhM2IwMzRjYmFjZTdiOGJjOTMxYmExZmJkNTMwODU3OTc1M2Q1MA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NTIwNTgyYjZkNGVkNGIyNDVjMjNlYTlhMTI3MGMyYWFjNjFjMjdkZjNmYjY2
10
- OWFjNGRhZWE1ODg5NDdjNTgyOTc5MjY1MmExY2Q5NGJmYzI1NjBjOWFhODVj
11
- MDI3YjkwNDJjZTQxMDg0NmIyNTM5NzAxNjg2MmY3NTVlMjYwYTg=
12
- data.tar.gz: !binary |-
13
- ZDYyZTFjM2M5MmNmNzY1NDU0ZDIwNmI2YmQwMmJiNmQ0ODZhZDMxNGQwNTM5
14
- ZjFiYmNlYzBlODUzYzRmNTEzZmRjMTE5ZDUxMzg5NGVhODA3NDc1OTUxMTQy
15
- MjUwN2Q2MGVhNTc4Yjg4NmQ2Njg1NDI2MjQyODQwNDI1ZDA4ZGY=
2
+ SHA1:
3
+ metadata.gz: 8974f32fc265b24fccba0241176b2504994bc752
4
+ data.tar.gz: d8180962b759df939f680b9066bdd76a65d46314
5
+ SHA512:
6
+ metadata.gz: da0718446a35dedbfe9d9d4a594bf6d2f5351a0f939f300473cdfc3dc43ab5560cf0b24ed45d1b8e608c3ccef5e93cf3bc5390e0d9178b8e08d578300228b156
7
+ data.tar.gz: 4611fcb7c8c98e60cf01c14ca7ce61bf9d8858c45ad92dd1f50b99aed145090d96c700ed4fd85179b0a89ab16caeff32cd506e1a2da507e5557343eb1484aa5e
@@ -390,27 +390,33 @@ class Zillabyte::Harness::Helper
390
390
  end
391
391
  end
392
392
 
393
- def self.check_loop_back(stream, node_name, nodes)
393
+ def self.check_loop_back(stream, node_name, max_iterations, nodes)
394
394
  ee = "Error in \"loop_back\" to \"#{node_name}\": \n\t "
395
+ pp = @@_print_loop_back
396
+ if max_iterations and !max_iterations.is_a?(Integer)
397
+ msg = "#{ee}Max iterations must be an integer. #{pp}"
398
+ Zillabyte::Harness::Helper.print_error(msg)
399
+ end
400
+
395
401
  previous_node_name = stream._previous_node_name
396
402
  found = false
397
403
  nodes.each do |node|
398
404
  if node._name == node_name
399
405
  found = true
400
406
  if node._type == "source"
401
- msg = "#{ee}Cannot loop back to source node \"#{node_name}\"!"
407
+ msg = "#{ee}Cannot loop back to source node \"#{node_name}\"! #{pp}"
402
408
  Zillabyte::Harness::Helper.print_error(msg)
403
409
  end
404
410
  end
405
411
  if node._name == previous_node_name
406
412
  if node._emits.size < 2
407
- msg = "#{ee}The preceding operation does not emit multiple streams. Please make sure that it emits one stream for the loop back and another stream for downstream operations."
413
+ msg = "#{ee}The preceding operation does not emit multiple streams. Please make sure that it emits one stream for the loop back and another stream for downstream operations. #{pp}"
408
414
  Zillabyte::Harness::Helper.print_error(msg)
409
415
  end
410
416
  end
411
417
  end
412
418
  if !found
413
- msg = "#{ee}The specified loop-back node \"#{node_name}\" was not found in the operations preceding it."
419
+ msg = "#{ee}The specified loop-back node \"#{node_name}\" was not found in the operations preceding it. #{pp}"
414
420
  Zillabyte::Harness::Helper.print_error(msg)
415
421
  end
416
422
  end
@@ -617,7 +623,6 @@ OUTPUT
617
623
  * The number of input and output streams specified must match the number listed for the component.
618
624
  OUTPUT
619
625
 
620
-
621
626
  @@_print_check_clump = <<-OUTPUT
622
627
  \n\n"Clump" Syntax:
623
628
  Simplified syntax:
@@ -645,4 +650,9 @@ OUTPUT
645
650
  * the "execute" block is where the tuples are actually processed. It must take in a single argument (the "tuple").
646
651
  OUTPUT
647
652
 
653
+ @@_print_loop_back = <<-OUTPUT
654
+ \n\n"Loop_back" Syntax:
655
+ stream.loop_back(operation_name[String], max_iterations[Integer])
656
+ OUTPUT
657
+
648
658
  end
@@ -81,11 +81,14 @@ class Zillabyte::Harness::Stream
81
81
  alias_method :execute, :call_component
82
82
 
83
83
  def loop_back(*args, &block)
84
- # This is not a real operation, just telling the stream to loop back to the previous operation
84
+ # This is not a real operation, just telling the stream to loop back to a previous operation
85
85
  @_vector_options, @_options = Zillabyte::Harness::Helper.get_vector_and_hashes(args)
86
86
  loop_back_node = @_vector_options[0]
87
- Zillabyte::Harness::Helper.check_loop_back(self, loop_back_node, @_app._nodes)
88
- Zillabyte::Harness::Helper.write_arc_to_file({"name" => (@_options[:name] || self._name), "origin" => self._previous_node_name, "dest" => loop_back_node, "loop_back" => 1}, @_app._socket)
87
+ max_iterations = @_vector_options[1]
88
+ Zillabyte::Harness::Helper.check_loop_back(self, loop_back_node, max_iterations, @_app._nodes)
89
+ arc_hash = {"name" => (@_options[:name] || self._name), "origin" => self._previous_node_name, "dest" => loop_back_node, "loop_back" => 1}
90
+ arc_hash["max_iterations"] = max_iterations if max_iterations
91
+ Zillabyte::Harness::Helper.write_arc_to_file(arc_hash, @_app._socket)
89
92
  end
90
93
 
91
94
  def sink(*args, &block)
@@ -1,3 +1,3 @@
1
1
  module Zillabyte
2
- VERSION = "0.9.6" unless defined?(VERSION)
2
+ VERSION = "0.9.7" unless defined?(VERSION)
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zillabyte
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - zillabyte
@@ -14,30 +14,30 @@ dependencies:
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: zillabyte-cli
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.6
33
+ version: 0.9.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
- version: 0.9.6
40
+ version: 0.9.7
41
41
  description: The Official Zillabyte Gem
42
42
  email:
43
43
  - gem@zillabyte.com
@@ -45,7 +45,9 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ruby/lib/zillabyte.rb
48
49
  - ruby/lib/zillabyte/common/progress.rb
50
+ - ruby/lib/zillabyte/harness.rb
49
51
  - ruby/lib/zillabyte/harness/app.rb
50
52
  - ruby/lib/zillabyte/harness/base.rb
51
53
  - ruby/lib/zillabyte/harness/clump.rb
@@ -69,9 +71,7 @@ files:
69
71
  - ruby/lib/zillabyte/harness/stream.rb
70
72
  - ruby/lib/zillabyte/harness/stream_builder.rb
71
73
  - ruby/lib/zillabyte/harness/tuple.rb
72
- - ruby/lib/zillabyte/harness.rb
73
74
  - ruby/lib/zillabyte/version.rb
74
- - ruby/lib/zillabyte.rb
75
75
  homepage: http://www.zillabyte.com
76
76
  licenses:
77
77
  - MIT
@@ -82,17 +82,17 @@ require_paths:
82
82
  - ruby/lib
83
83
  required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  requirements:
90
- - - ! '>='
90
+ - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.0.7
95
+ rubygems_version: 2.2.2
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: The Official Zillabyte Gem