rss_creator 0.2.9 → 0.2.10
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 +1 -1
- data.tar.gz.sig +0 -0
- data/lib/rss_creator.rb +4 -5
- metadata +1 -1
- 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: 54f6777c3d4e6d2a494ebcaae37baa434276337e
|
4
|
+
data.tar.gz: 93fce4114abde3856888b12ed19be67dd98e36ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 258dd1ca16c7ec40808eb8162e0d706c3fd37e5ec1ba4eb89c2e3169de88394e9b14cdd328a28a6944a6c2f0ad9a4fa610fffa0db2ce96ddc1d7af26ac344cb5
|
7
|
+
data.tar.gz: ee65892d41207095303ff656dccc8e4983ffdf803fdc64d78d781a50da520e29c6a91a079de68c76d3ae3e30f14fb6a986497781cd25e93ed0a0525eeda5b4b7
|
checksums.yaml.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rss_creator.rb
CHANGED
@@ -19,8 +19,6 @@ class RSScreator
|
|
19
19
|
rtd = RSStoDynarex.new filepath
|
20
20
|
@dx = rtd.to_dynarex
|
21
21
|
|
22
|
-
@dx.default_key = 'uid'
|
23
|
-
|
24
22
|
@title = @dx.title
|
25
23
|
@description = @dx.description
|
26
24
|
@link = @dx.link
|
@@ -30,7 +28,8 @@ class RSScreator
|
|
30
28
|
'item(title, link, description, date)'
|
31
29
|
@dx.order = 'descending'
|
32
30
|
end
|
33
|
-
|
31
|
+
|
32
|
+
@dx.default_key = 'uid'
|
34
33
|
@dx.xslt = dx_xslt if dx_xslt
|
35
34
|
@dx.xslt_schema = 'channel[title:title,description:description,' + \
|
36
35
|
'link:link]/item(title:title,description:description,' + \
|
@@ -41,14 +40,14 @@ class RSScreator
|
|
41
40
|
|
42
41
|
end
|
43
42
|
|
44
|
-
def add(item={title: '', link: '', description: ''})
|
43
|
+
def add(item={title: '', link: '', description: ''}, id: nil)
|
45
44
|
|
46
45
|
unless item[:title] and item[:link] then
|
47
46
|
raise 'RSScreator: title or link can\'t be blank'
|
48
47
|
end
|
49
48
|
|
50
49
|
record = {date: Time.now.strftime("%a, %d %b %Y %H:%M:%S %z")}.merge(item)
|
51
|
-
@dx.create
|
50
|
+
@dx.create(record, id: id)
|
52
51
|
|
53
52
|
@dirty = true
|
54
53
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|