wukong-storm 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +58 -1
- data/.yardopts +5 -0
- data/Gemfile +2 -0
- data/LICENSE.md +95 -0
- data/README.md +4 -4
- data/bin/wu-storm +2 -50
- data/lib/wukong-storm.rb +34 -1
- data/lib/wukong-storm/driver.rb +58 -0
- data/lib/wukong-storm/runner.rb +29 -34
- data/lib/wukong-storm/{configuration.rb → storm_settings.java} +318 -327
- data/lib/wukong-storm/version.rb +2 -1
- data/spec/spec_helper.rb +15 -0
- data/spec/wu_storm_spec.rb +6 -6
- data/wu-storm.gemspec +1 -1
- metadata +10 -12
data/lib/wukong-storm/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -2,5 +2,20 @@ require 'wukong-storm'
|
|
2
2
|
require 'wukong/spec_helpers'
|
3
3
|
|
4
4
|
RSpec.configure do |config|
|
5
|
+
config.mock_with :rspec
|
6
|
+
|
5
7
|
include Wukong::SpecHelpers
|
8
|
+
|
9
|
+
config.before(:each) do
|
10
|
+
Wukong::Log.level = Log4r::OFF
|
11
|
+
end
|
12
|
+
|
13
|
+
def root
|
14
|
+
@root ||= Pathname.new(File.expand_path('../..', __FILE__))
|
15
|
+
end
|
16
|
+
|
17
|
+
def storm_runner *args, &block
|
18
|
+
runner(Wukong::Storm::StormRunner, 'wu-storm', *args)
|
19
|
+
end
|
20
|
+
|
6
21
|
end
|
data/spec/wu_storm_spec.rb
CHANGED
@@ -14,41 +14,41 @@ describe 'wu-storm' do
|
|
14
14
|
context 'without any arguments' do
|
15
15
|
subject { command 'wu-storm' }
|
16
16
|
it { should exit_with(:non_zero) }
|
17
|
-
it { should have_stderr(
|
17
|
+
it { should have_stderr(/provide a processor.*to run/) }
|
18
18
|
end
|
19
19
|
|
20
20
|
context 'with a simple processor' do
|
21
21
|
let(:input) { 'one event' }
|
22
22
|
subject { command('wu-storm', examples, '--run=simple') < input }
|
23
23
|
it { should exit_with(0) }
|
24
|
-
it { should have_stdout(
|
24
|
+
it { should have_stdout("one event\n---\n") }
|
25
25
|
end
|
26
26
|
|
27
27
|
context 'with a skipped processor' do
|
28
28
|
let(:input) { 'never see this' }
|
29
29
|
subject { command('wu-storm', examples, '--run=skipped') < input }
|
30
30
|
it { should exit_with(0) }
|
31
|
-
it { should have_stdout(
|
31
|
+
it { should have_stdout("---\n") }
|
32
32
|
end
|
33
33
|
|
34
34
|
context 'with a duplicating processor' do
|
35
35
|
let(:input) { 'foo' }
|
36
36
|
subject { command('wu-storm', examples, '--run=multi') < input }
|
37
37
|
it { should exit_with(0) }
|
38
|
-
it { should have_stdout("foo\nfoo\nfoo
|
38
|
+
it { should have_stdout("foo\nfoo\nfoo\n---\n") }
|
39
39
|
end
|
40
40
|
|
41
41
|
context 'with a flow' do
|
42
42
|
let(:input) { '{"foo":"bar"}' }
|
43
43
|
subject { command('wu-storm', examples, '--run=flow') < input }
|
44
44
|
it { should exit_with(0) }
|
45
|
-
it { should have_stdout(
|
45
|
+
it { should have_stdout("I raised the bar\n---\n") }
|
46
46
|
end
|
47
47
|
|
48
48
|
context 'with multiple arguments' do
|
49
49
|
let(:input) { "foo\nbar\nbaz" }
|
50
50
|
subject { command('wu-storm', examples, '--run=simple') < input }
|
51
51
|
it { should exit_with(0) }
|
52
|
-
it { should have_stdout(
|
52
|
+
it { should have_stdout("foo\n---\nbar\n---\nbaz\n---\n") }
|
53
53
|
end
|
54
54
|
end
|
data/wu-storm.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wukong-storm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: wukong
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - '='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 3.0.0
|
22
|
+
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - '='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 3.0.0
|
30
|
+
version: 3.0.0
|
31
31
|
description: ''
|
32
32
|
email: coders@infochimps.org
|
33
33
|
executables:
|
@@ -37,13 +37,16 @@ extra_rdoc_files: []
|
|
37
37
|
files:
|
38
38
|
- .gitignore
|
39
39
|
- .rspec
|
40
|
+
- .yardopts
|
40
41
|
- Gemfile
|
42
|
+
- LICENSE.md
|
41
43
|
- README.md
|
42
44
|
- Rakefile
|
43
45
|
- bin/wu-storm
|
44
46
|
- lib/wukong-storm.rb
|
45
|
-
- lib/wukong-storm/
|
47
|
+
- lib/wukong-storm/driver.rb
|
46
48
|
- lib/wukong-storm/runner.rb
|
49
|
+
- lib/wukong-storm/storm_settings.java
|
47
50
|
- lib/wukong-storm/version.rb
|
48
51
|
- spec/spec_helper.rb
|
49
52
|
- spec/support/examples.rb
|
@@ -62,21 +65,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
65
|
- - ! '>='
|
63
66
|
- !ruby/object:Gem::Version
|
64
67
|
version: '0'
|
65
|
-
segments:
|
66
|
-
- 0
|
67
|
-
hash: 1950613980355897537
|
68
68
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
69
|
none: false
|
70
70
|
requirements:
|
71
71
|
- - ! '>='
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
|
-
segments:
|
75
|
-
- 0
|
76
|
-
hash: 1950613980355897537
|
77
74
|
requirements: []
|
78
75
|
rubyforge_project:
|
79
|
-
rubygems_version: 1.8.
|
76
|
+
rubygems_version: 1.8.23
|
80
77
|
signing_key:
|
81
78
|
specification_version: 3
|
82
79
|
summary: Storm processing for Ruby
|
@@ -84,3 +81,4 @@ test_files:
|
|
84
81
|
- spec/spec_helper.rb
|
85
82
|
- spec/support/examples.rb
|
86
83
|
- spec/wu_storm_spec.rb
|
84
|
+
has_rdoc:
|