rss_creator 0.5.0 → 0.5.1

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
  SHA256:
3
- metadata.gz: 2953523eae0c1cb5f12dc29fae51dc7447649c04e04d666b1400d2c1e6bfdc94
4
- data.tar.gz: c13d015c8d922c498d14e398bd7910a8e8ba50d376393c5e887e638acd09e259
3
+ metadata.gz: 1e9a19b111850395e005bf30f5988a3d9fa3e77b18e7ea64ecd946223f6b0132
4
+ data.tar.gz: b874598f45e34d85d949b1a6a86f13b43ea52a0db1ee5404fc6a94dbb2d27cdd
5
5
  SHA512:
6
- metadata.gz: 3918f5754234ff6e513bcb4d0367b85a66076300ca3a6bd9986743c0f5a401944ab3fc63e06e4cf6affd1ebf70b3df2b67b83afae54b1dabb7307a4bd81fd170
7
- data.tar.gz: 4ca1d32ee4b26e1b1e240a8b9578819f4e68034e984e3d0337a93d66c19b48a91e7dee86be0a98189c334de59c2247460a972b2b9c431a05ff17e95b2395ce9b
6
+ metadata.gz: 620d7a274a083fdc661b1dc5aa11515ecb2c1d41373028e8e29cd12a7f8ba60da94f5e3a008e0f359e914647ed9918d534a76f53fed9fe6ec3256322d694002a
7
+ data.tar.gz: e6122e91ce400ed1ed538e1d18add56be3dad0d1674901d0b1773c157e37266a5663563ee13df9234e63de2d5b32f87f2147d911a9aa5facc20f58cfe54a6903
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/rss_creator.rb CHANGED
@@ -13,21 +13,21 @@ class RSScreator
13
13
  :image_target_url
14
14
 
15
15
  def initialize(filepath='rss.xml', dx_xslt: nil, dx_filename: 'feed.xml',
16
- custom_fields: [], limit: 10, debug: false)
16
+ custom_fields: [], limit: 10, log: nil, debug: false)
17
17
 
18
18
 
19
- @filepath, @debug = filepath, debug
19
+ @filepath, @log, @debug = filepath, log, debug
20
20
 
21
21
  dxfilepath = File.join(File.dirname(filepath), dx_filename)
22
22
 
23
- if filepath and File.exists? dxfilepath then
23
+ if filepath and FileX.exists? dxfilepath then
24
24
 
25
25
  @dx = Dynarex.new dxfilepath
26
26
  @title, @description, @link = @dx.title, @dx.description, @dx.link
27
27
  @image_url = @dx.image
28
28
 
29
29
  else
30
- if filepath and File.exists? filepath
30
+ if filepath and FileX.exists? filepath
31
31
 
32
32
  rtd = RSStoDynarex.new filepath
33
33
  @dx = rtd.to_dynarex
@@ -68,6 +68,8 @@ class RSScreator
68
68
 
69
69
  def add(itemx={title: '', link: '', description: ''}, item: itemx, id: nil)
70
70
 
71
+ @log.debug 'RssCreator#add item: ' + item.inspect if @log
72
+
71
73
  unless item[:title] and item[:link] then
72
74
  raise 'RSScreator: title or link can\'t be blank'
73
75
  end
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.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  CmoNNvIZ3zS4vUkMoFR7S0bXN/xdxzLVn5uGLJ8FwP76BqKlR2+xV5Bj+40hyMDP
36
36
  s+qwrtoA3kBtGhpVjCn/TE5q
37
37
  -----END CERTIFICATE-----
38
- date: 2022-01-17 00:00:00.000000000 Z
38
+ date: 2022-01-19 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rss_to_dynarex
metadata.gz.sig CHANGED
Binary file