isimud 0.7.0 → 1.3.1
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/.rspec +1 -2
- data/.ruby-version +1 -1
- data/.yardoc/checksums +10 -10
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +63 -73
- data/LICENSE.txt +19 -0
- data/README.md +51 -3
- data/Rakefile +5 -0
- data/doc/Isimud/BunnyClient.html +882 -179
- data/doc/Isimud/Client.html +236 -18
- data/doc/Isimud/Event.html +211 -95
- data/doc/Isimud/EventListener.html +325 -307
- data/doc/Isimud/EventObserver/ClassMethods.html +14 -14
- data/doc/Isimud/EventObserver.html +418 -36
- data/doc/Isimud/Generators/ConfigGenerator.html +2 -2
- data/doc/Isimud/Generators/InitializerGenerator.html +2 -2
- data/doc/Isimud/Generators.html +2 -2
- data/doc/Isimud/Logging.html +3 -3
- data/doc/Isimud/ModelWatcher/ClassMethods.html +3 -3
- data/doc/Isimud/ModelWatcher.html +2 -2
- data/doc/Isimud/Railtie.html +2 -2
- data/doc/Isimud/TestClient/Queue.html +374 -71
- data/doc/Isimud/TestClient.html +169 -161
- data/doc/Isimud.html +80 -76
- data/doc/_index.html +5 -2
- data/doc/file.LICENSE.html +73 -0
- data/doc/file.README.html +131 -7
- data/doc/file_list.html +3 -0
- data/doc/index.html +131 -7
- data/doc/method_list.html +183 -105
- data/doc/top-level-namespace.html +2 -2
- data/isimud.gemspec +18 -16
- data/lib/isimud/bunny_client.rb +85 -32
- data/lib/isimud/client.rb +23 -7
- data/lib/isimud/event.rb +11 -14
- data/lib/isimud/event_listener.rb +123 -65
- data/lib/isimud/event_observer.rb +70 -10
- data/lib/isimud/model_watcher.rb +1 -1
- data/lib/isimud/test_client.rb +54 -26
- data/lib/isimud/version.rb +1 -1
- data/lib/isimud.rb +1 -1
- data/spec/internal/app/models/company.rb +8 -10
- data/spec/internal/app/models/user.rb +11 -1
- data/spec/internal/db/schema.rb +5 -0
- data/spec/isimud/bunny_client_spec.rb +21 -9
- data/spec/isimud/client_spec.rb +40 -0
- data/spec/isimud/event_listener_spec.rb +50 -22
- data/spec/isimud/event_observer_spec.rb +107 -16
- data/spec/isimud/model_watcher_spec.rb +18 -23
- data/spec/isimud/test_client_spec.rb +43 -8
- data/spec/isimud_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -0
- metadata +19 -35
- checksums.yaml.gz.sig +0 -0
- data/certs/gfeil.pem +0 -21
- data/release +0 -31
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f4162cffed96ee6706c449f3f22920e71d4344c
|
4
|
+
data.tar.gz: 62745767638aa63ed33ffdc78c64918f3834b75b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85fbfd7875e94f1b999a061c5a9edf5d0c5396d0880bb8d17eedd13f93eaa5dc128aaa2525c70f7118cdceb8b520ee008efbbe010239404223e9a7dc44cabe8d
|
7
|
+
data.tar.gz: 44642e7749e0865e1d1dbd5f5217fe5b293f465fa3199f2c508137b0f1798a2293c32a6fb07b4ca0c482a6f1c944f60f1a5de0e7e85eb7aabed6ae36809453a5
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
--color
|
2
|
-
--require spec_helper
|
1
|
+
--color
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3
|
1
|
+
2.2.3
|
data/.yardoc/checksums
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
lib/isimud.rb
|
2
|
-
lib/isimud/event.rb
|
1
|
+
lib/isimud.rb 5a9fee170ff924c6347d98fb5a80980d5f0ecc9a
|
2
|
+
lib/isimud/event.rb f29a804bfa084e68329825b5fb9863d268f3ff27
|
3
3
|
lib/isimud/tasks.rb 8d07d80e178928098e959ebdcbda1707e9b50617
|
4
|
-
lib/isimud/client.rb
|
5
|
-
lib/isimud/version.rb
|
4
|
+
lib/isimud/client.rb 88ffac5ff4cc3306d0f1c9f9a1ca9d5c344e81cf
|
5
|
+
lib/isimud/version.rb 10899b20ed9eabb999e6724cdc5297914abb3db8
|
6
6
|
lib/isimud/logging.rb 2f506f049011441628a3d573d8e2a670156b4a3a
|
7
7
|
lib/isimud/railtie.rb e644c4d74ae8298f11dd0c2fcae1d72259e24ea3
|
8
|
-
lib/isimud/test_client.rb
|
9
|
-
lib/isimud/bunny_client.rb
|
10
|
-
lib/isimud/model_watcher.rb
|
11
|
-
lib/isimud/event_observer.rb
|
12
|
-
lib/isimud/event_listener.rb
|
8
|
+
lib/isimud/test_client.rb 5f5e0bdcb31289f4560248caad17d1b7bbc32201
|
9
|
+
lib/isimud/bunny_client.rb 7009922019087e2c9920073cb79c93aba8446dc4
|
10
|
+
lib/isimud/model_watcher.rb f6694603386e538f755ff7217f975f04c9529c26
|
11
|
+
lib/isimud/event_observer.rb 64c3af1d81df6a97cf9700eb71dc4d241f5b0044
|
12
|
+
lib/isimud/event_listener.rb b15d795824b48e2890d3916403acdc6a73e6a106
|
13
13
|
lib/rails/generators/isimud/config_generator.rb d1c964f26c6e0f0289343bac17d3a9b1f99d7a98
|
14
14
|
lib/rails/generators/isimud/initializer_generator.rb c7b188459d17d35ccbfa820a434dd6a97a58aeeb
|
15
|
-
lib/rails/generators/isimud/templates/initializer.rb
|
15
|
+
lib/rails/generators/isimud/templates/initializer.rb 6b937955296d704bfa4a06eec91ce14a6dd954ba
|
data/.yardoc/object_types
CHANGED
Binary file
|
data/.yardoc/objects/root.dat
CHANGED
Binary file
|
data/Gemfile
CHANGED
@@ -3,9 +3,10 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in isimud.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'activesupport', '
|
6
|
+
gem 'activesupport', '4.1.4'
|
7
7
|
gem 'bundler', '~> 1.6'
|
8
8
|
gem 'rake'
|
9
|
+
gem 'yard'
|
9
10
|
|
10
11
|
group :development, :test do
|
11
12
|
gem 'awesome_print'
|
data/Gemfile.lock
CHANGED
@@ -1,112 +1,101 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
isimud (
|
5
|
-
activerecord (>=
|
6
|
-
activesupport (>=
|
4
|
+
isimud (1.3.1)
|
5
|
+
activerecord (>= 4.1.4)
|
6
|
+
activesupport (>= 4.1.4)
|
7
7
|
bunny (>= 1.6.0)
|
8
8
|
chronic_duration (>= 0.10.6)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionpack (
|
14
|
-
|
15
|
-
activesupport (=
|
16
|
-
|
13
|
+
actionpack (4.1.4)
|
14
|
+
actionview (= 4.1.4)
|
15
|
+
activesupport (= 4.1.4)
|
16
|
+
rack (~> 1.5.2)
|
17
|
+
rack-test (~> 0.6.2)
|
18
|
+
actionview (4.1.4)
|
19
|
+
activesupport (= 4.1.4)
|
20
|
+
builder (~> 3.1)
|
17
21
|
erubis (~> 2.7.0)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
tzinfo (~>
|
31
|
-
activesupport (3.2.21)
|
32
|
-
i18n (~> 0.6, >= 0.6.4)
|
33
|
-
multi_json (~> 1.0)
|
22
|
+
activemodel (4.1.4)
|
23
|
+
activesupport (= 4.1.4)
|
24
|
+
builder (~> 3.1)
|
25
|
+
activerecord (4.1.4)
|
26
|
+
activemodel (= 4.1.4)
|
27
|
+
activesupport (= 4.1.4)
|
28
|
+
arel (~> 5.0.0)
|
29
|
+
activesupport (4.1.4)
|
30
|
+
i18n (~> 0.6, >= 0.6.9)
|
31
|
+
json (~> 1.7, >= 1.7.7)
|
32
|
+
minitest (~> 5.1)
|
33
|
+
thread_safe (~> 0.1)
|
34
|
+
tzinfo (~> 1.1)
|
34
35
|
amq-protocol (2.0.0)
|
35
|
-
arel (
|
36
|
-
awesome_print (1.
|
37
|
-
builder (3.
|
38
|
-
bunny (2.
|
36
|
+
arel (5.0.1.20140414130214)
|
37
|
+
awesome_print (1.6.1)
|
38
|
+
builder (3.2.2)
|
39
|
+
bunny (2.2.0)
|
39
40
|
amq-protocol (>= 2.0.0)
|
40
41
|
chronic_duration (0.10.6)
|
41
42
|
numerizer (~> 0.1.1)
|
42
|
-
codeclimate-test-reporter (0.4.
|
43
|
+
codeclimate-test-reporter (0.4.8)
|
43
44
|
simplecov (>= 0.7.1, < 1.0.0)
|
44
|
-
combustion (0.5.
|
45
|
+
combustion (0.5.3)
|
45
46
|
activesupport (>= 3.0.0)
|
46
47
|
railties (>= 3.0.0)
|
47
48
|
thor (>= 0.14.6)
|
48
|
-
database_cleaner (1.
|
49
|
+
database_cleaner (1.5.0)
|
49
50
|
diff-lcs (1.2.5)
|
50
51
|
docile (1.1.5)
|
51
52
|
erubis (2.7.0)
|
52
|
-
hike (1.2.3)
|
53
53
|
i18n (0.7.0)
|
54
|
-
|
55
|
-
|
56
|
-
multi_json (1.10.1)
|
54
|
+
json (1.8.3)
|
55
|
+
minitest (5.8.1)
|
57
56
|
numerizer (0.1.1)
|
58
|
-
rack (1.
|
59
|
-
rack-cache (1.2)
|
60
|
-
rack (>= 0.4)
|
61
|
-
rack-ssl (1.3.4)
|
62
|
-
rack
|
57
|
+
rack (1.5.5)
|
63
58
|
rack-test (0.6.3)
|
64
59
|
rack (>= 1.0)
|
65
|
-
railties (
|
66
|
-
actionpack (=
|
67
|
-
activesupport (=
|
68
|
-
rack-ssl (~> 1.3.2)
|
60
|
+
railties (4.1.4)
|
61
|
+
actionpack (= 4.1.4)
|
62
|
+
activesupport (= 4.1.4)
|
69
63
|
rake (>= 0.8.7)
|
70
|
-
|
71
|
-
thor (>= 0.14.6, < 2.0)
|
64
|
+
thor (>= 0.18.1, < 2.0)
|
72
65
|
rake (10.4.2)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
rspec-
|
77
|
-
|
78
|
-
rspec-
|
79
|
-
rspec-
|
80
|
-
rspec-support (~> 3.1.0)
|
81
|
-
rspec-expectations (3.1.2)
|
66
|
+
rspec (3.3.0)
|
67
|
+
rspec-core (~> 3.3.0)
|
68
|
+
rspec-expectations (~> 3.3.0)
|
69
|
+
rspec-mocks (~> 3.3.0)
|
70
|
+
rspec-core (3.3.2)
|
71
|
+
rspec-support (~> 3.3.0)
|
72
|
+
rspec-expectations (3.3.1)
|
82
73
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-mocks (3.
|
85
|
-
|
86
|
-
|
87
|
-
|
74
|
+
rspec-support (~> 3.3.0)
|
75
|
+
rspec-mocks (3.3.2)
|
76
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
+
rspec-support (~> 3.3.0)
|
78
|
+
rspec-support (3.3.0)
|
79
|
+
simplecov (0.10.0)
|
88
80
|
docile (~> 1.1.0)
|
89
|
-
|
90
|
-
simplecov-html (~> 0.
|
91
|
-
simplecov-html (0.
|
92
|
-
|
93
|
-
|
94
|
-
multi_json (~> 1.0)
|
95
|
-
rack (~> 1.0)
|
96
|
-
tilt (~> 1.1, != 1.3.0)
|
97
|
-
sqlite3 (1.3.10)
|
98
|
-
test_after_commit (0.4.0)
|
81
|
+
json (~> 1.8)
|
82
|
+
simplecov-html (~> 0.10.0)
|
83
|
+
simplecov-html (0.10.0)
|
84
|
+
sqlite3 (1.3.11)
|
85
|
+
test_after_commit (0.4.1)
|
99
86
|
activerecord (>= 3.2)
|
100
87
|
thor (0.19.1)
|
101
|
-
|
102
|
-
timecop (0.
|
103
|
-
tzinfo (
|
88
|
+
thread_safe (0.3.5)
|
89
|
+
timecop (0.8.0)
|
90
|
+
tzinfo (1.2.2)
|
91
|
+
thread_safe (~> 0.1)
|
92
|
+
yard (0.8.7.6)
|
104
93
|
|
105
94
|
PLATFORMS
|
106
95
|
ruby
|
107
96
|
|
108
97
|
DEPENDENCIES
|
109
|
-
activesupport (
|
98
|
+
activesupport (= 4.1.4)
|
110
99
|
awesome_print
|
111
100
|
bundler (~> 1.6)
|
112
101
|
codeclimate-test-reporter
|
@@ -118,6 +107,7 @@ DEPENDENCIES
|
|
118
107
|
sqlite3
|
119
108
|
test_after_commit
|
120
109
|
timecop
|
110
|
+
yard
|
121
111
|
|
122
112
|
BUNDLED WITH
|
123
113
|
1.10.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2016 Keas Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Isimud: AMQP based Messaging
|
1
|
+
# Isimud: AMQP based Messaging and Event Processing Abstraction Component.
|
2
2
|
|
3
3
|
>Isimud is a minor god, the messenger of the god Enki in Sumerian mythology.
|
4
4
|
>He is readily identifiable by the fact that he possesses two faces looking in opposite directions.
|
@@ -11,7 +11,7 @@ Isimud is a message publishing and consumption gem. It consists of the following
|
|
11
11
|
* A test client which mocks most client operations and allows for synchronous delivery and processing of messages for unit tests.
|
12
12
|
* A Model Watcher mixin for ActiveRecord that automatically sends messages whenever an ActiveRecord instance is created, modified, or destroyed.
|
13
13
|
* An Event Observer mixin for registering ActiveRecord models and instances with the EventListener for receiving messages.
|
14
|
-
* An Event Listener daemon process which manages queues for Event Observers.
|
14
|
+
* An Event Listener daemon process which manages queues and dispatches messages for Event Observers.
|
15
15
|
|
16
16
|
## Installation
|
17
17
|
|
@@ -77,7 +77,55 @@ if they do not exist.
|
|
77
77
|
|
78
78
|
## Changes
|
79
79
|
|
80
|
-
###
|
80
|
+
### 1.3.1
|
81
|
+
|
82
|
+
* Add EventObserver#deactivate_observer to trigger queue deletion for an observer instance.
|
83
|
+
|
84
|
+
### 1.3.0
|
85
|
+
|
86
|
+
* Added a new method, EventListener#bind_event_queues() for registering custom event handlers. Override
|
87
|
+
this method instead of bind_queues() to bind custom queues not handled by EventObserver instances.
|
88
|
+
* Add local host name to the EventListener observer queue to avoid possible collisions caused by processes on different
|
89
|
+
hosts sharing the same PID.
|
90
|
+
* Added lots of documentation.
|
91
|
+
|
92
|
+
### 1.2.1
|
93
|
+
|
94
|
+
* Include attributes in ModelWatcher destroy message
|
95
|
+
|
96
|
+
### 1.2.0
|
97
|
+
|
98
|
+
* EventObserver#update_queue now always binds current routing keys. This ensures that when an enable_listener? changes
|
99
|
+
state from false to true during an update, all bindings for the queue are established.
|
100
|
+
* Add EventObserver#activate_observer(), which creates and binds a queue for an observer instance on demand.
|
101
|
+
* Add declaration for Client#find_queue, and normalize the method signature for subclasses.
|
102
|
+
|
103
|
+
### 1.1.0
|
104
|
+
|
105
|
+
* Clients now support multiple exception handlers. Each call to Client#on_exception will add a new block to the
|
106
|
+
exception handlers list
|
107
|
+
|
108
|
+
### 1.0.2
|
109
|
+
|
110
|
+
#### Breaking Changes:
|
111
|
+
|
112
|
+
* EventObserver instances are now required to have the persistent attribute /exchange_routing_keys/. These are used to
|
113
|
+
store the current value of routing keys assoicated with an instance. The queue associated with an EventObserver is
|
114
|
+
now created and updated at the same time the EventObserver is updated, rather than relying on the EventListener to
|
115
|
+
create it.
|
116
|
+
* EventObserver#observe_events now has only one parameter, the Isimud::Client instance. No queue bindings are done within
|
117
|
+
this method.
|
118
|
+
* Client#bind has been refactored in order to separate concerns. A new method, #subscribe, is now used for subscribing
|
119
|
+
to messages by linking a Proc.
|
120
|
+
* Client#create_queue no longer accepts a block parameter and does not subscribe to messages.
|
121
|
+
* Removed Client#rebind.
|
122
|
+
|
123
|
+
#### Other Changes:
|
124
|
+
|
125
|
+
* TestClient::Queue now responds to bind() and unbind() in the same manner as Bunny::Queue.
|
126
|
+
* BunnyClient#create_queue now may be called without a block to instantiate an AMQP queue without subscribing to messages
|
127
|
+
|
128
|
+
### 0.6.0 (broken)
|
81
129
|
|
82
130
|
* Added Client#rebind to change the exchange and routing keys for a durable named queue.
|
83
131
|
* Changed BunnyClient#delete_queue to make it more reliable.
|