isimud 0.7.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rspec +1 -2
  4. data/.ruby-version +1 -1
  5. data/.yardoc/checksums +10 -10
  6. data/.yardoc/object_types +0 -0
  7. data/.yardoc/objects/root.dat +0 -0
  8. data/Gemfile +2 -1
  9. data/Gemfile.lock +63 -73
  10. data/LICENSE.txt +19 -0
  11. data/README.md +51 -3
  12. data/Rakefile +5 -0
  13. data/doc/Isimud/BunnyClient.html +882 -179
  14. data/doc/Isimud/Client.html +236 -18
  15. data/doc/Isimud/Event.html +211 -95
  16. data/doc/Isimud/EventListener.html +325 -307
  17. data/doc/Isimud/EventObserver/ClassMethods.html +14 -14
  18. data/doc/Isimud/EventObserver.html +418 -36
  19. data/doc/Isimud/Generators/ConfigGenerator.html +2 -2
  20. data/doc/Isimud/Generators/InitializerGenerator.html +2 -2
  21. data/doc/Isimud/Generators.html +2 -2
  22. data/doc/Isimud/Logging.html +3 -3
  23. data/doc/Isimud/ModelWatcher/ClassMethods.html +3 -3
  24. data/doc/Isimud/ModelWatcher.html +2 -2
  25. data/doc/Isimud/Railtie.html +2 -2
  26. data/doc/Isimud/TestClient/Queue.html +374 -71
  27. data/doc/Isimud/TestClient.html +169 -161
  28. data/doc/Isimud.html +80 -76
  29. data/doc/_index.html +5 -2
  30. data/doc/file.LICENSE.html +73 -0
  31. data/doc/file.README.html +131 -7
  32. data/doc/file_list.html +3 -0
  33. data/doc/index.html +131 -7
  34. data/doc/method_list.html +183 -105
  35. data/doc/top-level-namespace.html +2 -2
  36. data/isimud.gemspec +18 -16
  37. data/lib/isimud/bunny_client.rb +85 -32
  38. data/lib/isimud/client.rb +23 -7
  39. data/lib/isimud/event.rb +11 -14
  40. data/lib/isimud/event_listener.rb +123 -65
  41. data/lib/isimud/event_observer.rb +70 -10
  42. data/lib/isimud/model_watcher.rb +1 -1
  43. data/lib/isimud/test_client.rb +54 -26
  44. data/lib/isimud/version.rb +1 -1
  45. data/lib/isimud.rb +1 -1
  46. data/spec/internal/app/models/company.rb +8 -10
  47. data/spec/internal/app/models/user.rb +11 -1
  48. data/spec/internal/db/schema.rb +5 -0
  49. data/spec/isimud/bunny_client_spec.rb +21 -9
  50. data/spec/isimud/client_spec.rb +40 -0
  51. data/spec/isimud/event_listener_spec.rb +50 -22
  52. data/spec/isimud/event_observer_spec.rb +107 -16
  53. data/spec/isimud/model_watcher_spec.rb +18 -23
  54. data/spec/isimud/test_client_spec.rb +43 -8
  55. data/spec/isimud_spec.rb +2 -2
  56. data/spec/spec_helper.rb +2 -0
  57. metadata +19 -35
  58. checksums.yaml.gz.sig +0 -0
  59. data/certs/gfeil.pem +0 -21
  60. data/release +0 -31
  61. data.tar.gz.sig +0 -0
  62. metadata.gz.sig +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d99ac21afc822c85ea759b7b8f491c509ff4ff4
4
- data.tar.gz: 2497cc27810dcaa21493b5a34171c045e18c04c3
3
+ metadata.gz: 9f4162cffed96ee6706c449f3f22920e71d4344c
4
+ data.tar.gz: 62745767638aa63ed33ffdc78c64918f3834b75b
5
5
  SHA512:
6
- metadata.gz: cb9fbfe6c72af9b21a40e01a706d4a1290fdeb076445ce1ce2fe87ade0e0dd8a7a3dacef53e8e94e616461484c633ba551c18ca6c41284b55e6cfbfb690b2264
7
- data.tar.gz: 1f1a254579109ddc7428fafa0a2e2a3861d0cc8f494ec2d3f2950925506a3666d76c6be4350f187ea1d19879f814b4b19de6b901ba73ed9ee6bfa73a57798a14
6
+ metadata.gz: 85fbfd7875e94f1b999a061c5a9edf5d0c5396d0880bb8d17eedd13f93eaa5dc128aaa2525c70f7118cdceb8b520ee008efbbe010239404223e9a7dc44cabe8d
7
+ data.tar.gz: 44642e7749e0865e1d1dbd5f5217fe5b293f465fa3199f2c508137b0f1798a2293c32a6fb07b4ca0c482a6f1c944f60f1a5de0e7e85eb7aabed6ae36809453a5
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ tmp
16
16
  *.a
