rss_creator 0.3.11 → 0.4.0
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.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/rss_creator.rb +30 -5
- metadata +36 -31
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 647757a294410e98e341314c9f85c097059161320456321ff8472deb90c363d6
|
|
4
|
+
data.tar.gz: 396951cc15ffcd5ae92790392a4ad139310acd35cdd2d7b1f59d0e15696a6bd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 465c8405ef8d2f6ff853f418d35eaf4eb6d07f301f02664d31a59b41357a27486a49d5b159e8b941c69697b1464ec623dab641dcbcfd77612e704e9861565abd
|
|
7
|
+
data.tar.gz: 2308016cbad0de11a04ccfdbb2bfa2e345ac440700fedb7cea0c1f9aeac1164fc152fd0569fa8f55a69db3e82c32ac3695be5e0f003cc867a56bb54422263ef2
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/rss_creator.rb
CHANGED
|
@@ -8,13 +8,14 @@ require 'rss_to_dynarex'
|
|
|
8
8
|
|
|
9
9
|
class RSScreator
|
|
10
10
|
|
|
11
|
-
attr_accessor :title, :description, :link, :limit, :xslt
|
|
11
|
+
attr_accessor :title, :description, :link, :limit, :xslt, :image_url,
|
|
12
|
+
:image_target_url
|
|
12
13
|
|
|
13
|
-
def initialize(filepath='rss.xml', dx_xslt: nil,
|
|
14
|
-
|
|
14
|
+
def initialize(filepath='rss.xml', dx_xslt: nil, dx_filename: 'feed.xml',
|
|
15
|
+
custom_fields: [], limit: 10, debug: false)
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
@filepath = filepath
|
|
18
|
+
@filepath, @debug = filepath, debug
|
|
18
19
|
|
|
19
20
|
dxfilepath = File.join(File.dirname(filepath), dx_filename)
|
|
20
21
|
|
|
@@ -96,6 +97,18 @@ class RSScreator
|
|
|
96
97
|
def dynarex()
|
|
97
98
|
@dx
|
|
98
99
|
end
|
|
100
|
+
|
|
101
|
+
def image_url=(val)
|
|
102
|
+
@image_url = val
|
|
103
|
+
@dirty = true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
alias image= image_url=
|
|
107
|
+
|
|
108
|
+
def image_target_url=(val)
|
|
109
|
+
@image_target_url = val
|
|
110
|
+
@dirty = true
|
|
111
|
+
end
|
|
99
112
|
|
|
100
113
|
def link=(val)
|
|
101
114
|
@link = val
|
|
@@ -134,7 +147,19 @@ class RSScreator
|
|
|
134
147
|
|
|
135
148
|
else
|
|
136
149
|
|
|
137
|
-
@dx.to_rss({limit: @limit})
|
|
150
|
+
@dx.to_rss({limit: @limit}) do |doc|
|
|
151
|
+
|
|
152
|
+
if @image_url then
|
|
153
|
+
|
|
154
|
+
img = Rexle::Element.new('image')
|
|
155
|
+
img.add Rexle::Element.new('url').add_text @image_url
|
|
156
|
+
img.add Rexle::Element.new('link').add_text @image_target_url
|
|
157
|
+
|
|
158
|
+
doc.root.element('channel/item').insert_before img
|
|
159
|
+
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
138
163
|
|
|
139
164
|
end
|
|
140
165
|
|
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.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -10,27 +10,32 @@ bindir: bin
|
|
|
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40
|
- !ruby/object:Gem::Dependency
|
|
36
41
|
name: rss_to_dynarex
|
|
@@ -56,24 +61,24 @@ dependencies:
|
|
|
56
61
|
name: rss_sliml
|
|
57
62
|
requirement: !ruby/object:Gem::Requirement
|
|
58
63
|
requirements:
|
|
59
|
-
- - "~>"
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.1'
|
|
62
64
|
- - ">="
|
|
63
65
|
- !ruby/object:Gem::Version
|
|
64
|
-
version: 0.
|
|
66
|
+
version: 0.2.0
|
|
67
|
+
- - "~>"
|
|
68
|
+
- !ruby/object:Gem::Version
|
|
69
|
+
version: '0.2'
|
|
65
70
|
type: :runtime
|
|
66
71
|
prerelease: false
|
|
67
72
|
version_requirements: !ruby/object:Gem::Requirement
|
|
68
73
|
requirements:
|
|
69
|
-
- - "~>"
|
|
70
|
-
- !ruby/object:Gem::Version
|
|
71
|
-
version: '0.1'
|
|
72
74
|
- - ">="
|
|
73
75
|
- !ruby/object:Gem::Version
|
|
74
|
-
version: 0.
|
|
76
|
+
version: 0.2.0
|
|
77
|
+
- - "~>"
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: '0.2'
|
|
75
80
|
description:
|
|
76
|
-
email:
|
|
81
|
+
email: digital.robertson@gmail.com
|
|
77
82
|
executables: []
|
|
78
83
|
extensions: []
|
|
79
84
|
extra_rdoc_files: []
|
|
@@ -99,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
99
104
|
version: '0'
|
|
100
105
|
requirements: []
|
|
101
106
|
rubyforge_project:
|
|
102
|
-
rubygems_version: 2.
|
|
107
|
+
rubygems_version: 2.7.10
|
|
103
108
|
signing_key:
|
|
104
109
|
specification_version: 4
|
|
105
110
|
summary: A gem for creating RSS feeds
|
metadata.gz.sig
CHANGED
|
Binary file
|