Skip to content

hainesr/pmrpc-rails

Repository files navigation

Pmrpc packaged for Rails

Author

Robert Haines

Contact

rhaines@manchester.ac.uk

URL

github.com/hainesr/pmrpc-rails

Licence

Apache 2.0 (See LICENCE or www.apache.org/licenses/LICENSE-2.0)

Copyright

© 2013 Robert Haines

Synopsis

This gem packages the Pmrpc HTML5 JavaScript library for the Rails (3.1+) asset pipeline.

Description

Pmrpc is an HTML5 JavaScript library for message passing, remote procedure call and publish-subscribe cross-contex communication in the browser. The library provides a simple API for exposing and calling procedures between browser windows, iframes and web workers, even between different origins. Pmrpc also provides several advanced features: callbacks similar to AJAX calls, ACL-based access control, asynchronous procedure support and fault-tolerance via retries. In case this wasn’t clear, pmrpc is not a library for browser-server communication, it is a library for communication within the browser.

Pmrpc is available from github.com/izuzak/pmrpc

This is purely a gem to package the Pmrpc library for Ruby on Rails.

Installation

Simply add this gem to your Gemfile:

gem "pmrpc-rails"

And add the following to your JavaScript manifest (usually application.js):

//= require pmrpc

And that is it!

Usage

Please see the Pmrpc documentation for how to use it.

Bugs

For bugs in Pmrpc itself please see the Pmrpc issue tracker

For bugs in this packaging gem please use the Pmrpc Rails issue tracker

Customizing Pmrpc itself

This repository includes the Pmrpc repository as a submodule; it is contributor friendly!

So you can easily work on the pmrpc code:

cd pmrpc               # go into the pmrpc submodule
git checkout master
< make your changes >
cd ..                  # go back out to the pmrpc-rails repository root
rake build             # rebuild the gem with your pmrpc changes

Then if your main app is using your local checkout of the pmrpc-rails gem then you will be using your new version of pmrpc next time you refresh your browser.

About

Package the Pmrpc HTML5 JavaScript library for the Rails asset pipeline.

Resources

License

Stars

Watchers

Forks

Packages

No packages published