zillabyte 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZDBhOWNkOTE4OTQxNmI2ZTU2YWQ3ZmE2MGRiYjg0MGZiMWZjNWEyZA==
5
+ data.tar.gz: !binary |-
6
+ NjRiY2ZlNmIzYzgwNzIyNjQ5OTY3MDRiY2M2MmRhNjZhZGYwY2YxMA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ NjljNmIxYjEwMTcyOWFhYzM0NGY0NmVhMzdkYWFkNzYyNjVmYzEyZjIzZDE4
10
+ NGZiOTQ2YzhjMjgzOWFhOWMxOTIwMzgzOGNiMDBhZWJjZGE1OTEyNTRkNTZi
11
+ NzllY2Q0YzZmM2U3NDUwNWMzN2ZiNzYzMjE4MDg5NDkyMGY2ZWU=
12
+ data.tar.gz: !binary |-
13
+ YmJmNzY3NDQwMDdlOTQ1OTgyMGU2MDE5ZmIwMDE4MGU3NmRjMTEzYmNmNzU4
14
+ YTdlYmIzMTdhZDY4MTVmNThhODlhNjRjMmJhNDhhOTc4ZTUzZjM0YTkxNmMw
15
+ ZGFmY2QyN2VhNzVkN2YxZjk2MDFlNzRkYzZkMGY0ZjJmNDAzNzM=
@@ -37,7 +37,7 @@ class Zillabyte::Harness::Helper
37
37
  ee = "Error in \"#{operation}\" at \"name\": \n\t "
38
38
 
39
39
  if(!name.instance_of?(String) or name == "")
40
- msg = "#{ee}\"Name\" must be a non-empty STRING at #{name}."
40
+ msg = "#{ee}\"Name\" must be a non-empty STRING at \"#{name}\". Flows and simple_functions must have names!"
41
41
  Zillabyte::Harness::Helper.print_error(msg)
42
42
  end
43
43
  if(names[name] and names[name] != "new" and names[name] != "sink" and operation != "new" and operation != "sink")
@@ -137,21 +137,24 @@ module Zillabyte
137
137
  setup_pipes
138
138
  open(*handshake)
139
139
 
140
- begin
141
- while true
140
+ while true
141
+ begin
142
142
  msg = read_command
143
143
  case msg['command']
144
144
  when 'next'
145
145
  next_batch
146
- done
147
146
  when 'ack'
148
147
  ack(msg['id'])
149
148
  when 'fail'
150
149
  fail(msg['id'])
151
150
  end
151
+ rescue SignalException => e
152
+ raise
153
+ rescue Exception => e
154
+ fail 'Exception in spout: ' + e.message + ' - ' + e.backtrace.join('\n')
155
+ break
152
156
  end
153
- rescue Exception => e
154
- fail 'Exception in spout: ' + e.message + ' - ' + e.backtrace.join('\n')
157
+ done
155
158
  end
156
159
  end
157
160
  end
@@ -169,23 +172,18 @@ module Zillabyte
169
172
  setup_pipes
170
173
  prepare(*handshake)
171
174
 
172
- begin
173
- while true
174
- t = nil
175
- begin
176
- t = Tuple.from_hash(read_command)
177
- if(!t)
178
- next
179
- end
180
- execute t
181
- rescue Exception => e
182
- fail 'Exception in bolt (A): ' + e.message + ' - ' + e.backtrace.join('\n')
183
- ensure
184
- done()
185
- end
175
+ while true
176
+ begin
177
+ t = Tuple.from_hash(read_command)
178
+ next if(!t)
179
+ execute t
180
+ rescue SignalException => e
181
+ raise
182
+ rescue Exception => e
183
+ fail 'Exception in each: ' + e.message + ' - ' + e.backtrace.join('\n')
184
+ break
186
185
  end
187
- rescue Exception => e
188
- fail 'Exception in bolt (B): ' + e.message + ' - ' + e.backtrace.join('\n')
186
+ done
189
187
  end
190
188
  end
191
189
  end
@@ -199,8 +197,8 @@ module Zillabyte
199
197
  setup_pipes
200
198
  handshake
201
199
 
202
- begin
203
- while true
200
+ while true
201
+ begin
204
202
  msg = read_command
205
203
  case msg['command']
206
204
  when 'begin_group'
@@ -212,10 +210,12 @@ module Zillabyte
212
210
  when 'end_group'
213
211
  end_group
214
212
  end
215
- done
213
+ rescue SignalException => e
214
+ raise
215
+ rescue Exception => e
216
+ fail "Exception in aggregate: " + e.message + ' - ' + e.backtrace.join('\n')
216
217
  end
217
- rescue Exception => e
218
- fail "Exception in #{msg["command"]}: " + e.message + ' - ' + e.backtrace.join('\n')
218
+ done
219
219
  end
220
220
  end
221
221
  end
@@ -6,7 +6,7 @@ class Zillabyte::Harness::SimpleAggregate
6
6
  def self.build()
