yarss 0.0.4 → 0.0.5

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: df8227811b0fa37c7605e53cbe37106a67fd4f5f
4
- data.tar.gz: 239430b572285f2db67d39c3bc29ca743118eee3
3
+ metadata.gz: fc0dfd0adff083176c44262ea275f200e4566d26
4
+ data.tar.gz: 25f309a4612f77c4707682974bc599ee2bb4d9b0
5
5
  SHA512:
6
- metadata.gz: 01c7ee7bb21d06cf598ad31f9b80980487ad52e62e3380c6125c2bc14204855faed438347b5109e2a272bcba3128ee620ca1b428e2a05bdf74f2dff8655a4e04
7
- data.tar.gz: 318a7f1a2d7589e1e2ed8a887ddc15ff31126c4ce2ac8e9c49ca45f66957887241efa9a8304958bdf3617cc05dc054b99cb1bd68d5858893ae313a46112825f3
6
+ metadata.gz: 7ba2fe7dedafc8b4119ffd10a18579a46ee0ab16d79ada7ff686b525557a687838700e3861164d1da32e5d29babe223d841592145baeb97fec4c016d462675e8
7
+ data.tar.gz: 09abd702209f127c807c28db014f03ffcc53288d0445abdf3e37e8be3e1202e62d05b0c5bd9bdb6933fd49c51b23eb5c71cf7aa2729d696119a50b7dd15a8b5a
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ language: ruby
2
2
 
3
3
  rvm:
4
4
  - 2.3.0
5
- - jruby-19mode
6
5
 
7
6
  branches:
8
7
  only:
@@ -80,8 +80,8 @@ module Yarss
80
80
  when Array
81
81
  item = value.find { |l| l.is_a?(String) } ||
82
82
  value.find { |l| l['rel'] && l['rel'] == 'alternate' } ||
83
- value.find { |l| l['rel'].nil? }
84
- raise KeyError unless item
83
+ value.find { |l| l['rel'].nil? } ||
84
+ ''
85
85
  link_value(item)
86
86
  when String
87
87
  value.strip
data/lib/yarss/feed.rb CHANGED
@@ -44,5 +44,33 @@ module Yarss
44
44
  description == other.description &&
45
45
  items == other.items
46
46
  end
47
+
48
+ # Is the title present?
49
+ #
50
+ # @return [Bool]
51
+ def title?
52
+ !title.nil? && !title.empty?
53
+ end
54
+
55
+ # Is the URL to the related Web page present?
56
+ #
57
+ # @return [Bool]
58
+ def link?
59
+ !link.nil? && !link.empty?
60
+ end
61
+
62
+ # Is the description present?
63
+ #
64
+ # @return [Bool]
65
+ def description?
66
+ !description.nil? && !description.empty?
67
+ end
68
+
69
+ # Are the feed items present?
70
+ #
71
+ # @return [Bool]
72
+ def items?
73
+ !items.nil? && !items.empty?
74
+ end
47
75
  end
48
76
  end
data/lib/yarss/item.rb CHANGED
@@ -56,5 +56,47 @@ module Yarss
56
56
  author == other.author &&
57
57
  content == other.content
58
58
  end
59
+
60
+ # Is the ID present?
61
+ #
62
+ # @return [Bool]
63
+ def id?
64
+ !id.nil? && !id.empty?
65
+ end
66
+
67
+ # Is the title present?
68
+ #
69
+ # @return [Bool]
70
+ def title?
71
+ !title.nil? && !title.empty?
72
+ end
73
+
74
+ # Is the date and time of the last modification present?
75
+ #
76
+ # @return [Bool]
77
+ def updated_at?
78
+ !updated_at.nil?
79
+ end
80
+
81
+ # Is the URL to the related Web page present?
82
+ #
83
+ # @return [Bool]
84
+ def link?
85
+ !link.nil? && !link.empty?
86
+ end
87
+
88
+ # Is the author present?
89
+ #
90
+ # @return [Bool]
91
+ def author?
92
+ !author.nil? && !author.empty?
93
+ end
94
+
95
+ # Is the content present?
96
+ #
97
+ # @return [Bool]
98
+ def content?
99
+ !content.nil? && !content.empty?
100
+ end
59
101
  end
60
102
  end
data/lib/yarss/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Yarss
4
4
  # Version number, happy now?
5
- VERSION = '0.0.4'
5
+ VERSION = '0.0.5'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yarss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oldrich Vetesnik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-05 00:00:00.000000000 Z
11
+ date: 2016-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler