rss_creator 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5f56422b2a1a37f8d1a6fde1293bef1aec3fb9dd
4
- data.tar.gz: 0d77235d5f39be3a3fdd7f6e4377f035a2a1e621
3
+ metadata.gz: 28e49f47c7f055a868d9646ad2164d779042454d
4
+ data.tar.gz: bdd195f00d6cdf6b8275aec5642864ec5ea9681f
5
5
  SHA512:
6
- metadata.gz: 076dbb400ced2af9201e297744bcb6c981ae614f4db28f750d99da8f9db3f4796fc70c18338f9f356f245094d5934c32522cc5a59da176ec93bfd64d0d3b58ee
7
- data.tar.gz: aa0f54b09b62c5b147d77b3a608c98adb0c56bd57394dd8fc70cb75a89c6054b06d38eab93c9b257fd66e2fd091ada7fbbe8977e17e0da166db97a884d5d831e
6
+ metadata.gz: cb83e3517d9e0d6d9305fc9670b58ab7dde1ded6971b4fa3d3062eb29d6c4b980945ea3bde105494a3b6679c2b254409879fba7bbd710585b7a051e590b5af16
7
+ data.tar.gz: de3667ea9d552df5d9030b6cb50aa44759bfee29b35990a8a8aad98e84e79f9f1e332e339e167979075891bc2fa9b245b451ac7059bcf70f0963e22ac0a872c5
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- elsif filepath and File.exists? filepath
27
-
28
- rtd = RSStoDynarex.new filepath
29
- @dx = rtd.to_dynarex
29
+ rtd = RSStoDynarex.new filepath
30
+ @dx = rtd.to_dynarex
30
31
 
31
- @title, @description, @link = @dx.title, @dx.description, @dx.link
32
+ @title, @description, @link = @dx.title, @dx.description, @dx.link
32
33
 
33
- else
34
+ else
35
+
34
36
 
35
- schema = 'channel[title, description, link]/' + \
36
- 'item(title, link, description, date'
37
- schema += ', ' + custom_fields.join(', ') if custom_fields.any?
38
- schema += ')'
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
- @dx.order = 'descending'
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={title: '', link: '', description: ''}, id: nil)
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.7
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-10 00:00:00.000000000 Z
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