rss_creator 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rss_creator.rb +28 -22
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28e49f47c7f055a868d9646ad2164d779042454d
|
4
|
+
data.tar.gz: bdd195f00d6cdf6b8275aec5642864ec5ea9681f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb83e3517d9e0d6d9305fc9670b58ab7dde1ded6971b4fa3d3062eb29d6c4b980945ea3bde105494a3b6679c2b254409879fba7bbd710585b7a051e590b5af16
|
7
|
+
data.tar.gz: de3667ea9d552df5d9030b6cb50aa44759bfee29b35990a8a8aad98e84e79f9f1e332e339e167979075891bc2fa9b245b451ac7059bcf70f0963e22ac0a872c5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rss_creator.rb
CHANGED
@@ -19,42 +19,48 @@ class RSScreator
|
|
19
19
|
dxfilepath = File.join(File.dirname(filepath), dx_filename)
|
20
20
|
|
21
21
|
if filepath and File.exists? dxfilepath then
|
22
|
-
|
22
|
+
|
23
23
|
@dx = Dynarex.new dxfilepath
|
24
24
|
@title, @description, @link = @dx.title, @dx.description, @dx.link
|
25
|
+
|
26
|
+
else
|
27
|
+
if filepath and File.exists? filepath
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
rtd = RSStoDynarex.new filepath
|
29
|
-
@dx = rtd.to_dynarex
|
29
|
+
rtd = RSStoDynarex.new filepath
|
30
|
+
@dx = rtd.to_dynarex
|
30
31
|
|
31
|
-
|
32
|
+
@title, @description, @link = @dx.title, @dx.description, @dx.link
|
32
33
|
|
33
|
-
|
34
|
+
else
|
35
|
+
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
37
|
+
schema = 'channel[title, description, link]/' + \
|
38
|
+
'item(title, link, description, date'
|
39
|
+
schema += ', ' + custom_fields.join(', ') if custom_fields.any?
|
40
|
+
schema += ')'
|
41
|
+
|
42
|
+
@dx = Dynarex.new schema
|
43
|
+
end
|
44
|
+
|
45
|
+
@dx.order = 'descending'
|
46
|
+
@dx.default_key = 'uid'
|
47
|
+
@dx.xslt = dx_xslt if dx_xslt
|
48
|
+
@dx.xslt_schema = 'channel[title:title,description:description,' + \
|
49
|
+
'link:link]/item(title:title,description:description,' + \
|
50
|
+
'link:link,pubDate:date)'
|
51
|
+
# maxium number of items saved in the RSS feed
|
52
|
+
@dx.limit = @limit = 10
|
39
53
|
|
40
|
-
@dx = Dynarex.new schema
|
41
54
|
end
|
42
55
|
|
43
|
-
|
44
|
-
@dx.default_key = 'uid'
|
45
|
-
@dx.xslt = dx_xslt if dx_xslt
|
46
|
-
@dx.xslt_schema = 'channel[title:title,description:description,' + \
|
47
|
-
'link:link]/item(title:title,description:description,' + \
|
48
|
-
'link:link,pubDate:date)'
|
49
|
-
# maxium number of items saved in the RSS feed
|
50
|
-
@dx.limit = @limit = 10
|
56
|
+
|
51
57
|
@dirty = true
|
52
58
|
@dxfilename = dx_filename
|
53
59
|
|
54
60
|
end
|
55
61
|
|
56
|
-
def add(item
|
57
|
-
|
62
|
+
def add(item: {title: '', link: '', description: ''}, id: nil)
|
63
|
+
|
58
64
|
unless item[:title] and item[:link] then
|
59
65
|
raise 'RSScreator: title or link can\'t be blank'
|
60
66
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rss_creator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
hXSgrPL6ACV7rtc2iVhUYecvY3zMO7BYslWTwMttsJoWwM3Y1/zMxqGA6hyM1FiZ
|
32
32
|
NhhuO3PIc1VSzw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-03-
|
34
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rss_to_dynarex
|
metadata.gz.sig
CHANGED
Binary file
|