17
17
  *.sqlite
18
18
  mkmf.log
19
+ .idea
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --color
2
- --require spec_helper
1
+ --color
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.3.0
1
+ 2.2.3
data/.yardoc/checksums CHANGED
@@ -1,15 +1,15 @@
1
- lib/isimud.rb 22ac8b1ab9a85d8ef39a68bd67f88712a6f0b77d
2
- lib/isimud/event.rb 068adf31099eb773829921c85a446c2308d6750b
1
+ lib/isimud.rb 5a9fee170ff924c6347d98fb5a80980d5f0ecc9a
2
+ lib/isimud/event.rb f29a804bfa084e68329825b5fb9863d268f3ff27
3
3
  lib/isimud/tasks.rb 8d07d80e178928098e959ebdcbda1707e9b50617
4
- lib/isimud/client.rb 80a360bd7a2817f7d3c67b33de8fd92f2610c5a8
5
- lib/isimud/version.rb 39825e610d2f91209d7f98c086d8c3eb4f027b42
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 4d3ab074ae617f47175384c742cd8acd6878718e
9
- lib/isimud/bunny_client.rb f2e2cfdb7d9eaef1f38ebfc6d329cea849f4dc79
10
- lib/isimud/model_watcher.rb f9294e03f6d22676ae59f07edabd16f028f7db79
11
- lib/isimud/event_observer.rb b8d2861e876b58da8ed68c62e20883e5766e6f5e
12
- lib/isimud/event_listener.rb 46f889072a1a19382aa45d38b599d2dbb6075225
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 fb01711a9a3a523808f1f503a97342fb09bab4f8
15
+ lib/rails/generators/isimud/templates/initializer.rb 6b937955296d704bfa4a06eec91ce14a6dd954ba
data/.yardoc/object_types CHANGED
Binary file
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', '~> 3.2.17'
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 (0.6.0)
5
- activerecord (>= 3.2.17)
6
- activesupport (>= 3.2.17)
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 (3.2.21)
14
- activemodel (= 3.2.21)
15
- activesupport (= 3.2.21)
16
- builder (~> 3.0.0)
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
- journey (~> 1.0.4)
19
- rack (~> 1.4.5)
20
- rack-cache (~> 1.2)
21
- rack-test (~> 0.6.1)
22
- sprockets (~> 2.2.1)
23
- activemodel (3.2.21)
24
- activesupport (= 3.2.21)
25
- builder (~> 3.0.0)
26
- activerecord (3.2.21)
27
- activemodel (= 3.2.21)
28
- activesupport (= 3.2.21)
29
- arel (~> 3.0.2)
30
- tzinfo (~> 0.3.29)
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 (3.0.3)
36
- awesome_print (1.2.0)
37
- builder (3.0.4)
38
- bunny (2.1.0)
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.5)
43
+ codeclimate-test-reporter (0.4.8)
43
44
  simplecov (>= 0.7.1, < 1.0.0)
44
- combustion (0.5.2)
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.4.0)
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
- journey (1.0.4)
55
- json (1.8.2)
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.4.5)
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 (3.2.21)
66
- actionpack (= 3.2.21)
67
- activesupport (= 3.2.21)
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
- rdoc (~> 3.4)
71
- thor (>= 0.14.6, < 2.0)
64
+ thor (>= 0.18.1, < 2.0)
72
65
  rake (10.4.2)
73
- rdoc (3.12.2)
74
- json (~> 1.4)
75
- rspec (3.1.0)
76
- rspec-core (~> 3.1.0)
77
- rspec-expectations (~> 3.1.0)
78
- rspec-mocks (~> 3.1.0)
79
- rspec-core (3.1.7)
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.1.0)
84
- rspec-mocks (3.1.3)
85
- rspec-support (~> 3.1.0)
86
- rspec-support (3.1.2)
87
- simplecov (0.9.1)
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
- multi_json (~> 1.0)
90
- simplecov-html (~> 0.8.0)
91
- simplecov-html (0.8.0)
92
- sprockets (2.2.3)
93
- hike (~> 1.2)
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
- tilt (1.4.1)
102
- timecop (0.7.1)
103
- tzinfo (0.3.42)
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 (~> 3.2.17)
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 abstraction component.
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
- ### 0.6.0
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.
data/Rakefile CHANGED
@@ -1,2 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
+ namespace 'isimud' do
4
+ task :makedoc do
5
+ system("yardoc --no-private 'lib/**/*.rb' - README.md LICENSE.txt")
6
+ end
7
+ end