jugglite 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82002ee49bbedda3d7b82861ba2ba736948e3ff9
4
- data.tar.gz: e38c074d4e77ada440ddf98c0d481ccde469d9c9
3
+ metadata.gz: 29426c14e64d9d4616bf3418e14f64c772487fbc
4
+ data.tar.gz: 0a91e0b6bd25d717674dab02945f83e9e88df1cc
5
5
  SHA512:
6
- metadata.gz: d741e66346520c6039c3bd25ef07d01fb47f15e108a7c507ef5ea06df30ada7fb7d65f739f1fbccd8c5b50ef1dd18ad51c2f3544ab7ebec826c332bf5885f2e5
7
- data.tar.gz: 2d54a2d640965daaeef872d02557c67095fb6c1f5235a62d26adff418185513b072b14f77781b35a42c2619701cf7db854a30d8a0c91a8cc46a2c69eb8639c1e
6
+ metadata.gz: 784c8d12f5942a32ba2c61a4aaeb6e44d126c37b4c22251e170c1d671e7c80d64d5ab600d9400929a486bfe8ba2b4b64b459fae7e6b8c35d4f1e41a43b815bce
7
+ data.tar.gz: 272f439a3a822fbfab2aee6fb44e29e87333d74ed4a22bdfa8944248db4001d7e34069d5a5989186821170a1f86f3a1e5b3fd3f6c5d18e6f070e50b2b98ebe6b
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 0.3.0 / 2014-03-06
2
+
3
+ * Support redis namespace option
4
+
1
5
  = 0.2.0 / 2014-02-25
2
6
 
3
7
  * If message is JSON, extract 'event' and 'id' from the message
data/README.md CHANGED
@@ -37,7 +37,7 @@ Add it to your `config.ru` file and make sure your application runs using Thin:
37
37
  ```ruby
38
38
  require ::File.expand_path('../config/environment', __FILE__)
39
39
  # Embed Jugglite when running in development
40
- use Jugglite::App, path: '/stream' if ENV['RACK_ENV'] == 'development'
40
+ use Jugglite::App, path: '/stream', namespace: 'myapp:' if ENV['RACK_ENV'] == 'development'
41
41
  run MyRails::Application
42
42
  ```
43
43
 
@@ -17,6 +17,7 @@ module Jugglite
17
17
  @app = app
18
18
  @options = {
19
19
  path: '/stream',
20
+ namespace: '',
20
21
  keepalive_timeout: 20
21
22
  }.merge(options)
22
23
  @subscription_map = {}
@@ -77,8 +78,9 @@ module Jugglite
77
78
 
78
79
  def channels_for_request(request)
79
80
  # TODO: Sanitize? Check signature?
80
- channel = Array(request.params["channel"])
81
- Set.new(channel)
81
+ channels = Array(request.params["channel"])
82
+ channels.map! { |channel| @options[:namespace] + channel }
83
+ Set.new(channels)
82
84
  end
83
85
 
84
86
  def register_connection(connection)
@@ -1,3 +1,3 @@
1
1
  module Jugglite
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jugglite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - andruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-25 00:00:00.000000000 Z
11
+ date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thin