rflow 1.0.0a2 → 1.0.0a3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/README.VAGRANT +63 -0
- data/README.md +118 -33
- data/Vagrantfile +53 -0
- data/bin/rflow +6 -1
- data/example/basic_extensions.rb +7 -8
- data/example/http_extensions.rb +7 -8
- data/lib/rflow/broker.rb +18 -0
- data/lib/rflow/child_process.rb +3 -1
- data/lib/rflow/component.rb +51 -61
- data/lib/rflow/component/port.rb +24 -15
- data/lib/rflow/configuration.rb +1 -0
- data/lib/rflow/configuration/connection.rb +35 -17
- data/lib/rflow/configuration/ruby_dsl.rb +47 -9
- data/lib/rflow/connection.rb +13 -9
- data/lib/rflow/connections/zmq_connection.rb +46 -3
- data/lib/rflow/daemon_process.rb +1 -1
- data/lib/rflow/master.rb +8 -1
- data/lib/rflow/shard.rb +8 -2
- data/lib/rflow/version.rb +1 -1
- data/rflow.gemspec +6 -6
- data/spec/fixtures/extensions_ints.rb +7 -8
- data/spec/rflow/component/port_spec.rb +16 -22
- data/spec/rflow/components/clock_spec.rb +12 -17
- data/spec/rflow/configuration/ruby_dsl_spec.rb +234 -46
- data/spec/rflow/configuration_spec.rb +5 -5
- data/spec/rflow/forward_to_input_port_spec.rb +10 -18
- data/spec/rflow/forward_to_output_port_spec.rb +6 -13
- data/spec/rflow/logger_spec.rb +6 -6
- data/spec/rflow/message/data/raw_spec.rb +3 -3
- data/spec/rflow/message_spec.rb +16 -16
- data/spec/rflow_spec.rb +37 -37
- data/spec/spec_helper.rb +3 -5
- metadata +20 -17
@@ -43,11 +43,11 @@ class RFlow
|
|
43
43
|
Configuration.add_available_data_extension('A::B::C', C = Module.new)
|
44
44
|
Configuration.add_available_data_extension('A::B::C::D', D = Module.new)
|
45
45
|
|
46
|
-
Configuration.available_data_extensions['A'].
|
47
|
-
Configuration.available_data_extensions['A::B'].
|
48
|
-
Configuration.available_data_extensions['A::B::C'].
|
49
|
-
Configuration.available_data_extensions['A::B::C::D'].
|
50
|
-
Configuration.available_data_extensions['A::B::C::D::E'].
|
46
|
+
expect(Configuration.available_data_extensions['A']).to eq([A])
|
47
|
+
expect(Configuration.available_data_extensions['A::B']).to eq([A, B])
|
48
|
+
expect(Configuration.available_data_extensions['A::B::C']).to eq([A, B, C])
|
49
|
+
expect(Configuration.available_data_extensions['A::B::C::D']).to eq([A, B, C, D])
|
50
|
+
expect(Configuration.available_data_extensions['A::B::C::D::E']).to eq([A, B, C, D])
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -11,23 +11,15 @@ class RFlow
|
|
11
11
|
let(:dropped_message_connection) { RFlow::MessageCollectingConnection.new }
|
12
12
|
|
13
13
|
let(:generator) do
|
14
|
-
|
15
|
-
c.
|
16
|
-
|
17
|
-
RFlow::Components::GenerateIntegerSequence.new(config).tap do |c|
|
18
|
-
c.configure! config.options
|
19
|
-
c.out.add_connection nil, ForwardToInputPort.new(ruby_proc_filter, 'in', nil)
|
14
|
+
RFlow::Components::GenerateIntegerSequence.new.tap do |c|
|
15
|
+
c.configure!({})
|
16
|
+
c.out.direct_connect ruby_proc_filter.in
|
20
17
|
end
|
21
18
|
end
|
22
19
|
|
23
20
|
let(:ruby_proc_filter) do
|
24
|
-
|
25
|
-
c.
|
26
|
-
['filtered', 'dropped'].each {|p| c.output_ports << RFlow::Configuration::OutputPort.new(name: p) }
|
27
|
-
c.options = {'filter_proc_string' => 'message.data.data_object % 2 == 0'}
|
28
|
-
end
|
29
|
-
RFlow::Components::RubyProcFilter.new(config).tap do |c|
|
30
|
-
c.configure! config.options
|
21
|
+
RFlow::Components::RubyProcFilter.new.tap do |c|
|
22
|
+
c.configure! 'filter_proc_string' => 'message.data.data_object % 2 == 0'
|
31
23
|
c.filtered.add_connection nil, filtered_message_connection
|
32
24
|
c.dropped.add_connection nil, dropped_message_connection
|
33
25
|
end
|
@@ -36,12 +28,12 @@ class RFlow
|
|
36
28
|
def filtered_messages; filtered_message_connection.messages; end
|
37
29
|
def dropped_messages; dropped_message_connection.messages; end
|
38
30
|
|
39
|
-
it '
|
31
|
+
it 'should forward generated integers to be filtered by the proc filter' do
|
40
32
|
5.times { generator.generate }
|
41
|
-
filtered_messages.
|
42
|
-
filtered_messages.map(&:data).map(&:data_object).
|
43
|
-
dropped_messages.
|
44
|
-
dropped_messages.map(&:data).map(&:data_object).
|
33
|
+
expect(filtered_messages).to have(3).messages
|
34
|
+
expect(filtered_messages.map(&:data).map(&:data_object)).to eq([0, 2, 4])
|
35
|
+
expect(dropped_messages).to have(2).messages
|
36
|
+
expect(dropped_messages.map(&:data).map(&:data_object)).to eq([1, 3])
|
45
37
|
end
|
46
38
|
end
|
47
39
|
end
|
@@ -10,22 +10,15 @@ class RFlow
|
|
10
10
|
let(:message_connection) { RFlow::MessageCollectingConnection.new }
|
11
11
|
|
12
12
|
let(:generator) do
|
13
|
-
|
14
|
-
c.
|
15
|
-
|
16
|
-
RFlow::Components::GenerateIntegerSequence.new(config).tap do |c|
|
17
|
-
c.configure! config.options
|
18
|
-
c.out.add_connection nil, ForwardToOutputPort.new(ruby_proc_filter, 'filtered')
|
13
|
+
RFlow::Components::GenerateIntegerSequence.new.tap do |c|
|
14
|
+
c.configure!({})
|
15
|
+
c.out.direct_connect ruby_proc_filter.filtered
|
19
16
|
end
|
20
17
|
end
|
21
18
|
|
22
19
|
let(:ruby_proc_filter) do
|
23
|
-
|
24
|
-
c.
|
25
|
-
c.options = {'filter_proc_string' => 'message % 2 == 0'}
|
26
|
-
end
|
27
|
-
RFlow::Components::RubyProcFilter.new(config).tap do |c|
|
28
|
-
c.configure! config.options
|
20
|
+
RFlow::Components::RubyProcFilter.new.tap do |c|
|
21
|
+
c.configure! 'filter_proc_string' => 'message % 2 == 0'
|
29
22
|
c.filtered.add_connection nil, message_connection
|
30
23
|
end
|
31
24
|
end
|
@@ -34,7 +27,7 @@ class RFlow
|
|
34
27
|
|
35
28
|
it 'should place the messages on the output port, regardless of the filter' do
|
36
29
|
5.times { generator.generate }
|
37
|
-
messages.map(&:data).map(&:data_object).
|
30
|
+
expect(messages.map(&:data).map(&:data_object)).to eq([0, 1, 2, 3, 4])
|
38
31
|
end
|
39
32
|
end
|
40
33
|
end
|
data/spec/rflow/logger_spec.rb
CHANGED
@@ -18,10 +18,10 @@ class RFlow
|
|
18
18
|
before(:each) { initialize_logger }
|
19
19
|
|
20
20
|
it "should initialize correctly" do
|
21
|
-
File.exist?(log_file_path).
|
21
|
+
expect(File.exist?(log_file_path)).to be true
|
22
22
|
|
23
23
|
logger.error "TESTTESTTEST"
|
24
|
-
File.read(log_file_path).
|
24
|
+
expect(File.read(log_file_path)).to match(/TESTTESTTEST/)
|
25
25
|
|
26
26
|
logger.close
|
27
27
|
end
|
@@ -29,16 +29,16 @@ class RFlow
|
|
29
29
|
it "should reopen correctly" do
|
30
30
|
moved_path = log_file_path + '.old'
|
31
31
|
|
32
|
-
File.exist?(log_file_path).
|
33
|
-
File.exist?(moved_path).
|
32
|
+
expect(File.exist?(log_file_path)).to be true
|
33
|
+
expect(File.exist?(moved_path)).to be false
|
34
34
|
|
35
35
|
File.rename log_file_path, moved_path
|
36
36
|
|
37
37
|
logger.reopen
|
38
38
|
|
39
39
|
logger.error "TESTTESTTEST"
|
40
|
-
File.read(log_file_path).
|
41
|
-
File.read(moved_path).
|
40
|
+
expect(File.read(log_file_path)).to match(/TESTTESTTEST/)
|
41
|
+
expect(File.read(moved_path)).not_to match(/TESTTESTTEST/)
|
42
42
|
|
43
43
|
logger.close
|
44
44
|
end
|
@@ -8,7 +8,7 @@ class RFlow
|
|
8
8
|
let(:schema) { Configuration.available_data_types['RFlow::Message::Data::Raw']['avro'] }
|
9
9
|
|
10
10
|
it "should load the schema" do
|
11
|
-
schema.
|
11
|
+
expect(schema).not_to be_nil
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should encode and decode an object" do
|
@@ -20,8 +20,8 @@ class RFlow
|
|
20
20
|
expect { decode_avro(schema, encoded) }.to_not raise_error
|
21
21
|
decoded = decode_avro(schema, encoded)
|
22
22
|
|
23
|
-
decoded.
|
24
|
-
decoded['raw'].
|
23
|
+
expect(decoded).to eq(raw)
|
24
|
+
expect(decoded['raw']).to eq(raw['raw'])
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
data/spec/rflow/message_spec.rb
CHANGED
@@ -83,18 +83,18 @@ class RFlow
|
|
83
83
|
|
84
84
|
it "should correctly set the provenance processing events" do
|
85
85
|
Message.new('string_type', valid_provenance).provenance[1].tap do |p|
|
86
|
-
p.component_instance_uuid.
|
87
|
-
p.started_at.
|
88
|
-
p.completed_at.
|
89
|
-
p.context.
|
86
|
+
expect(p.component_instance_uuid).to eq('uuid')
|
87
|
+
expect(p.started_at).to eq(Time.xmlschema(valid_xmlschema_time))
|
88
|
+
expect(p.completed_at).to be_nil
|
89
|
+
expect(p.context).to be_nil
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
93
|
it "should to_hash its provenance correctly" do
|
94
|
-
Message.new('string_type', valid_provenance).provenance.map(&:to_hash).
|
94
|
+
expect(Message.new('string_type', valid_provenance).provenance.map(&:to_hash)).to eq([
|
95
95
|
{"component_instance_uuid" => "uuid", "started_at" => nil, "completed_at" => nil, "context" => nil},
|
96
96
|
{"component_instance_uuid" => "uuid", "started_at" => valid_xmlschema_time, "completed_at" => nil, "context" => nil},
|
97
|
-
{"component_instance_uuid" => "uuid", "started_at" => valid_xmlschema_time, "completed_at" => valid_xmlschema_time, "context" => "context"}]
|
97
|
+
{"component_instance_uuid" => "uuid", "started_at" => valid_xmlschema_time, "completed_at" => valid_xmlschema_time, "context" => "context"}])
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
@@ -106,8 +106,8 @@ class RFlow
|
|
106
106
|
end
|
107
107
|
|
108
108
|
Message.from_avro(message.to_avro).tap do |processed|
|
109
|
-
processed.data.to_avro.
|
110
|
-
processed.data.data_object.
|
109
|
+
expect(processed.data.to_avro).to eq(message.data.to_avro)
|
110
|
+
expect(processed.data.data_object).to eq(message.data.data_object)
|
111
111
|
end
|
112
112
|
end
|
113
113
|
end
|
@@ -117,11 +117,11 @@ class RFlow
|
|
117
117
|
module ExtensionModule; def ext_method; end; end
|
118
118
|
|
119
119
|
message = Message.new('string_type')
|
120
|
-
message.data.methods.
|
120
|
+
expect(message.data.methods).not_to include(:ext_method)
|
121
121
|
|
122
122
|
Configuration.add_available_data_extension('string_type', ExtensionModule)
|
123
123
|
message = Message.new('string_type')
|
124
|
-
message.data.methods.
|
124
|
+
expect(message.data.methods).to include(:ext_method)
|
125
125
|
end
|
126
126
|
end
|
127
127
|
end
|
@@ -138,17 +138,17 @@ class RFlow
|
|
138
138
|
|
139
139
|
@raw_schema = Configuration.available_data_types['RFlow::Message::Data::Raw']['avro']
|
140
140
|
|
141
|
-
encode_avro(@raw_schema, message.data.data_object).
|
142
|
-
decode_avro(@raw_schema, message.data.to_avro).
|
141
|
+
expect(encode_avro(@raw_schema, message.data.data_object)).to eq(message.data.to_avro)
|
142
|
+
expect(decode_avro(@raw_schema, message.data.to_avro)).to eq(message.data.data_object)
|
143
143
|
|
144
144
|
message_data_avro = message.data.to_avro.force_encoding('BINARY')
|
145
145
|
processed_message_data_avro = processed_message.data.to_avro.force_encoding('BINARY')
|
146
146
|
|
147
|
-
Digest::MD5.hexdigest(message_avro).
|
147
|
+
expect(Digest::MD5.hexdigest(message_avro)).to eq(Digest::MD5.hexdigest(processed_message_avro))
|
148
148
|
|
149
|
-
message_data_avro.
|
150
|
-
Digest::MD5.hexdigest(message_data_avro).
|
151
|
-
Digest::MD5.hexdigest(message.data.raw).
|
149
|
+
expect(message_data_avro).to eq(processed_message_data_avro)
|
150
|
+
expect(Digest::MD5.hexdigest(message_data_avro)).to eq(Digest::MD5.hexdigest(processed_message_data_avro))
|
151
|
+
expect(Digest::MD5.hexdigest(message.data.raw)).to eq(Digest::MD5.hexdigest(processed_message.data.raw))
|
152
152
|
end
|
153
153
|
end
|
154
154
|
end
|
data/spec/rflow_spec.rb
CHANGED
@@ -36,7 +36,7 @@ describe RFlow do
|
|
36
36
|
sleep(5)
|
37
37
|
|
38
38
|
# Shut down the workers, the reactor, and the thread
|
39
|
-
RFlow.master.shutdown! 'SIGQUIT'
|
39
|
+
RFlow.master.shutdown! 'SIGQUIT' if RFlow.master
|
40
40
|
EM.run { EM.stop }
|
41
41
|
rflow_thread.join
|
42
42
|
end
|
@@ -64,8 +64,8 @@ describe RFlow do
|
|
64
64
|
c.connect 'generate_ints2#even_odd_out' => 'output_even_odd2#in'
|
65
65
|
end
|
66
66
|
|
67
|
-
RFlow.master.
|
68
|
-
RFlow.master.shards.first.
|
67
|
+
expect(RFlow.master).to have(1).shard
|
68
|
+
expect(RFlow.master.shards.first).to have(1).worker
|
69
69
|
|
70
70
|
output_files = {
|
71
71
|
'out' => [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
|
@@ -77,8 +77,8 @@ describe RFlow do
|
|
77
77
|
}
|
78
78
|
|
79
79
|
output_files.each do |file_name, expected_contents|
|
80
|
-
File.exist?(File.join(@temp_directory_path, file_name)).
|
81
|
-
File.readlines(file_name).map(&:to_i).
|
80
|
+
expect(File.exist?(File.join(@temp_directory_path, file_name))).to be true
|
81
|
+
expect(File.readlines(file_name).map(&:to_i)).to eq(expected_contents)
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
@@ -114,9 +114,9 @@ describe RFlow do
|
|
114
114
|
c.connect 'generate_ints3#out' => 'output_all#in'
|
115
115
|
end
|
116
116
|
|
117
|
-
RFlow.master.
|
118
|
-
RFlow.master.shards.map(&:count).
|
119
|
-
RFlow.master.shards.map(&:workers).map(&:count).
|
117
|
+
expect(RFlow.master).to have(4).shards
|
118
|
+
expect(RFlow.master.shards.map(&:count)).to eq([1, 3, 2, 2])
|
119
|
+
expect(RFlow.master.shards.map(&:workers).map(&:count)).to eq([1, 3, 2, 2])
|
120
120
|
|
121
121
|
output_files = {
|
122
122
|
'out1' => [0, 3, 6, 9] * 3,
|
@@ -126,8 +126,8 @@ describe RFlow do
|
|
126
126
|
}
|
127
127
|
|
128
128
|
output_files.each do |file_name, expected_contents|
|
129
|
-
File.exist?(File.join(@temp_directory_path, file_name)).
|
130
|
-
File.readlines(file_name).map(&:to_i).sort.
|
129
|
+
expect(File.exist?(File.join(@temp_directory_path, file_name))).to be true
|
130
|
+
expect(File.readlines(file_name).map(&:to_i).sort).to eq(expected_contents.sort)
|
131
131
|
end
|
132
132
|
end
|
133
133
|
end
|
@@ -157,13 +157,13 @@ describe RFlow do
|
|
157
157
|
r = execute_rflow("load -d #{db_file_name} -c #{config_file_name}")
|
158
158
|
|
159
159
|
# Make sure that the process execution worked
|
160
|
-
r[:status].exitstatus.
|
161
|
-
r[:stderr].
|
162
|
-
r[:stdout].
|
160
|
+
expect(r[:status].exitstatus).to eq(0)
|
161
|
+
expect(r[:stderr]).to eq('')
|
162
|
+
expect(r[:stdout]).to match /Successfully initialized database.*#{db_file_name}/
|
163
163
|
|
164
164
|
# Make sure the config actually got loaded
|
165
165
|
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: db_file_name
|
166
|
-
RFlow::Configuration::Setting.where(:name => 'mysetting').first.value.
|
166
|
+
expect(RFlow::Configuration::Setting.where(:name => 'mysetting').first.value).to eq('myvalue')
|
167
167
|
end
|
168
168
|
|
169
169
|
it "should not load a database if the database file already exists" do
|
@@ -172,9 +172,9 @@ describe RFlow do
|
|
172
172
|
r = execute_rflow("load -d #{db_file_name} -c #{config_file_name}")
|
173
173
|
|
174
174
|
# Make sure that the process execution worked
|
175
|
-
r[:status].exitstatus.
|
176
|
-
r[:stderr].
|
177
|
-
r[:stdout].
|
175
|
+
expect(r[:status].exitstatus).to eq(1)
|
176
|
+
expect(r[:stderr]).to eq('')
|
177
|
+
expect(r[:stdout]).to match /Config database.*#{db_file_name}.*exists/
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
@@ -215,34 +215,34 @@ describe RFlow do
|
|
215
215
|
EOF
|
216
216
|
end
|
217
217
|
r = execute_rflow("load -d #{db_file_name} -c #{config_file_name}")
|
218
|
-
r[:status].exitstatus.
|
219
|
-
r[:stderr].
|
220
|
-
r[:stdout].
|
218
|
+
expect(r[:status].exitstatus).to eq(0)
|
219
|
+
expect(r[:stderr]).to eq('')
|
220
|
+
expect(r[:stdout]).to match /Successfully initialized database.*#{db_file_name}/
|
221
221
|
end
|
222
222
|
|
223
223
|
it "should not start if the components aren't loaded" do
|
224
224
|
r = execute_rflow("start -d #{db_file_name} -f")
|
225
225
|
|
226
|
-
r[:status].exitstatus.
|
227
|
-
r[:stderr].
|
228
|
-
r[:stdout].
|
226
|
+
expect(r[:status].exitstatus).to eq(1)
|
227
|
+
expect(r[:stderr]).to eq('')
|
228
|
+
expect(r[:stdout]).to match /error/i
|
229
229
|
end
|
230
230
|
|
231
231
|
it "should daemonize and run in the background" do
|
232
232
|
begin
|
233
233
|
r = execute_rflow("start -d #{db_file_name} -e #{@extensions_file_name}")
|
234
234
|
|
235
|
-
r[:status].exitstatus.
|
236
|
-
r[:stderr].
|
237
|
-
r[:stdout].
|
235
|
+
expect(r[:status].exitstatus).to eq(0)
|
236
|
+
expect(r[:stderr]).to eq('')
|
237
|
+
expect(r[:stdout]).not_to match /error/i
|
238
238
|
|
239
239
|
sleep 2 # give the daemon a chance to finish
|
240
240
|
|
241
241
|
log_contents = File.read("log/#{app_name}.log").chomp
|
242
242
|
log_lines = log_contents.split("\n")
|
243
243
|
|
244
|
-
log_lines.each {|line| line.
|
245
|
-
log_lines.each {|line| line.
|
244
|
+
log_lines.each {|line| expect(line).not_to match /^ERROR/ }
|
245
|
+
log_lines.each {|line| expect(line).not_to match /^DEBUG/ }
|
246
246
|
|
247
247
|
# Grab all the pids from the log, which seems to be the only
|
248
248
|
# reliable way to get them
|
@@ -252,15 +252,15 @@ describe RFlow do
|
|
252
252
|
master_pid = File.read("run/#{app_name}.pid").chomp.to_i
|
253
253
|
worker_pids = log_pids - [initial_pid, master_pid]
|
254
254
|
|
255
|
-
log_pids.
|
256
|
-
log_pids.
|
255
|
+
expect(log_pids).to include initial_pid
|
256
|
+
expect(log_pids).to include master_pid
|
257
257
|
|
258
|
-
worker_pids.
|
259
|
-
worker_pids.
|
258
|
+
expect(worker_pids).to have(10).pids # 1+3+2+2 workers, 2 brokers
|
259
|
+
expect(worker_pids).not_to include 0
|
260
260
|
|
261
261
|
expect { Process.kill(0, initial_pid) }.to raise_error(Errno::ESRCH)
|
262
262
|
([master_pid] + worker_pids).each do |pid|
|
263
|
-
Process.kill(0, pid).
|
263
|
+
expect(Process.kill(0, pid)).to eq(1)
|
264
264
|
end
|
265
265
|
|
266
266
|
output_files = {
|
@@ -271,15 +271,15 @@ describe RFlow do
|
|
271
271
|
}
|
272
272
|
|
273
273
|
output_files.each do |file_name, expected_contents|
|
274
|
-
File.exist?(File.join(@temp_directory_path, file_name)).
|
275
|
-
File.readlines(file_name).map(&:to_i).sort.
|
274
|
+
expect(File.exist?(File.join(@temp_directory_path, file_name))).to be true
|
275
|
+
expect(File.readlines(file_name).map(&:to_i).sort).to eq(expected_contents.sort)
|
276
276
|
end
|
277
277
|
|
278
278
|
# Terminate the master
|
279
|
-
Process.kill("TERM", master_pid).
|
279
|
+
expect(Process.kill("TERM", master_pid)).to eq(1)
|
280
280
|
|
281
281
|
# Make sure everything is dead after a second
|
282
|
-
sleep
|
282
|
+
sleep 2
|
283
283
|
([master_pid] + worker_pids).each do |pid|
|
284
284
|
expect { Process.kill(0, pid) }.to raise_error(Errno::ESRCH)
|
285
285
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -3,6 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'rflow')
|
|
3
3
|
require 'fileutils'
|
4
4
|
require 'log4r'
|
5
5
|
require 'rspec/collection_matchers'
|
6
|
+
require 'tmpdir'
|
6
7
|
|
7
8
|
I18n.enforce_available_locales = true
|
8
9
|
|
@@ -11,17 +12,14 @@ RSpec.configure do |config|
|
|
11
12
|
RFlow.logger = Log4r::Logger.new 'test'
|
12
13
|
RFlow.logger.add Log4r::StdoutOutputter.new('test_stdout', :formatter => RFlow::Logger::LOG_PATTERN_FORMATTER)
|
13
14
|
RFlow.logger.level = 5
|
14
|
-
@base_temp_directory_path = File.join(File.dirname(__FILE__), 'tmp')
|
15
15
|
end
|
16
16
|
|
17
17
|
config.before(:each) do
|
18
|
-
@
|
19
|
-
@temp_directory_path = File.expand_path(File.join(@base_temp_directory_path, @entropy))
|
20
|
-
FileUtils.mkdir_p @temp_directory_path
|
18
|
+
@temp_directory_path = Dir.mktmpdir('rflow')
|
21
19
|
end
|
22
20
|
|
23
21
|
config.after(:each) do
|
24
|
-
FileUtils.rm_rf @
|
22
|
+
FileUtils.rm_rf @temp_directory_path
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.0a3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael L. Artz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uuidtools
|
@@ -84,86 +84,86 @@ dependencies:
|
|
84
84
|
name: em-zeromq
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.
|
89
|
+
version: 0.5.0
|
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
|
-
version: 0.
|
96
|
+
version: 0.5.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: bundler
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.6'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1.
|
110
|
+
version: '1.6'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '3.0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '3.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec-collection_matchers
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: '1.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: '1.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '10.3'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: '10.3'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.8
|
159
|
+
version: '0.8'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.8
|
166
|
+
version: '0.8'
|
167
167
|
description: A Ruby flow-based programming framework that utilizes ZeroMQ for component
|
168
168
|
connections and Avro for serialization
|
169
169
|
email:
|
@@ -183,14 +183,17 @@ files:
|
|
183
183
|
- Guardfile
|
184
184
|
- LICENSE
|
185
185
|
- NOTES
|
186
|
+
- README.VAGRANT
|
186
187
|
- README.md
|
187
188
|
- Rakefile
|
189
|
+
- Vagrantfile
|
188
190
|
- bin/rflow
|
189
191
|
- example/basic_config.rb
|
190
192
|
- example/basic_extensions.rb
|
191
193
|
- example/http_config.rb
|
192
194
|
- example/http_extensions.rb
|
193
195
|
- lib/rflow.rb
|
196
|
+
- lib/rflow/broker.rb
|
194
197
|
- lib/rflow/child_process.rb
|
195
198
|
- lib/rflow/component.rb
|
196
199
|
- lib/rflow/component/port.rb
|
@@ -262,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
265
|
version: 1.3.1
|
263
266
|
requirements: []
|
264
267
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.
|
268
|
+
rubygems_version: 2.3.0
|
266
269
|
signing_key:
|
267
270
|
specification_version: 4
|
268
271
|
summary: A Ruby flow-based programming framework
|