Skip to content

Commit

Permalink
Added js libraries and rails engine
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowcircle committed Feb 3, 2015
1 parent b54e812 commit 83e6d97
Show file tree
Hide file tree
Showing 5 changed files with 3,652 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,17 @@ Where `123123` is UNIX timestamp. You can also add user info as valid json strin

client.token_for('testuser', '123123', "{}")

## Rails assets

To use Centrifuge js client just add this line to your application.js manifest:

//= require centrifuge

If you want to use sockjs require it before centrifuge:

//= require sockjs
//= require centrifuge

### Other API

Other API methods, like projects and channels management are unavailable now.
Expand Down
5 changes: 5 additions & 0 deletions lib/centrifuge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
require 'forwardable'

module Centrifuge
if defined?(Rails)
class Engine < Rails::Engine
end
end

class Error < RuntimeError; end
class AuthenticationError < Error; end
class ConfigurationError < Error; end
Expand Down
2 changes: 1 addition & 1 deletion lib/centrifuge/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Centrifuge
VERSION = "0.0.2"
VERSION = "0.0.3"
end
Loading

0 comments on commit 83e6d97

Please sign in to comment.