7
7
  h = Zillabyte::Harness::SimpleAggregate.new()
8
8
  yield(h)
9
- h._name = h._name || Dir.pwd.split("/")[-1]
9
+ h._name = h._name
10
10
  Zillabyte::Harness::Helper.check_name("simple_aggregate", h._name, {})
11
11
  Zillabyte::Harness::Helper.check_emits("simple_aggregate", h._emits, {})
12
12
  generic_emits = h.get_generic_emits
@@ -6,7 +6,7 @@ class Zillabyte::Harness::SimpleFunction
6
6
  def self.build()
7
7
  h = Zillabyte::Harness::SimpleFunction.new()
8
8
  yield(h)
9
- h._name = h._name || Dir.pwd.split("/")[-1]
9
+ h._name = h._name
10
10
  Zillabyte::Harness::Helper.check_name("simple_function", h._name, {})
11
11
  Zillabyte::Harness::Helper.check_emits("simple_function", h._emits, {})
12
12
  generic_emits = h.get_generic_emits
@@ -9,7 +9,7 @@ class Zillabyte::Harness::Topology
9
9
  h._streams = {}
10
10
  h._names = {}
11
11
  h._branched = false
12
- h._name = name || Dir.pwd.split("/")[-1]
12
+ h._name = name
13
13
  Zillabyte::Harness::Helper.check_name("new", h._name, {})
14
14
  h._options = Zillabyte::Harness::Helper.opt_parser()
15
15
  if(h._options[:command] == :info)
@@ -102,8 +102,8 @@ class Zillabyte::Harness::Topology
102
102
  pipe_name = @_options[:pipe]
103
103
  if(@_options[:name] == h._name)
104
104
  c = Zillabyte::Harness::AggregateController.new(h, Zillabyte::Common::Progress.new)
105
+ c.run(pipe_name)
105
106
  end
106
- c.run(pipe_name)
107
107
  end
108
108
  end
109
109
 
@@ -7,7 +7,6 @@ class Tuple
7
7
 
8
8
  def [](name)
9
9
  maybe_build_alias_hash()
10
- p name
11
10
  values[ @_alias_hash[name] || name ]
12
11
  end
13
12
 
@@ -59,12 +58,16 @@ p name
59
58
  def self.from_hash(hash)
60
59
  begin
61
60
  t = hash.fetch("tuple")
61
+ rescue SignalException => e
62
+ raise
62
63
  rescue Exception => e
63
64
  fail 'Missing tuple field in emitted JSON object' + e.backtrace.join('\n')
64
65
  return nil
65
66
  end
66
67
  begin
67
68
  m = hash.fetch("meta")
69
+ rescue SignalException => e
70
+ raise
68
71
  rescue Exception => e
69
72
  fail 'Missing meta field in emitted JSON object' + e.backtrace.join('\n')
70
73
  return nil
@@ -1,3 +1,3 @@
1
1
  module Zillabyte
2
- VERSION = "0.0.12" unless defined?(VERSION)
2
+ VERSION = "0.0.13" unless defined?(VERSION)
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zillabyte
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
5
- prerelease:
4
+ version: 0.0.13
6
5
  platform: ruby
7
6
  authors:
8
7
  - zillabyte
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-24 00:00:00.000000000 Z
11
+ date: 2014-03-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: mkfifo
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: zillabyte-cli
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -82,32 +75,30 @@ files:
82
75
  - ruby/lib/zillabyte/harness/tuple.rb
83
76
  - ruby/lib/zillabyte/harness.rb
84
77
  - ruby/lib/zillabyte/version.rb
85
- - ruby/lib/zillabyte/version.rb~
86
78
  - ruby/lib/zillabyte.rb
87
79
  - ruby/README.md
88
80
  homepage: http://www.zillabyte.com
89
81
  licenses:
90
82
  - MIT
83
+ metadata: {}
91
84
  post_install_message:
92
85
  rdoc_options: []
93
86
  require_paths:
94
87
  - ruby/lib
95
88
  required_ruby_version: !ruby/object:Gem::Requirement
96
- none: false
97
89
  requirements:
98
90
  - - ! '>='
99
91
  - !ruby/object:Gem::Version
100
92
  version: '0'
101
93
  required_rubygems_version: !ruby/object:Gem::Requirement
102
- none: false
103
94
  requirements:
104
95
  - - ! '>='
105
96
  - !ruby/object:Gem::Version
106
97
  version: '0'
107
98
  requirements: []
108
99
  rubyforge_project:
109
- rubygems_version: 1.8.25
100
+ rubygems_version: 2.1.10
110
101
  signing_key:
111
- specification_version: 3
102
+ specification_version: 4
112
103
  summary: The Official Zillabyte Gem
113
104
  test_files: []
@@ -1,3 +0,0 @@
1
- module Zillabyte
2
- VERSION = "0.0.11" unless defined?(VERSION)
3
- end