mikemarsian-ruby_bosh 0.13.2 → 0.13.3

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +13 -6
  3. data/ruby_bosh.gemspec +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbd7893e2f92bad2b33d3b7a411e0727755352c4
4
- data.tar.gz: 4d7a9a9cfb325f8ba7a14afab95cc85db8a22f52
3
+ metadata.gz: 831fff9ccd8c05dc026537e96a214058b6d372bb
4
+ data.tar.gz: 93712d84cf93fdb85400b6024dcefc9f9e87f674
5
5
  SHA512:
6
- metadata.gz: 45a7d303cb699588e706f339520d241d8db29afec1d371bf16ddf645f4c8f795f08d780d69d76401fae0681c5e71f2d1442221ecdedb1e81aeecaf4c345a8b57
7
- data.tar.gz: efe974fdc298777ba995595d8dcbbb3ad54ebcc52024d339c4f0219171a1f0104f7626f241b914ef3a1e23f3290c7dfd4b518cf4a861fd5b410db0c92881ff9e
6
+ metadata.gz: dacab7e386fc6f7553460e0cc60236a40e99fa09a4880a65e6810394f8ce81558e35aabd990598edc7121c1e5a2413aa20b3313bb4e35ec1622b292b90348046
7
+ data.tar.gz: 92da6209cd4c7c0129e980f01ddf6abf1a9accab75c4012cc285718f11382fade65b033d6774397a87717cd0803ecbc2cacbcd00e25663b08ac78fffa52866a0
data/README.md CHANGED
@@ -15,29 +15,36 @@ XMPP via BOSH: http://xmpp.org/extensions/xep-0206.html
15
15
 
16
16
  In your Ruby app controller (or equivalent):
17
17
 
18
+ ```ruby
18
19
  @session_jid, @session_id, @session_random_id =
19
20
  RubyBOSH.initialize_session("me@jabber.org", "my_password", "http://localhost:5280/http-bind")
21
+ ```
20
22
 
21
23
  If you want to define your own resource name, include it within the jid. RubyBOSH will create a random one if none is supplied.
22
24
  To define a resource name of 'home', do the following:
23
25
 
26
+ ```ruby
24
27
  @session_jid, @session_id, @session_random_id =
25
28
  RubyBOSH.initialize_session("me@jabber.org/home", "my_password", "http://localhost:5280/http-bind")
29
+ ```
26
30
 
27
31
  In your template, you would then pass these directly to your javascript BOSH connector:
28
32
 
33
+ ``` erb
29
34
  var bosh_jid = '<%= @session_jid %>';
30
35
  var bosh_sid = '<%= @session_id %>';
31
36
  var bosh_rid = '<%= @session_random_id %>';
37
+ ```
32
38
 
39
+ ``` js
33
40
  // using Strophe:
34
- connect.attach(bosh_jid, bosh_sid, bosh_rid, onConnectHandlerFunction);
41
+ connect.attach(bosh_jid, bosh_sid, bosh_rid, onConnectHandlerFunction);
42
+ ```
35
43
 
36
- Acknowledgements
37
- ================
38
- Jack Moffit
39
- - thanks for the nice Django example :)
40
- #=> http://metajack.im/2008/10/03/getting-attached-to-strophe/
44
+ ## Acknowledgements
45
+
46
+ Jack Moffit - thanks for the [nice Django example](http://metajack.im/2008/10/03/getting-attached-to-strophe/)
41
47
 
42
48
  Copyright (c) 2008 Pradeep Elankumaran. See LICENSE for details.
49
+
43
50
  Copyright (c) 2016 Mike Polischuk. See LICENSE for details.
data/ruby_bosh.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mikemarsian-ruby_bosh"
3
- s.version = "0.13.2"
3
+ s.version = "0.13.3"
4
4
 
5
5
  s.require_paths = ["lib"]
6
6
  s.authors = ["Original author: Pradeep Elankumaran. Update for ruby 2: Mike Polischuk"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mikemarsian-ruby_bosh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.2
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Original author: Pradeep Elankumaran. Update for ruby 2: Mike Polischuk'