celluloid_pubsub 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1833a05889721cb39fb28fcd4295d724985e301b
4
- data.tar.gz: eecc1ed416017585290b9528851b0f0385512569
3
+ metadata.gz: 60ffd44fe360be0346c773d1b04db59be8d8e8fb
4
+ data.tar.gz: 6195fd3342de107d5d9e192ca6a67fb31a7e2d00
5
5
  SHA512:
6
- metadata.gz: e923732287625cde95c8fa87986e880966770a16ffc730281ed0bde28818bcf4358d16f6e7fd48414f05c65cb3c3149799fe32d4834db95da0249300decf4e4e
7
- data.tar.gz: 88554a21d3d13ea42efc524440e132c3eefa885b38f1a335628293b785595649b96e5ee4e4fcedf669c9e68b42457fa7b31d75b4a8e8e19ab4f2efc1ab77f0ba
6
+ metadata.gz: 531e65c1592454307b122dc325afbcf6c71e5dc998e9f74aca8ef10aa3cf04ace3dc2e051d5f85705e7af46a196c956cc7ed0fd5e40c01b421463064d5d2b767
7
+ data.tar.gz: 0c5b76238f04797422d7d6ff692ca78f365b3230f205ee6ee062fb50f421dc23ace263bb9ce580a9bcb35dcb61b0a93759834a8dfa6365c291856f3a257b6c60
data/README.md ADDED
@@ -0,0 +1,90 @@
1
+ Caphub
2
+ ==================
3
+
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/celluloid_pubsub.svg)](http://badge.fury.io/rb/celluloid_pubsub)
6
+ [![Build Status](https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop)](https://travis-ci.org/bogdanRada/celluloid_pubsub)
7
+ [![Coverage Status](https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.svg?branch=master)](https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master)
8
+ [![Code Climate](https://codeclimate.com/github/bogdanRada/celluloid_pubsub/badges/gpa.svg)](https://codeclimate.com/github/bogdanRada/celluloid_pubsub)
9
+ [![Repo Size](https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub)](https://github.com/bogdanRada/celluloid_pubsub)
10
+ [![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&style=dynamic)](https://github.com/bogdanRada/celluloid_pubsub)
11
+ [![Documentation Status](https://inch-ci.org/github/bogdanRada/celluloid_pubsub.svg?branch=master)](https://inch-ci.org/github/bogdanRada/celluloid_pubsubb)
12
+ [![Maintenance Status](http://stillmaintained.com/bogdanRada/celluloid_pubsub.png)](https://github.com/bogdanRada/celluloid_pubsub)
13
+
14
+ Description
15
+ --------
16
+ CelluloidPubsub is a simple ruby implementation of publish subscribe design patterns using celluloid actors and websockets, using Celluloid::Reel server
17
+
18
+ Requirements
19
+ --------
20
+ 1. [Ruby 1.9.x or Ruby 2.x.x][ruby]
21
+ 3. [Celluloid >= 0.16.0][celluloid]
22
+ 3. [Celluloid-IO >= 0.16.2][celluloid-io]
23
+ 4. [Reel >= 0.5.0][reel]
24
+ 5. [Celluloid-websocket-client = 0.0.1][celluloid-websocket-client]
25
+ 6. [ActiveSuport >= 4.2.0][activesupport]
26
+
27
+ [ruby]: http://www.ruby-lang.org
28
+ [celluloid]: https://github.com/celluloid/celluloid
29
+ [celluloid-io]: https://github.com/celluloid/celluloid-io
30
+ [reel]: https://github.com/celluloid/reel
31
+ [celluloid-websocket-client]: [https://github.com/jeremyd/celluloid-websocket-client
32
+ [activesupport]:https://rubygems.org/gems/activesupport
33
+
34
+ Compatibility
35
+ --------
36
+
37
+ Rails >3.0 only. MRI 1.9.x, 2.x, JRuby (--1.9).
38
+
39
+ Ruby 1.8 is not officially supported. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
40
+
41
+ Rubinius support temporarily dropped due to Rails 4 incompatibility.
42
+
43
+ Installation Instructions
44
+ --------
45
+
46
+ Add the following to your Gemfile:
47
+
48
+ ```ruby
49
+ gem "celluloid_pubsub"
50
+ ```
51
+ Please read [Release Details][release-details] if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.
52
+ [release-details]: https://github.com/bogdanRada/celluloid_pubsub/releases
53
+
54
+ Examples
55
+ --------
56
+ Please check the [Examples Folder][examples]. There you can find some basic examples.
57
+
58
+ [examples]: https://github.com/bogdanRada/celluloid_pubsub/tree/master/examples
59
+
60
+ Testing
61
+ --------
62
+
63
+ To test, do the following:
64
+
65
+ 1. cd to the gem root.
66
+ 2. bundle install
67
+ 3. bundle exec rake
68
+
69
+ Contributions
70
+ --------
71
+
72
+ Please log all feedback/issues via [Examples Folder][issues]. Thanks.
73
+
74
+ [issues]: http://github.com/bogdanRada/celluloid_pubsub/issues
75
+
76
+ Contributing to celluloid_pubsub
77
+ --------
78
+
79
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
80
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
81
+ * Fork the project.
82
+ * Start a feature/bugfix branch.
83
+ * Commit and push until you are happy with your contribution.
84
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
85
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
86
+
87
+ == Copyright
88
+
89
+ Copyright (c) 2015 bogdanRada. See LICENSE.txt for
90
+ further details.
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ end
19
19
 
20
20
  YARD::Rake::YardocTask.new do |t|
21
21
  t.files = ['lib/**/*.rb'] # optional
22
- t.options = ['--any', '--extra', '--opts'] # optional
22
+ t.options = ['--any', '--extra', '--opts', '--markup-provider=redcarpet', '--markup=markdown'] # optional
23
23
  t.stats_options = ['--list-undoc'] # optional
24
24
  end
25
25
 
@@ -35,6 +35,8 @@ Gem::Specification.new do |s|
35
35
  s.add_development_dependency 'phare', '~> 0.6', '>= 0.6'
36
36
  s.add_development_dependency 'scss-lint', '~> 0.34', '>= 0.34'
37
37
  s.add_development_dependency 'yard', '~> 0.8.7', '>= 0.8.7'
38
+ s.add_development_dependency 'redcarpet', '~> 3.2.2', '>= 3.2.2'
39
+ s.add_development_dependency 'github-markup', '~> 1.3.3', '>= 1.3.3'
38
40
  s.add_development_dependency 'inch', '~> 0.5.10'
39
41
  s.add_development_dependency 'guard-inch', '~> 0.1.0'
40
42
  end
@@ -3667,7 +3667,7 @@ to the actor</p>
3667
3667
  </div>
3668
3668
 
3669
3669
  <div id="footer">
3670
- Generated on Fri Mar 13 12:25:43 2015 by
3670
+ Generated on Fri Mar 13 14:06:29 2015 by
3671
3671
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
3672
3672
  0.8.7.6 (ruby-2.0.0).
3673
3673
  </div>
@@ -331,7 +331,7 @@ is opened it will execute the block that is passed as argument</p>
331
331
  </div>
332
332
 
333
333
  <div id="footer">
334
- Generated on Fri Mar 13 12:25:43 2015 by
334
+ Generated on Fri Mar 13 14:06:29 2015 by
335
335
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
336
336
  0.8.7.6 (ruby-2.0.0).
337
337
  </div>
@@ -3493,7 +3493,7 @@ list on the server</p>
3493
3493
  </div>
3494
3494
 
3495
3495
  <div id="footer">
3496
- Generated on Fri Mar 13 12:25:42 2015 by
3496
+ Generated on Fri Mar 13 14:06:28 2015 by
3497
3497
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
3498
3498
  0.8.7.6 (ruby-2.0.0).
3499
3499
  </div>
@@ -225,7 +225,7 @@
225
225
  </div>
226
226
 
227
227
  <div id="footer">
228
- Generated on Fri Mar 13 12:25:42 2015 by
228
+ Generated on Fri Mar 13 14:06:28 2015 by
229
229
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
230
230
  0.8.7.6 (ruby-2.0.0).
231
231
  </div>
@@ -147,7 +147,7 @@ the major, minor and tiny</p>
147
147
 
148
148
  </div>
149
149
  </dt>
150
- <dd><pre class="code"><span class='int'>5</span></pre></dd>
150
+ <dd><pre class="code"><span class='int'>6</span></pre></dd>
151
151
 
152
152
  <dt id="PRE-constant" class="">PRE =
153
153
  <div class="docstring">
@@ -195,7 +195,7 @@ the major, minor and tiny</p>
195
195
  </div>
196
196
 
197
197
  <div id="footer">
198
- Generated on Fri Mar 13 12:25:42 2015 by
198
+ Generated on Fri Mar 13 14:06:28 2015 by
199
199
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
200
200
  0.8.7.6 (ruby-2.0.0).
201
201
  </div>
@@ -4266,7 +4266,7 @@ dispatch the socket connection to a new reactor
4266
4266
  </div>
4267
4267
 
4268
4268
  <div id="footer">
4269
- Generated on Fri Mar 13 12:25:43 2015 by
4269
+ Generated on Fri Mar 13 14:06:29 2015 by
4270
4270
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
4271
4271
  0.8.7.6 (ruby-2.0.0).
4272
4272
  </div>
@@ -216,7 +216,7 @@
216
216
  </div>
217
217
 
218
218
  <div id="footer">
219
- Generated on Fri Mar 13 12:25:42 2015 by
219
+ Generated on Fri Mar 13 14:06:28 2015 by
220
220
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
221
221
  0.8.7.6 (ruby-2.0.0).
222
222
  </div>
data/doc/_index.html CHANGED
@@ -175,7 +175,7 @@
175
175
  </div>
176
176
 
177
177
  <div id="footer">
178
- Generated on Fri Mar 13 12:25:41 2015 by
178
+ Generated on Fri Mar 13 14:06:28 2015 by
179
179
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
180
  0.8.7.6 (ruby-2.0.0).
181
181
  </div>
data/doc/file.README.html CHANGED
@@ -61,163 +61,87 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'>
65
- <h1 id="label-celluloid_pubsub+++%3Cimg+src%3D%22https%3A%2F%2Fbadge.fury.io%2Frb%2Fcelluloid_pubsub.png%22+alt%3D%22Gem+Version%22+%2F%3E">celluloid_pubsub <a href="http://badge.fury.io/rb/celluloid_pubsub"><img src="https://badge.fury.io/rb/celluloid_pubsub.png" alt="Gem Version" /></a></h1>
66
-
67
- <p><a href="https://travis-ci.org/bogdanRada/celluloid_pubsub"><img
68
- src="https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop"
69
- /></a></p>
70
-
71
- <p><a
72
- href="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d"><img
73
- src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.svg?style=flat"
74
- alt="Dependency Status" /></a> <a
75
- href="https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master"><img
76
- src="https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.png?branch=master"
77
- alt="Coverage Status" /></a> <a
78
- href="https://codeclimate.com/github/bogdanRada/celluloid_pubsub"><img
79
- src="https://codeclimate.com/github/bogdanRada/celluloid_pubsub.png" /></a>
80
- <a href="https://github.com/bogdanRada/celluloid_pubsub"><img
81
- src="https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub"
82
- alt="Repo Size"/></a> <a
83
- href="https://rubygems.org/gems/celluloid_pubsub"><img
84
- src="https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&style=dynamic"
85
- alt="Gem Downloads"/></a> <a
86
- href="https://rubygems.org/gems/celluloid_pubsub"><img
87
- src="http://stillmaintained.com/bogdanRada/celluloid_pubsub.png"
88
- alt=""/></a></p>
89
-
90
- <h1 id="label-Overview">Overview</h1>
91
-
92
- <p>CelluloidPubsub is a simple ruby implementation of publish subscribe design
93
- patterns using celluloid actors and websockets, using Celluloid::Reel
94
- server</p>
95
-
96
- <h1 id="label-Requirements">Requirements</h1>
97
- <ol><li>
98
- <p><a href="http://www.ruby-lang.org">Ruby 1.9.x or Ruby 2.x.x</a></p>
99
- </li><li>
100
- <p><a href="https://github.com/celluloid/celluloid">Celluloid >= 0.16.0</a></p>
101
- </li><li>
102
- <p><a href="https://github.com/celluloid/celluloid-io">Celluloid-IO >=
103
- 0.16.2</a></p>
104
- </li><li>
105
- <p><a href="https://github.com/celluloid/reel">Reel >= 0.5.0</a></p>
106
- </li><li>
107
- <p><a
108
- href="https://github.com/jeremyd/celluloid-websocket-client">Celluloid-websocket-client
109
- = 0.0.1</a></p>
110
- </li><li>
111
- <p><a href="https://rubygems.org/gems/activesupport">ActiveSuport >= 4.2.0</a></p>
112
- </li></ol>
113
-
114
- <h1 id="label-Compatibility">Compatibility</h1>
115
-
116
- <p>Rails &gt;3.0 only. MRI 1.9.x, 2.x, JRuby (–1.9).</p>
117
-
118
- <p>Ruby 1.8 is not officially supported. We will accept further compatibilty
119
- pull-requests but no upcoming versions will be tested against it.</p>
64
+ <div id="content"><div id='filecontents'><h1>Caphub</h1>
120
65
 
121
- <p>Rubinius support temporarily dropped due to Rails 4 incompatibility.</p>
66
+ <p><a href="http://badge.fury.io/rb/celluloid_pubsub"><img src="https://badge.fury.io/rb/celluloid_pubsub.svg" alt="Gem Version"></a>
67
+ <a href="https://travis-ci.org/bogdanRada/celluloid_pubsub"><img src="https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop" alt="Build Status"></a>
68
+ <a href="https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master"><img src="https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.svg?branch=master" alt="Coverage Status"></a>
69
+ <a href="https://codeclimate.com/github/bogdanRada/celluloid_pubsub"><img src="https://codeclimate.com/github/bogdanRada/celluloid_pubsub/badges/gpa.svg" alt="Code Climate"></a>
70
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub" alt="Repo Size"></a>
71
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&amp;style=dynamic" alt="Gem Downloads"></a>
72
+ <a href="https://inch-ci.org/github/bogdanRada/celluloid_pubsubb"><img src="https://inch-ci.org/github/bogdanRada/celluloid_pubsub.svg?branch=master" alt="Documentation Status"></a>
73
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="http://stillmaintained.com/bogdanRada/celluloid_pubsub.png" alt="Maintenance Status"></a></p>
122
74
 
123
- <h1 id="label-Setup">Setup</h1>
75
+ <h2>Description</h2>
124
76
 
125
- <p>Add the following to your Gemfile:</p>
77
+ <p>CelluloidPubsub is a simple ruby implementation of publish subscribe design patterns using celluloid actors and websockets, using Celluloid::Reel server</p>
126
78
 
127
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>celluloid_pubsub</span><span class='tstring_end'>&quot;</span></span></code></pre>
79
+ <h2>Requirements</h2>
128
80
 
129
- <p>Please read <a
130
- href="https://github.com/bogdanRada/celluloid_pubsub/releases">release
131
- details</a> if you are upgrading. We break backward compatibility between
132
- large ticks but you can expect it to be specified at release notes.</p>
81
+ <ol>
82
+ <li> <a href="http://www.ruby-lang.org">Ruby 1.9.x or Ruby 2.x.x</a></li>
83
+ <li><a href="https://github.com/celluloid/celluloid">Celluloid &gt;= 0.16.0</a></li>
84
+ <li><a href="https://github.com/celluloid/celluloid-io">Celluloid-IO &gt;= 0.16.2</a></li>
85
+ <li><a href="https://github.com/celluloid/reel">Reel &gt;= 0.5.0</a></li>
86
+ <li><a href="%5Bhttps://github.com/jeremyd/celluloid-websocket-client">Celluloid-websocket-client = 0.0.1</a></li>
87
+ <li><a href="https://rubygems.org/gems/activesupport">ActiveSuport &gt;= 4.2.0</a></li>
88
+ </ol>
133
89
 
134
- <h1 id="label-Usage+Examples%3A">Usage Examples:</h1>
90
+ <h2>Compatibility</h2>
135
91
 
136
- <pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">Subscriber</span>
137
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span>
138
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span><span class="ruby-operator">::</span><span class="ruby-constant">Logger</span>
92
+ <p>Rails &gt;3.0 only. MRI 1.9.x, 2.x, JRuby (--1.9).</p>
139
93
 
140
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
141
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">actor</span><span class="ruby-operator">:</span> <span class="ruby-constant">Actor</span>.<span class="ruby-identifier">current</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span>
142
- <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">subscribe</span>(<span class="ruby-string">&#39;test_channel&#39;</span>) <span class="ruby-comment"># this will execute after the connection is opened</span>
143
- <span class="ruby-keyword">end</span>
144
- <span class="ruby-keyword">end</span>
94
+ <p>Ruby 1.8 is not officially supported. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.</p>
145
95
 
146
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">on_message</span>(<span class="ruby-identifier">message</span>)
147
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;got #{message.inspect}&quot;</span>
148
- <span class="ruby-keyword">end</span>
96
+ <p>Rubinius support temporarily dropped due to Rails 4 incompatibility.</p>
149
97
 
150
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">on_close</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">reason</span>)
151
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;websocket connection closed: #{code.inspect}, #{reason.inspect}&quot;</span>
152
- <span class="ruby-identifier">terminate</span>
153
- <span class="ruby-keyword">end</span>
98
+ <h2>Installation Instructions</h2>
154
99
 
155
- <span class="ruby-keyword">end</span>
100
+ <p>Add the following to your Gemfile:</p>
156
101
 
157
- <span class="ruby-keyword">class</span> <span class="ruby-constant">Publisher</span>
158
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span>
159
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span><span class="ruby-operator">::</span><span class="ruby-constant">Logger</span>
102
+ <pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>celluloid_pubsub</span><span class='tstring_end'>&quot;</span></span>
103
+ </code></pre>
160
104
 
161
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
162
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">actor</span><span class="ruby-operator">:</span> <span class="ruby-constant">Actor</span>.<span class="ruby-identifier">current</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span>
163
- <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">publish</span>(<span class="ruby-string">&#39;test_channel&#39;</span>, {<span class="ruby-string">&#39;data&#39;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;my_message&quot;</span> }) <span class="ruby-comment"># the message needs to be a Hash</span>
164
- <span class="ruby-keyword">end</span>
165
- <span class="ruby-keyword">end</span>
105
+ <p>Please read <a href="https://github.com/bogdanRada/celluloid_pubsub/releases">Release Details</a> if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.</p>
166
106
 
167
- <span class="ruby-keyword">end</span>
107
+ <h2>Examples</h2>
168
108
 
169
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">WebServer</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">web_server</span>)
170
- <span class="ruby-constant">Subscriber</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">subscriber</span>)
171
- <span class="ruby-constant">Publisher</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">publisher</span>)
172
- <span class="ruby-identifier">sleep</span>
173
- </pre>
109
+ <p>Please check the <a href="https://github.com/bogdanRada/celluloid_pubsub/tree/master/examples">Examples Folder</a>. There you can find some basic examples.</p>
174
110
 
175
- <h1 id="label-Testing">Testing</h1>
111
+ <h2> Testing</h2>
176
112
 
177
113
  <p>To test, do the following:</p>
178
- <ol><li>
179
- <p>cd to the gem root.</p>
180
- </li><li>
181
- <p>bundle install</p>
182
- </li><li>
183
- <p>bundle exec rake</p>
184
- </li></ol>
185
-
186
- <h1 id="label-Contributions">Contributions</h1>
187
-
188
- <p>Please log all feedback/issues via <a
189
- href="http://github.com/bogdanRada/celluloid_pubsub/issues">GitHub
190
- Issues</a>. Thanks.</p>
191
-
192
- <h2 id="label-Contributing+to+celluloid_pubsub">Contributing to celluloid_pubsub</h2>
193
- <ul><li>
194
- <p>Check out the latest master to make sure the feature hasn&#39;t been
195
- implemented or the bug hasn&#39;t been fixed yet.</p>
196
- </li><li>
197
- <p>Check out the issue tracker to make sure someone already hasn&#39;t
198
- requested it and/or contributed it.</p>
199
- </li><li>
200
- <p>Fork the project.</p>
201
- </li><li>
202
- <p>Start a feature/bugfix branch.</p>
203
- </li><li>
204
- <p>Commit and push until you are happy with your contribution.</p>
205
- </li><li>
206
- <p>Make sure to add tests for it. This is important so I don&#39;t break it in
207
- a future version unintentionally.</p>
208
- </li><li>
209
- <p>Please try not to mess with the Rakefile, version, or history. If you want
210
- to have your own version, or is otherwise necessary, that is fine, but
211
- please isolate to its own commit so I can cherry-pick around it.</p>
212
- </li></ul>
213
-
214
- <h2 id="label-Copyright">Copyright</h2>
215
-
216
- <p>Copyright © 2015 bogdanRada. See LICENSE.txt for further details.</p>
114
+
115
+ <ol>
116
+ <li>cd to the gem root.</li>
117
+ <li>bundle install</li>
118
+ <li>bundle exec rake</li>
119
+ </ol>
120
+
121
+ <h2>Contributions</h2>
122
+
123
+ <p>Please log all feedback/issues via <a href="http://github.com/bogdanRada/celluloid_pubsub/issues">Examples Folder</a>. Thanks.</p>
124
+
125
+ <h2>Contributing to celluloid_pubsub</h2>
126
+
127
+ <ul>
128
+ <li>Check out the latest master to make sure the feature hasn&#39;t been implemented or the bug hasn&#39;t been fixed yet.</li>
129
+ <li>Check out the issue tracker to make sure someone already hasn&#39;t requested it and/or contributed it.</li>
130
+ <li>Fork the project.</li>
131
+ <li>Start a feature/bugfix branch.</li>
132
+ <li>Commit and push until you are happy with your contribution.</li>
133
+ <li>Make sure to add tests for it. This is important so I don&#39;t break it in a future version unintentionally.</li>
134
+ <li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
135
+ </ul>
136
+
137
+ <p>== Copyright</p>
138
+
139
+ <p>Copyright (c) 2015 bogdanRada. See LICENSE.txt for
140
+ further details.</p>
217
141
  </div></div>
218
142
 
219
143
  <div id="footer">
220
- Generated on Fri Mar 13 12:25:42 2015 by
144
+ Generated on Fri Mar 13 14:06:28 2015 by
221
145
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
222
146
  0.8.7.6 (ruby-2.0.0).
223
147
  </div>
data/doc/index.html CHANGED
@@ -61,163 +61,87 @@
61
61
 
62
62
  <iframe id="search_frame"></iframe>
63
63
 
64
- <div id="content"><div id='filecontents'>
65
- <h1 id="label-celluloid_pubsub+++%3Cimg+src%3D%22https%3A%2F%2Fbadge.fury.io%2Frb%2Fcelluloid_pubsub.png%22+alt%3D%22Gem+Version%22+%2F%3E">celluloid_pubsub <a href="http://badge.fury.io/rb/celluloid_pubsub"><img src="https://badge.fury.io/rb/celluloid_pubsub.png" alt="Gem Version" /></a></h1>
66
-
67
- <p><a href="https://travis-ci.org/bogdanRada/celluloid_pubsub"><img
68
- src="https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop"
69
- /></a></p>
70
-
71
- <p><a
72
- href="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d"><img
73
- src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.svg?style=flat"
74
- alt="Dependency Status" /></a> <a
75
- href="https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master"><img
76
- src="https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.png?branch=master"
77
- alt="Coverage Status" /></a> <a
78
- href="https://codeclimate.com/github/bogdanRada/celluloid_pubsub"><img
79
- src="https://codeclimate.com/github/bogdanRada/celluloid_pubsub.png" /></a>
80
- <a href="https://github.com/bogdanRada/celluloid_pubsub"><img
81
- src="https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub"
82
- alt="Repo Size"/></a> <a
83
- href="https://rubygems.org/gems/celluloid_pubsub"><img
84
- src="https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&style=dynamic"
85
- alt="Gem Downloads"/></a> <a
86
- href="https://rubygems.org/gems/celluloid_pubsub"><img
87
- src="http://stillmaintained.com/bogdanRada/celluloid_pubsub.png"
88
- alt=""/></a></p>
89
-
90
- <h1 id="label-Overview">Overview</h1>
91
-
92
- <p>CelluloidPubsub is a simple ruby implementation of publish subscribe design
93
- patterns using celluloid actors and websockets, using Celluloid::Reel
94
- server</p>
95
-
96
- <h1 id="label-Requirements">Requirements</h1>
97
- <ol><li>
98
- <p><a href="http://www.ruby-lang.org">Ruby 1.9.x or Ruby 2.x.x</a></p>
99
- </li><li>
100
- <p><a href="https://github.com/celluloid/celluloid">Celluloid >= 0.16.0</a></p>
101
- </li><li>
102
- <p><a href="https://github.com/celluloid/celluloid-io">Celluloid-IO >=
103
- 0.16.2</a></p>
104
- </li><li>
105
- <p><a href="https://github.com/celluloid/reel">Reel >= 0.5.0</a></p>
106
- </li><li>
107
- <p><a
108
- href="https://github.com/jeremyd/celluloid-websocket-client">Celluloid-websocket-client
109
- = 0.0.1</a></p>
110
- </li><li>
111
- <p><a href="https://rubygems.org/gems/activesupport">ActiveSuport >= 4.2.0</a></p>
112
- </li></ol>
113
-
114
- <h1 id="label-Compatibility">Compatibility</h1>
115
-
116
- <p>Rails &gt;3.0 only. MRI 1.9.x, 2.x, JRuby (–1.9).</p>
117
-
118
- <p>Ruby 1.8 is not officially supported. We will accept further compatibilty
119
- pull-requests but no upcoming versions will be tested against it.</p>
64
+ <div id="content"><div id='filecontents'><h1>Caphub</h1>
120
65
 
121
- <p>Rubinius support temporarily dropped due to Rails 4 incompatibility.</p>
66
+ <p><a href="http://badge.fury.io/rb/celluloid_pubsub"><img src="https://badge.fury.io/rb/celluloid_pubsub.svg" alt="Gem Version"></a>
67
+ <a href="https://travis-ci.org/bogdanRada/celluloid_pubsub"><img src="https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop" alt="Build Status"></a>
68
+ <a href="https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master"><img src="https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.svg?branch=master" alt="Coverage Status"></a>
69
+ <a href="https://codeclimate.com/github/bogdanRada/celluloid_pubsub"><img src="https://codeclimate.com/github/bogdanRada/celluloid_pubsub/badges/gpa.svg" alt="Code Climate"></a>
70
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub" alt="Repo Size"></a>
71
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&amp;style=dynamic" alt="Gem Downloads"></a>
72
+ <a href="https://inch-ci.org/github/bogdanRada/celluloid_pubsubb"><img src="https://inch-ci.org/github/bogdanRada/celluloid_pubsub.svg?branch=master" alt="Documentation Status"></a>
73
+ <a href="https://github.com/bogdanRada/celluloid_pubsub"><img src="http://stillmaintained.com/bogdanRada/celluloid_pubsub.png" alt="Maintenance Status"></a></p>
122
74
 
123
- <h1 id="label-Setup">Setup</h1>
75
+ <h2>Description</h2>
124
76
 
125
- <p>Add the following to your Gemfile:</p>
77
+ <p>CelluloidPubsub is a simple ruby implementation of publish subscribe design patterns using celluloid actors and websockets, using Celluloid::Reel server</p>
126
78
 
127
- <pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>celluloid_pubsub</span><span class='tstring_end'>&quot;</span></span></code></pre>
79
+ <h2>Requirements</h2>
128
80
 
129
- <p>Please read <a
130
- href="https://github.com/bogdanRada/celluloid_pubsub/releases">release
131
- details</a> if you are upgrading. We break backward compatibility between
132
- large ticks but you can expect it to be specified at release notes.</p>
81
+ <ol>
82
+ <li> <a href="http://www.ruby-lang.org">Ruby 1.9.x or Ruby 2.x.x</a></li>
83
+ <li><a href="https://github.com/celluloid/celluloid">Celluloid &gt;= 0.16.0</a></li>
84
+ <li><a href="https://github.com/celluloid/celluloid-io">Celluloid-IO &gt;= 0.16.2</a></li>
85
+ <li><a href="https://github.com/celluloid/reel">Reel &gt;= 0.5.0</a></li>
86
+ <li><a href="%5Bhttps://github.com/jeremyd/celluloid-websocket-client">Celluloid-websocket-client = 0.0.1</a></li>
87
+ <li><a href="https://rubygems.org/gems/activesupport">ActiveSuport &gt;= 4.2.0</a></li>
88
+ </ol>
133
89
 
134
- <h1 id="label-Usage+Examples%3A">Usage Examples:</h1>
90
+ <h2>Compatibility</h2>
135
91
 
136
- <pre class="ruby"><span class="ruby-keyword">class</span> <span class="ruby-constant">Subscriber</span>
137
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span>
138
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span><span class="ruby-operator">::</span><span class="ruby-constant">Logger</span>
92
+ <p>Rails &gt;3.0 only. MRI 1.9.x, 2.x, JRuby (--1.9).</p>
139
93
 
140
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
141
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">actor</span><span class="ruby-operator">:</span> <span class="ruby-constant">Actor</span>.<span class="ruby-identifier">current</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span>
142
- <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">subscribe</span>(<span class="ruby-string">&#39;test_channel&#39;</span>) <span class="ruby-comment"># this will execute after the connection is opened</span>
143
- <span class="ruby-keyword">end</span>
144
- <span class="ruby-keyword">end</span>
94
+ <p>Ruby 1.8 is not officially supported. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.</p>
145
95
 
146
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">on_message</span>(<span class="ruby-identifier">message</span>)
147
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;got #{message.inspect}&quot;</span>
148
- <span class="ruby-keyword">end</span>
96
+ <p>Rubinius support temporarily dropped due to Rails 4 incompatibility.</p>
149
97
 
150
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">on_close</span>(<span class="ruby-identifier">code</span>, <span class="ruby-identifier">reason</span>)
151
- <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;websocket connection closed: #{code.inspect}, #{reason.inspect}&quot;</span>
152
- <span class="ruby-identifier">terminate</span>
153
- <span class="ruby-keyword">end</span>
98
+ <h2>Installation Instructions</h2>
154
99
 
155
- <span class="ruby-keyword">end</span>
100
+ <p>Add the following to your Gemfile:</p>
156
101
 
157
- <span class="ruby-keyword">class</span> <span class="ruby-constant">Publisher</span>
158
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span>
159
- <span class="ruby-identifier">include</span> <span class="ruby-constant">Celluloid</span><span class="ruby-operator">::</span><span class="ruby-constant">Logger</span>
102
+ <pre class="code ruby"><code class="ruby"> <span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>celluloid_pubsub</span><span class='tstring_end'>&quot;</span></span>
103
+ </code></pre>
160
104
 
161
- <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>
162
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">connect</span>(<span class="ruby-identifier">actor</span><span class="ruby-operator">:</span> <span class="ruby-constant">Actor</span>.<span class="ruby-identifier">current</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ws</span><span class="ruby-operator">|</span>
163
- <span class="ruby-identifier">ws</span>.<span class="ruby-identifier">publish</span>(<span class="ruby-string">&#39;test_channel&#39;</span>, {<span class="ruby-string">&#39;data&#39;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;my_message&quot;</span> }) <span class="ruby-comment"># the message needs to be a Hash</span>
164
- <span class="ruby-keyword">end</span>
165
- <span class="ruby-keyword">end</span>
105
+ <p>Please read <a href="https://github.com/bogdanRada/celluloid_pubsub/releases">Release Details</a> if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.</p>
166
106
 
167
- <span class="ruby-keyword">end</span>
107
+ <h2>Examples</h2>
168
108
 
169
- <span class="ruby-constant">CelluloidPubsub</span><span class="ruby-operator">::</span><span class="ruby-constant">WebServer</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">web_server</span>)
170
- <span class="ruby-constant">Subscriber</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">subscriber</span>)
171
- <span class="ruby-constant">Publisher</span>.<span class="ruby-identifier">supervise_as</span>(:<span class="ruby-identifier">publisher</span>)
172
- <span class="ruby-identifier">sleep</span>
173
- </pre>
109
+ <p>Please check the <a href="https://github.com/bogdanRada/celluloid_pubsub/tree/master/examples">Examples Folder</a>. There you can find some basic examples.</p>
174
110
 
175
- <h1 id="label-Testing">Testing</h1>
111
+ <h2> Testing</h2>
176
112
 
177
113
  <p>To test, do the following:</p>
178
- <ol><li>
179
- <p>cd to the gem root.</p>
180
- </li><li>
181
- <p>bundle install</p>
182
- </li><li>
183
- <p>bundle exec rake</p>
184
- </li></ol>
185
-
186
- <h1 id="label-Contributions">Contributions</h1>
187
-
188
- <p>Please log all feedback/issues via <a
189
- href="http://github.com/bogdanRada/celluloid_pubsub/issues">GitHub
190
- Issues</a>. Thanks.</p>
191
-
192
- <h2 id="label-Contributing+to+celluloid_pubsub">Contributing to celluloid_pubsub</h2>
193
- <ul><li>
194
- <p>Check out the latest master to make sure the feature hasn&#39;t been
195
- implemented or the bug hasn&#39;t been fixed yet.</p>
196
- </li><li>
197
- <p>Check out the issue tracker to make sure someone already hasn&#39;t
198
- requested it and/or contributed it.</p>
199
- </li><li>
200
- <p>Fork the project.</p>
201
- </li><li>
202
- <p>Start a feature/bugfix branch.</p>
203
- </li><li>
204
- <p>Commit and push until you are happy with your contribution.</p>
205
- </li><li>
206
- <p>Make sure to add tests for it. This is important so I don&#39;t break it in
207
- a future version unintentionally.</p>
208
- </li><li>
209
- <p>Please try not to mess with the Rakefile, version, or history. If you want
210
- to have your own version, or is otherwise necessary, that is fine, but
211
- please isolate to its own commit so I can cherry-pick around it.</p>
212
- </li></ul>
213
-
214
- <h2 id="label-Copyright">Copyright</h2>
215
-
216
- <p>Copyright © 2015 bogdanRada. See LICENSE.txt for further details.</p>
114
+
115
+ <ol>
116
+ <li>cd to the gem root.</li>
117
+ <li>bundle install</li>
118
+ <li>bundle exec rake</li>
119
+ </ol>
120
+
121
+ <h2>Contributions</h2>
122
+
123
+ <p>Please log all feedback/issues via <a href="http://github.com/bogdanRada/celluloid_pubsub/issues">Examples Folder</a>. Thanks.</p>
124
+
125
+ <h2>Contributing to celluloid_pubsub</h2>
126
+
127
+ <ul>
128
+ <li>Check out the latest master to make sure the feature hasn&#39;t been implemented or the bug hasn&#39;t been fixed yet.</li>
129
+ <li>Check out the issue tracker to make sure someone already hasn&#39;t requested it and/or contributed it.</li>
130
+ <li>Fork the project.</li>
131
+ <li>Start a feature/bugfix branch.</li>
132
+ <li>Commit and push until you are happy with your contribution.</li>
133
+ <li>Make sure to add tests for it. This is important so I don&#39;t break it in a future version unintentionally.</li>
134
+ <li>Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.</li>
135
+ </ul>
136
+
137
+ <p>== Copyright</p>
138
+
139
+ <p>Copyright (c) 2015 bogdanRada. See LICENSE.txt for
140
+ further details.</p>
217
141
  </div></div>
218
142
 
219
143
  <div id="footer">
220
- Generated on Fri Mar 13 12:25:42 2015 by
144
+ Generated on Fri Mar 13 14:06:28 2015 by
221
145
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
222
146
  0.8.7.6 (ruby-2.0.0).
223
147
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Fri Mar 13 12:25:42 2015 by
106
+ Generated on Fri Mar 13 14:06:28 2015 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.7.6 (ruby-2.0.0).
109
109
  </div>
@@ -17,7 +17,7 @@ module CelluloidPubsub
17
17
  # minor release version
18
18
  MINOR = 0
19
19
  # tiny release version
20
- TINY = 6
20
+ TINY = 7
21
21
  # prelease version ( set this only if it is a prelease)
22
22
  PRE = nil
23
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: celluloid_pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - bogdanRada
@@ -338,6 +338,46 @@ dependencies:
338
338
  - - '>='
339
339
  - !ruby/object:Gem::Version
340
340
  version: 0.8.7
341
+ - !ruby/object:Gem::Dependency
342
+ name: redcarpet
343
+ requirement: !ruby/object:Gem::Requirement
344
+ requirements:
345
+ - - ~>
346
+ - !ruby/object:Gem::Version
347
+ version: 3.2.2
348
+ - - '>='
349
+ - !ruby/object:Gem::Version
350
+ version: 3.2.2
351
+ type: :development
352
+ prerelease: false
353
+ version_requirements: !ruby/object:Gem::Requirement
354
+ requirements:
355
+ - - ~>
356
+ - !ruby/object:Gem::Version
357
+ version: 3.2.2
358
+ - - '>='
359
+ - !ruby/object:Gem::Version
360
+ version: 3.2.2
361
+ - !ruby/object:Gem::Dependency
362
+ name: github-markup
363
+ requirement: !ruby/object:Gem::Requirement
364
+ requirements:
365
+ - - ~>
366
+ - !ruby/object:Gem::Version
367
+ version: 1.3.3
368
+ - - '>='
369
+ - !ruby/object:Gem::Version
370
+ version: 1.3.3
371
+ type: :development
372
+ prerelease: false
373
+ version_requirements: !ruby/object:Gem::Requirement
374
+ requirements:
375
+ - - ~>
376
+ - !ruby/object:Gem::Version
377
+ version: 1.3.3
378
+ - - '>='
379
+ - !ruby/object:Gem::Version
380
+ version: 1.3.3
341
381
  - !ruby/object:Gem::Dependency
342
382
  name: inch
343
383
  requirement: !ruby/object:Gem::Requirement
@@ -383,7 +423,7 @@ files:
383
423
  - Gemfile
384
424
  - Guardfile
385
425
  - LICENSE
386
- - README.rdoc
426
+ - README.md
387
427
  - Rakefile
388
428
  - bin/appraisal
389
429
  - bin/autospec
data/README.rdoc DELETED
@@ -1,103 +0,0 @@
1
- = celluloid_pubsub {<img src="https://badge.fury.io/rb/celluloid_pubsub.png" alt="Gem Version" />}[http://badge.fury.io/rb/celluloid_pubsub]
2
- {<img src="https://travis-ci.org/bogdanRada/celluloid_pubsub.png?branch=master,develop" />}[https://travis-ci.org/bogdanRada/celluloid_pubsub]
3
- {<img src="https://www.versioneye.com/user/projects/52fc7297ec1375346600007d/badge.svg?style=flat" alt="Dependency Status" />}[https://www.versioneye.com/user/projects/52fc7297ec1375346600007d]
4
- {<img src="https://coveralls.io/repos/bogdanRada/celluloid_pubsub/badge.png?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/bogdanRada/celluloid_pubsub?branch=master]
5
- {<img src="https://codeclimate.com/github/bogdanRada/celluloid_pubsub.png" />}[https://codeclimate.com/github/bogdanRada/celluloid_pubsub]
6
- {<img src="https://reposs.herokuapp.com/?path=bogdanRada/celluloid_pubsub" alt="Repo Size"/>}[https://github.com/bogdanRada/celluloid_pubsub]
7
- {<img src="https://ruby-gem-downloads-badge.herokuapp.com/celluloid_pubsub?type=total&style=dynamic" alt="Gem Downloads"/>}[https://rubygems.org/gems/celluloid_pubsub]
8
- {<img src="http://stillmaintained.com/bogdanRada/celluloid_pubsub.png" alt=""/>}[https://rubygems.org/gems/celluloid_pubsub]
9
-
10
- = Overview
11
- CelluloidPubsub is a simple ruby implementation of publish subscribe design patterns using celluloid actors and websockets, using Celluloid::Reel server
12
-
13
- = Requirements
14
-
15
- 1. {Ruby 1.9.x or Ruby 2.x.x}[http://www.ruby-lang.org]
16
- 3. {Celluloid >= 0.16.0}[https://github.com/celluloid/celluloid]
17
- 3. {Celluloid-IO >= 0.16.2}[https://github.com/celluloid/celluloid-io]
18
- 4. {Reel >= 0.5.0}[https://github.com/celluloid/reel]
19
- 5. {Celluloid-websocket-client = 0.0.1}[https://github.com/jeremyd/celluloid-websocket-client]
20
- 6. {ActiveSuport >= 4.2.0}[https://rubygems.org/gems/activesupport]
21
-
22
- = Compatibility
23
-
24
- Rails >3.0 only. MRI 1.9.x, 2.x, JRuby (--1.9).
25
-
26
- Ruby 1.8 is not officially supported. We will accept further compatibilty pull-requests but no upcoming versions will be tested against it.
27
-
28
- Rubinius support temporarily dropped due to Rails 4 incompatibility.
29
-
30
- = Setup
31
-
32
- Add the following to your Gemfile:
33
-
34
- gem "celluloid_pubsub"
35
-
36
- Please read {release details}[https://github.com/bogdanRada/celluloid_pubsub/releases] if you are upgrading. We break backward compatibility between large ticks but you can expect it to be specified at release notes.
37
-
38
- = Usage Examples:
39
-
40
- class Subscriber
41
- include Celluloid
42
- include Celluloid::Logger
43
-
44
- def initialize
45
- CelluloidPubsub::Client.connect(actor: Actor.current) do |ws|
46
- ws.subscribe('test_channel') # this will execute after the connection is opened
47
- end
48
- end
49
-
50
- def on_message(message)
51
- puts "got #{message.inspect}"
52
- end
53
-
54
- def on_close(code, reason)
55
- puts "websocket connection closed: #{code.inspect}, #{reason.inspect}"
56
- terminate
57
- end
58
-
59
- end
60
-
61
- class Publisher
62
- include Celluloid
63
- include Celluloid::Logger
64
-
65
- def initialize
66
- CelluloidPubsub::Client.connect(actor: Actor.current) do |ws|
67
- ws.publish('test_channel', {'data' => "my_message" }) # the message needs to be a Hash
68
- end
69
- end
70
-
71
- end
72
-
73
- CelluloidPubsub::WebServer.supervise_as(:web_server)
74
- Subscriber.supervise_as(:subscriber)
75
- Publisher.supervise_as(:publisher)
76
- sleep
77
-
78
- = Testing
79
-
80
- To test, do the following:
81
-
82
- 1. cd to the gem root.
83
- 2. bundle install
84
- 3. bundle exec rake
85
-
86
- = Contributions
87
-
88
- Please log all feedback/issues via {GitHub Issues}[http://github.com/bogdanRada/celluloid_pubsub/issues]. Thanks.
89
-
90
- == Contributing to celluloid_pubsub
91
-
92
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
93
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
94
- * Fork the project.
95
- * Start a feature/bugfix branch.
96
- * Commit and push until you are happy with your contribution.
97
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
98
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
99
-
100
- == Copyright
101
-
102
- Copyright (c) 2015 bogdanRada. See LICENSE.txt for
103
- further details.