superfeedr-ruby 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -4
- data/VERSION.yml +1 -1
- data/lib/superfeedr.rb +5 -6
- data/spec/superfeedr_ruby_spec.rb +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -43,10 +43,9 @@ Yes, the gem is called superfeedr-ruby, but the library is superfeedr only ;)
|
|
43
43
|
|
44
44
|
== Install
|
45
45
|
|
46
|
-
Install the gem from
|
46
|
+
Install the gem from Gemcutter :
|
47
47
|
|
48
|
-
gem
|
49
|
-
sudo gem install superfeedr-superfeedr-ruby
|
48
|
+
sudo gem install superfeedr-ruby
|
50
49
|
|
51
50
|
Source :
|
52
51
|
|
@@ -60,7 +59,7 @@ Please see this {Gist}[http://gist.github.com/110247] while I am trying to find
|
|
60
59
|
|
61
60
|
== REQUIREMENTS:
|
62
61
|
|
63
|
-
{
|
62
|
+
{Skates}[http://github.com/julien51/skates/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
63
|
|
65
64
|
sudo gem install skates
|
66
65
|
|
data/VERSION.yml
CHANGED
data/lib/superfeedr.rb
CHANGED
@@ -7,8 +7,7 @@ require "stanzas/subscriptions_query_stanza.rb"
|
|
7
7
|
|
8
8
|
##
|
9
9
|
# By default, the log level is at error. You can change that at anytime in your app
|
10
|
-
|
11
|
-
|
10
|
+
Skates.logger.level = Log4r::ERROR
|
12
11
|
|
13
12
|
##
|
14
13
|
# Based on the API documented there : http://superfeedr.com/documentation
|
@@ -41,9 +40,9 @@ module Superfeedr
|
|
41
40
|
|
42
41
|
run = Proc.new {
|
43
42
|
if app_type == "client"
|
44
|
-
|
43
|
+
Skates::ClientConnection.connect(params, self)
|
45
44
|
else
|
46
|
-
|
45
|
+
Skates::ComponentConnection.connect(params, self)
|
47
46
|
end
|
48
47
|
}
|
49
48
|
|
@@ -92,7 +91,7 @@ module Superfeedr
|
|
92
91
|
##
|
93
92
|
# Adds the url to the list of feeds you're monitoring. The block passed in argument will be called upon success.
|
94
93
|
# The block will take one boolen argument : true means everything went right... false means something failed!
|
95
|
-
# (Please set
|
94
|
+
# (Please set Skates's log to Log4r::INFO for more info)
|
96
95
|
def self.add_feeds(feeds_url, &block)
|
97
96
|
raise NotConnected unless connection
|
98
97
|
stanza = SubscribeQueryStanza.new({:nodes => feeds_url, :from => connection.jid})
|
@@ -105,7 +104,7 @@ module Superfeedr
|
|
105
104
|
##
|
106
105
|
# Unsubscribe from a feed. The block passed in argument will be called upon success.
|
107
106
|
# The block will take one boolen argument : true means everything went right... false means something failed!
|
108
|
-
# (Please set
|
107
|
+
# (Please set Skates's log to Log4r::INFO for more info)
|
109
108
|
def self.remove_feeds(feeds_url, &block)
|
110
109
|
raise NotConnected unless connection
|
111
110
|
stanza = UnsubscribeQueryStanza.new({:nodes => feeds_url, :from => connection.jid})
|
@@ -3,7 +3,7 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|
3
3
|
describe Superfeedr do
|
4
4
|
|
5
5
|
before(:each) do
|
6
|
-
@mock_connection = mock(
|
6
|
+
@mock_connection = mock(Skates::XmppConnection, {:send_xml => true, :jid => "client@server.tld/resource"})
|
7
7
|
end
|
8
8
|
|
9
9
|
describe "connect" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: superfeedr-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
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: 2010-01-
|
12
|
+
date: 2010-01-25 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|