rss_creator 0.6.1 → 0.6.2
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/lib/rss_creator.rb +15 -12
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d890a1bcc638ec87c774f46359b683f5c7ca08ce0375bae028988116f852c2fb
|
4
|
+
data.tar.gz: 2b031457ab6c1df794fad2dcf09043828262fc6d1855a3d1eb7501056ad55e6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad334d57682511fe7b6e2fa358dcb5335fbc8c947a0b750838db3be45bd4ede7fb05d733bdc006df341f49752bff67df9aabfdeada8fd312bee816b933bc9ad9
|
7
|
+
data.tar.gz: dc9751cd4badb902e31f4c67edfe68a9e85c27ee53b3819dcc3b4d9def54dfecc4264fb9d974a31d160d9f4a044850956220653834339629fea57c58c22834b7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rss_creator.rb
CHANGED
@@ -12,21 +12,27 @@ class RSScreator
|
|
12
12
|
attr_accessor :title, :description, :link, :limit, :xslt, :image_url,
|
13
13
|
:image_target_url
|
14
14
|
|
15
|
-
def initialize(filepath='rss.xml', dx_xslt: nil, dx_filename:
|
16
|
-
custom_fields: [], limit: 10, log: nil,
|
15
|
+
def initialize(filepath='rss.xml', dx_xslt: nil, dx_filename: nil,
|
16
|
+
custom_fields: [], limit: 10, log: nil, title: 'Untitled',
|
17
|
+
description: 'Description goes here', debug: false)
|
17
18
|
|
18
19
|
|
19
20
|
@filepath, @log, @debug = filepath, log, debug
|
20
21
|
|
21
|
-
|
22
|
+
if dx_filename then
|
23
|
+
|
24
|
+
dxfilepath = File.join(File.dirname(filepath), dx_filename)
|
22
25
|
|
23
|
-
|
26
|
+
if filepath and FileX.exists? dxfilepath then
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
@dx = Dynarex.new dxfilepath, debug: debug
|
29
|
+
@title, @description, @link = @dx.title, @dx.description, @dx.link
|
30
|
+
@image_url = @dx.image
|
31
|
+
|
32
|
+
end
|
28
33
|
|
29
34
|
else
|
35
|
+
|
30
36
|
if filepath and FileX.exists? filepath
|
31
37
|
|
32
38
|
rtd = RSStoDynarex.new filepath
|
@@ -43,7 +49,8 @@ class RSScreator
|
|
43
49
|
'item(title, link, description, date'
|
44
50
|
schema += ', ' + custom_fields.join(', ') if custom_fields.any?
|
45
51
|
schema += ')'
|
46
|
-
|
52
|
+
@title, @description = title, description
|
53
|
+
|
47
54
|
@dx = Dynarex.new schema
|
48
55
|
end
|
49
56
|
|
@@ -143,10 +150,6 @@ class RSScreator
|
|
143
150
|
|
144
151
|
return @rss unless @dirty
|
145
152
|
|
146
|
-
if @title.nil? or @description.nil? then
|
147
|
-
raise 'RSScreator: title or description can\'t be blank'
|
148
|
-
end
|
149
|
-
|
150
153
|
@dx.title, @dx.description, @dx.link = @title, @description, @link || ''
|
151
154
|
@dx.image = @image_url if @dx.respond_to? :image
|
152
155
|
|
data.tar.gz.sig
CHANGED
Binary file
|
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.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
cvt0iXma+gx/Ov53QNTxxB3QbNEEFdeEjg0+lO4JPFlhgtITILe804ZJCWi+hgxp
|
37
37
|
gIx/INLAIB0o7xvs4rvitJ+wC8T5u20Ubss=
|
38
38
|
-----END CERTIFICATE-----
|
39
|
-
date: 2023-03-
|
39
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rss_to_dynarex
|
metadata.gz.sig
CHANGED
Binary file
|