centrifuge 0.0.2 → 0.0.3

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: a483bf8a32d0af6d5184c0a28f25464705106073
4
- data.tar.gz: f972c1f3e9a25c58301a5073de97637b727f813f
3
+ metadata.gz: d392ff9d6bbdf4ea0e020a7192384329548d82eb
4
+ data.tar.gz: c7639d29aa665e3f9d201ff76cbd5aa50b28d143
5
5
  SHA512:
6
- metadata.gz: 7c6d42a81060a3da3f7e47c9bbd11d131ce1bdc025847b5caff58758552d6da63d849976027f60655b28fe54aa01da90c0c8917326f4326c500f85a5ff085693
7
- data.tar.gz: 064ae4451a97f1869121e8c19439c65809f2381747fc75137a675c5a154601e5a7c55f52188c702e11f2faff6761afd51bd5ea2006d670f836e35e30c0afa25d
6
+ metadata.gz: 9174de5d51e4230bac9ed3a821c027ee4bd24f415e4c3aee51955f399f2d88d84f5dc0e981953bc25dcea5894c6d7ea90e433b46c0a33024f68d4f1100b023b0
7
+ data.tar.gz: 79bfb6afaef659e1986ba5002473bb67f77afd2dedb3a83c1ccf7344e04fd0e3871368548ce5ec4b79c7bef60134d830671bef5d688cf05f73a9c406d8f154bf
data/README.md CHANGED
@@ -76,11 +76,22 @@ Gets message history of the channel:
76
76
 
77
77
  Generates token for JS client:
78
78
 
79
- client.token_for('testuser', '123123')
79
+ client.token_for('testuser', '123123')
80
80
 
81
81
  Where `123123` is UNIX timestamp. You can also add user info as valid json string as third parameter:
82
82
 
83
- client.token_for('testuser', '123123', "{}")
83
+ client.token_for('testuser', '123123', "{}")
84
+
85
+ ## Rails assets
86
+
87
+ To use Centrifuge js client just add this line to your application.js manifest:
88
+
89
+ //= require centrifuge
90
+
91
+ If you want to use sockjs require it before centrifuge:
92
+
93
+ //= require sockjs
94
+ //= require centrifuge
84
95
 
85
96
  ### Other API
86
97
 
@@ -1,3 +1,3 @@
1
1
  module Centrifuge
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/centrifuge.rb CHANGED
@@ -3,6 +3,11 @@ require "centrifuge/client"
3
3
  require 'forwardable'
4
4
 
5
5
  module Centrifuge
6
+ if defined?(Rails)
7
+ class Engine < Rails::Engine
8
+ end
9
+ end
10
+
6
11
  class Error < RuntimeError; end
7
12
  class AuthenticationError < Error; end
8
13
  class ConfigurationError < Error; end