rss 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +38 -0
- data/README.md +11 -11
- data/lib/rss/itunes.rb +10 -1
- data/lib/rss/maker/itunes.rb +2 -0
- data/lib/rss/rss.rb +43 -15
- data/lib/rss/utils.rb +0 -18
- data/lib/rss/version.rb +1 -1
- data/lib/rss/xml-stylesheet.rb +3 -4
- data/lib/rss/xml.rb +3 -2
- data/lib/rss.rb +11 -11
- metadata +7 -101
- data/Gemfile +0 -6
- data/Rakefile +0 -15
- data/rss.gemspec +0 -30
- data/test/dot.png +0 -0
- data/test/rss-assertions.rb +0 -2116
- data/test/rss-testcase.rb +0 -479
- data/test/run-test.rb +0 -15
- data/test/test_1.0.rb +0 -308
- data/test/test_2.0.rb +0 -412
- data/test/test_accessor.rb +0 -104
- data/test/test_atom.rb +0 -684
- data/test/test_content.rb +0 -105
- data/test/test_dublincore.rb +0 -270
- data/test/test_image.rb +0 -215
- data/test/test_inherit.rb +0 -41
- data/test/test_itunes.rb +0 -360
- data/test/test_maker_0.9.rb +0 -477
- data/test/test_maker_1.0.rb +0 -519
- data/test/test_maker_2.0.rb +0 -758
- data/test/test_maker_atom_entry.rb +0 -394
- data/test/test_maker_atom_feed.rb +0 -455
- data/test/test_maker_content.rb +0 -48
- data/test/test_maker_dc.rb +0 -150
- data/test/test_maker_image.rb +0 -63
- data/test/test_maker_itunes.rb +0 -488
- data/test/test_maker_slash.rb +0 -38
- data/test/test_maker_sy.rb +0 -45
- data/test/test_maker_taxo.rb +0 -82
- data/test/test_maker_trackback.rb +0 -42
- data/test/test_maker_xml-stylesheet.rb +0 -84
- data/test/test_parser.rb +0 -122
- data/test/test_parser_1.0.rb +0 -529
- data/test/test_parser_2.0.rb +0 -123
- data/test/test_parser_atom_entry.rb +0 -164
- data/test/test_parser_atom_feed.rb +0 -277
- data/test/test_setup_maker_0.9.rb +0 -247
- data/test/test_setup_maker_1.0.rb +0 -551
- data/test/test_setup_maker_2.0.rb +0 -309
- data/test/test_setup_maker_atom_entry.rb +0 -410
- data/test/test_setup_maker_atom_feed.rb +0 -446
- data/test/test_setup_maker_itunes.rb +0 -146
- data/test/test_setup_maker_slash.rb +0 -39
- data/test/test_slash.rb +0 -65
- data/test/test_syndication.rb +0 -126
- data/test/test_taxonomy.rb +0 -173
- data/test/test_to_s.rb +0 -701
- data/test/test_trackback.rb +0 -136
- data/test/test_xml-stylesheet.rb +0 -109
data/test/test_accessor.rb
DELETED
@@ -1,104 +0,0 @@
|
|
1
|
-
# frozen_string_literal: false
|
2
|
-
require_relative "rss-testcase"
|
3
|
-
|
4
|
-
require "rss/1.0"
|
5
|
-
require "rss/2.0"
|
6
|
-
require "rss/syndication"
|
7
|
-
require "rss/image"
|
8
|
-
|
9
|
-
module RSS
|
10
|
-
class TestAccessor < TestCase
|
11
|
-
def test_date
|
12
|
-
channel = Rss::Channel.new
|
13
|
-
channel.pubDate = nil
|
14
|
-
assert_nil(channel.pubDate)
|
15
|
-
|
16
|
-
time = Time.now
|
17
|
-
channel.pubDate = time
|
18
|
-
assert_equal(time, channel.pubDate)
|
19
|
-
|
20
|
-
time = Time.parse(Time.now.rfc822)
|
21
|
-
channel.pubDate = time.rfc822
|
22
|
-
assert_equal(time, channel.pubDate)
|
23
|
-
|
24
|
-
time = Time.parse(Time.now.iso8601)
|
25
|
-
value = time.iso8601
|
26
|
-
assert_not_available_value("pubDate", value) do
|
27
|
-
channel.pubDate = value
|
28
|
-
end
|
29
|
-
|
30
|
-
channel.do_validate = false
|
31
|
-
time = Time.parse(Time.now.iso8601)
|
32
|
-
value = time.iso8601
|
33
|
-
channel.pubDate = value
|
34
|
-
assert_equal(time, channel.pubDate)
|
35
|
-
|
36
|
-
channel.pubDate = nil
|
37
|
-
assert_nil(channel.pubDate)
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_integer
|
41
|
-
image_item = RDF::Item::ImageItem.new
|
42
|
-
|
43
|
-
image_item.width = nil
|
44
|
-
assert_nil(image_item.width)
|
45
|
-
|
46
|
-
width = 10
|
47
|
-
image_item.width = width
|
48
|
-
assert_equal(width, image_item.width)
|
49
|
-
|
50
|
-
width = 10.0
|
51
|
-
image_item.width = width
|
52
|
-
assert_equal(width, image_item.width)
|
53
|
-
|
54
|
-
width = "10"
|
55
|
-
image_item.width = width
|
56
|
-
assert_equal(width.to_i, image_item.width)
|
57
|
-
|
58
|
-
width = "10.0"
|
59
|
-
assert_not_available_value("image:width", width) do
|
60
|
-
image_item.width = width
|
61
|
-
end
|
62
|
-
|
63
|
-
image_item.do_validate = false
|
64
|
-
width = "10.0"
|
65
|
-
image_item.width = width
|
66
|
-
assert_equal(width.to_i, image_item.width)
|
67
|
-
|
68
|
-
image_item.width = nil
|
69
|
-
assert_nil(image_item.width)
|
70
|
-
end
|
71
|
-
|
72
|
-
def test_positive_integer
|
73
|
-
channel = RDF::Channel.new
|
74
|
-
|
75
|
-
channel.sy_updateFrequency = nil
|
76
|
-
assert_nil(channel.sy_updateFrequency)
|
77
|
-
|
78
|
-
freq = 10
|
79
|
-
channel.sy_updateFrequency = freq
|
80
|
-
assert_equal(freq, channel.sy_updateFrequency)
|
81
|
-
|
82
|
-
freq = 10.0
|
83
|
-
channel.sy_updateFrequency = freq
|
84
|
-
assert_equal(freq, channel.sy_updateFrequency)
|
85
|
-
|
86
|
-
freq = "10"
|
87
|
-
channel.sy_updateFrequency = freq
|
88
|
-
assert_equal(freq.to_i, channel.sy_updateFrequency)
|
89
|
-
|
90
|
-
freq = "10.0"
|
91
|
-
assert_not_available_value("sy:updateFrequency", freq) do
|
92
|
-
channel.sy_updateFrequency = freq
|
93
|
-
end
|
94
|
-
|
95
|
-
channel.do_validate = false
|
96
|
-
freq = "10.0"
|
97
|
-
channel.sy_updateFrequency = freq
|
98
|
-
assert_equal(freq.to_i, channel.sy_updateFrequency)
|
99
|
-
|
100
|
-
channel.sy_updateFrequency = nil
|
101
|
-
assert_nil(channel.sy_updateFrequency)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|