wonkavision 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +7 -0
- data/lib/wonkavision.rb +1 -0
- data/lib/wonkavision/event_binding.rb +1 -0
- data/lib/wonkavision/message_mapper/map.rb +37 -10
- data/lib/wonkavision/plugins/business_activity.rb +27 -14
- data/lib/wonkavision/plugins/business_activity/event_binding.rb +16 -0
- data/lib/wonkavision/plugins/event_handling.rb +5 -1
- data/lib/wonkavision/version.rb +1 -1
- data/test/business_activity_test.rb +8 -1
- data/test/log/test.log +2685 -0
- data/test/map_test.rb +14 -0
- data/test/test_activity_models.rb +4 -0
- data/wonkavision.gemspec +3 -2
- metadata +5 -4
data/test/map_test.rb
CHANGED
@@ -183,5 +183,19 @@ class MapTest < ActiveSupport::TestCase
|
|
183
183
|
assert_equal "1", m.a
|
184
184
|
end
|
185
185
|
end
|
186
|
+
context "when mapping an array" do
|
187
|
+
should "apply the supplied block to each item in the array" do
|
188
|
+
m = Wonkavision::MessageMapper::Map.new(:collection=>[{:a=>1,:b=>2},{:a=>3,:b=>4}])
|
189
|
+
m.array :collection do
|
190
|
+
string :a
|
191
|
+
integer :b
|
192
|
+
end
|
193
|
+
assert_equal 2, m.collection.length
|
194
|
+
assert_equal "1", m.collection[0].a
|
195
|
+
assert_equal 2, m.collection[0].b
|
196
|
+
assert_equal "3", m.collection[1].a
|
197
|
+
assert_equal 4, m.collection[1].b
|
198
|
+
end
|
199
|
+
end
|
186
200
|
end
|
187
201
|
end
|
@@ -54,10 +54,14 @@ unless defined?(::TestEventHandler)
|
|
54
54
|
milestone :ms2, :evt2
|
55
55
|
milestone :ms3, :evt3, '/not_test/evt4'
|
56
56
|
|
57
|
+
event :e1, :evt5, :correlate_by=>{:event=>:alt_event_id, :model=>:alt_model_id}
|
58
|
+
|
57
59
|
map /not_test\/.*/i do
|
58
60
|
import "evt4_test_map"
|
59
61
|
string 'modified_another_field'=> "'#{context["another_field"]}' WAS SERVED!! OH YEAH!! IN-YOUR-FACE!!"
|
60
62
|
end
|
63
|
+
|
64
|
+
key :alt_model_id, String
|
61
65
|
end
|
62
66
|
|
63
67
|
Wonkavision::MessageMapper.register("evt4_test_map") do
|
data/wonkavision.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wonkavision}
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Nathan Stults"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-08-02}
|
13
13
|
s.description = %q{Wonkavision is a small gem that allows you to publish}
|
14
14
|
s.email = %q{hereiam@sonic.net}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -36,6 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
"lib/wonkavision/persistence/mongo_mapper_adapter.rb",
|
37
37
|
"lib/wonkavision/plugins.rb",
|
38
38
|
"lib/wonkavision/plugins/business_activity.rb",
|
39
|
+
"lib/wonkavision/plugins/business_activity/event_binding.rb",
|
39
40
|
"lib/wonkavision/plugins/callbacks.rb",
|
40
41
|
"lib/wonkavision/plugins/event_handling.rb",
|
41
42
|
"lib/wonkavision/plugins/timeline.rb",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wonkavision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathan Stults
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-08-02 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/wonkavision/persistence/mongo_mapper_adapter.rb
|
79
79
|
- lib/wonkavision/plugins.rb
|
80
80
|
- lib/wonkavision/plugins/business_activity.rb
|
81
|
+
- lib/wonkavision/plugins/business_activity/event_binding.rb
|
81
82
|
- lib/wonkavision/plugins/callbacks.rb
|
82
83
|
- lib/wonkavision/plugins/event_handling.rb
|
83
84
|
- lib/wonkavision/plugins/timeline.rb
|