rss_creator 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6073b8b188e445255a97f3491d8cc0b0c27ea8b
4
- data.tar.gz: 9c472c765a716dcb5a11a7ce6c57edceeeb61f8e
3
+ metadata.gz: 5f56422b2a1a37f8d1a6fde1293bef1aec3fb9dd
4
+ data.tar.gz: 0d77235d5f39be3a3fdd7f6e4377f035a2a1e621
5
5
  SHA512:
6
- metadata.gz: '0297eb3191d85a419b451e4fe030c83b66ff899f721547165a740d6514395c46d9e9248a54d011e535d461b0b3da58c49e241e047757b9e0f8f1daf871baff9c'
7
- data.tar.gz: 2fc7448dd22e8cd74ea5c30935ef47be87e9b5a69bf4cb48740ff3db214653e20422cf2d41a4e43dc606c1ba5561e6e11d480d503d9c28229ee1c8be83aeb95b
6
+ metadata.gz: 076dbb400ced2af9201e297744bcb6c981ae614f4db28f750d99da8f9db3f4796fc70c18338f9f356f245094d5934c32522cc5a59da176ec93bfd64d0d3b58ee
7
+ data.tar.gz: aa0f54b09b62c5b147d77b3a608c98adb0c56bd57394dd8fc70cb75a89c6054b06d38eab93c9b257fd66e2fd091ada7fbbe8977e17e0da166db97a884d5d831e
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -10,7 +10,8 @@ class RSScreator
10
10
 
11
11
  attr_accessor :title, :description, :link, :limit, :xslt
12
12
 
13
- def initialize(filepath='rss.xml', dx_xslt: nil, dx_filename: 'feed.xml')
13
+ def initialize(filepath='rss.xml', dx_xslt: nil,
14
+ dx_filename: 'feed.xml', custom_fields: [])
14
15
 
15
16
 
16
17
  @filepath = filepath
@@ -30,8 +31,13 @@ class RSScreator
30
31
  @title, @description, @link = @dx.title, @dx.description, @dx.link
31
32
 
32
33
  else
33
- @dx = Dynarex.new 'channel[title, description, link]/' + \
34
- 'item(title, link, description, date)'
34
+
35
+ schema = 'channel[title, description, link]/' + \
36
+ 'item(title, link, description, date'
37
+ schema += ', ' + custom_fields.join(', ') if custom_fields.any?
38
+ schema += ')'
39
+
40
+ @dx = Dynarex.new schema
35
41
  end
36
42
 
37
43
  @dx.order = 'descending'
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.6
4
+ version: 0.3.7
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: 2016-11-15 00:00:00.000000000 Z
34
+ date: 2017-03-10 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rss_to_dynarex
@@ -74,7 +74,7 @@ dependencies:
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.1.0
76
76
  description:
77
- email: james@r0bertson.co.uk
77
+ email: james@jamesrobertson.eu
78
78
  executables: []
79
79
  extensions: []
80
80
  extra_rdoc_files: []
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.5.1
103
+ rubygems_version: 2.6.8
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: A gem for creating RSS feeds
metadata.gz.sig CHANGED
Binary file