superfeedr_engine 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/superfeedr_engine/engine.rb +11 -11
- data/lib/superfeedr_engine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTRhYWFmNzUxMGI0MTU3YmUwMWZiZDQzYTVjZmE1ZWE2ODA1ZTIzNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWM1NjgyYTc3ZWVlYTIyNGE3ZjY4ZDc3ZTA2MGExZDI2OWEzMWFmNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzVlNTI3MzQ1Y2MyOWZhNzVmZmJiYjAxYTdlMDNhZGRlMDY1MTg3ZTAyMmZl
|
10
|
+
YTAxMjVmMTUzMzY4NWQ3ZWI4ZGJiMjE3ZTg2NjlmNzIyOGZmNmZiNWQ4NmEx
|
11
|
+
ZmU0YzY1MDYwZmUxOWUzNmFjYzhlNjEwZjdlOTBhMDNiNWZiYzI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmQ5MzNjZTg3ZTVlOTBkZTQ0OGY1YTAyOGY3N2M2NmQxZjNlOWY0MTVmN2M0
|
14
|
+
YzBiMjU5Y2RkN2EzOTM5YWY4YzhkOTQxMTVlMmI3Nzk4ZDk3OTRiMDNjZjJh
|
15
|
+
M2UzYTBkOTBiYWRjODZiY2ZiNjE0M2EyNDEyZmY2NjRiM2Q3MWQ=
|
@@ -17,20 +17,20 @@ module SuperfeedrEngine
|
|
17
17
|
extend SuperfeedrAPI
|
18
18
|
|
19
19
|
def self.subscribe(object, opts = {})
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
raise "Missing url method or property on #{object}" unless object.class.method_defined? :url
|
21
|
+
raise "Missing id method or property on #{object}" unless object.class.method_defined? :id
|
22
|
+
raise "Missing secret method or property #{object}" unless object.class.method_defined? :id
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
raise "#{object}#url needs to be a URL" unless valid?(object.url)
|
25
|
+
raise "#{object}#id needs to not empty" if object.id.to_s.empty?
|
26
|
+
raise "#{object}#secret needs to not empty" if object.secret.to_s.empty?
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
opts.merge!({
|
29
|
+
secret: object.secret,
|
30
|
+
format: 'json' # Force the use of the JSON
|
31
31
|
});
|
32
32
|
|
33
|
-
|
33
|
+
super(object.url, object.id, opts)
|
34
34
|
end
|
35
35
|
|
36
36
|
def self.retrieve(object, opts = {})
|
@@ -41,7 +41,7 @@ module SuperfeedrEngine
|
|
41
41
|
format: 'json' # Force the use of the JSON
|
42
42
|
});
|
43
43
|
|
44
|
-
|
44
|
+
self.retrieve_by_topic_url(object.url, opts)
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.unsubscribe(object, opts = {})
|