superfeedr-superfeedr-ruby 0.3.3 → 0.3.4
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.
- data/README.rdoc +1 -1
- data/VERSION.yml +1 -1
- data/lib/superfeedr.rb +4 -3
- metadata +4 -3
data/README.rdoc
CHANGED
|
@@ -62,7 +62,7 @@ Please see this {Gist}[http://gist.github.com/110247] while I am trying to find
|
|
|
62
62
|
|
|
63
63
|
{Babylon}[http://github.com/julien51/babylon/tree/master] : please note that there are 2 gems named Baylon. The one you want is the one about XMPP, you can get it with :
|
|
64
64
|
|
|
65
|
-
sudo gem install babylon
|
|
65
|
+
sudo gem install julien51-babylon
|
|
66
66
|
|
|
67
67
|
== Copyright
|
|
68
68
|
|
data/VERSION.yml
CHANGED
data/lib/superfeedr.rb
CHANGED
|
@@ -20,7 +20,7 @@ module Superfeedr
|
|
|
20
20
|
@@connection = nil
|
|
21
21
|
@@callbacks = {}
|
|
22
22
|
@@connection_callback = nil
|
|
23
|
-
@@
|
|
23
|
+
@@notification_callback = nil
|
|
24
24
|
|
|
25
25
|
##
|
|
26
26
|
# Connects your client to the Superfeedr.com XMPP server. You need to pass the following arguments :
|
|
@@ -31,6 +31,7 @@ module Superfeedr
|
|
|
31
31
|
# ["app_type" : (client | component) only useful if you use an external jid ]
|
|
32
32
|
# The optional block will be called upon connection.
|
|
33
33
|
def self.connect(jid, password, host = nil, port = nil, app_type = "client", &block)
|
|
34
|
+
|
|
34
35
|
params = {
|
|
35
36
|
"jid" => jid,
|
|
36
37
|
"password" => password,
|
|
@@ -132,7 +133,7 @@ module Superfeedr
|
|
|
132
133
|
# Specifies the block that will be called upon notification.
|
|
133
134
|
# Your block should take a NotificationStanza instance argument.
|
|
134
135
|
def self.on_notification(&block)
|
|
135
|
-
@@
|
|
136
|
+
@@notification_callback = block
|
|
136
137
|
end
|
|
137
138
|
|
|
138
139
|
##
|
|
@@ -194,7 +195,7 @@ module Superfeedr
|
|
|
194
195
|
@@callbacks.delete(stanza["id"])
|
|
195
196
|
else
|
|
196
197
|
if stanza.name == "message" and stanza.at("event")
|
|
197
|
-
@@
|
|
198
|
+
@@notification_callback.call(NotificationStanza.new(stanza)) if @@notification_callback
|
|
198
199
|
# Here we need to call the main notification callback!
|
|
199
200
|
end
|
|
200
201
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: superfeedr-superfeedr-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- julien Genestoux
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-08-03 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -63,6 +63,7 @@ files:
|
|
|
63
63
|
- spec/superfeedr_ruby_spec.rb
|
|
64
64
|
has_rdoc: true
|
|
65
65
|
homepage: http://github.com/julien51/superfeedr-ruby/
|
|
66
|
+
licenses:
|
|
66
67
|
post_install_message:
|
|
67
68
|
rdoc_options:
|
|
68
69
|
- --charset=UTF-8
|
|
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
83
84
|
requirements: []
|
|
84
85
|
|
|
85
86
|
rubyforge_project: superfeedr-ruby
|
|
86
|
-
rubygems_version: 1.
|
|
87
|
+
rubygems_version: 1.3.5
|
|
87
88
|
signing_key:
|
|
88
89
|
specification_version: 2
|
|
89
90
|
summary: Ruby Client for the Superfeedr
|