feedjira 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/CHANGELOG.md +14 -0
- data/Gemfile +1 -0
- data/feedjira.gemspec +4 -4
- data/lib/feedjira/feed_utilities.rb +2 -1
- data/lib/feedjira/version.rb +1 -1
- data/spec/feedjira/feed_entry_utilities_spec.rb +11 -11
- data/spec/feedjira/feed_spec.rb +165 -164
- data/spec/feedjira/feed_utilities_spec.rb +35 -35
- data/spec/feedjira/parser/atom_entry_spec.rb +22 -26
- data/spec/feedjira/parser/atom_feed_burner_entry_spec.rb +9 -9
- data/spec/feedjira/parser/atom_feed_burner_spec.rb +12 -12
- data/spec/feedjira/parser/atom_spec.rb +20 -18
- data/spec/feedjira/parser/google_docs_atom_entry_spec.rb +3 -3
- data/spec/feedjira/parser/google_docs_atom_spec.rb +5 -5
- data/spec/feedjira/parser/itunes_rss_item_spec.rb +15 -15
- data/spec/feedjira/parser/itunes_rss_owner_spec.rb +2 -2
- data/spec/feedjira/parser/itunes_rss_spec.rb +15 -15
- data/spec/feedjira/parser/rss_entry_spec.rb +18 -23
- data/spec/feedjira/parser/rss_feed_burner_entry_spec.rb +18 -23
- data/spec/feedjira/parser/rss_feed_burner_spec.rb +13 -13
- data/spec/feedjira/parser/rss_spec.rb +11 -11
- data/spec/feedjira/preprocessor_spec.rb +2 -2
- data/spec/sample_feeds/itunes.xml +0 -1
- data/spec/spec_helper.rb +2 -0
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b88451721d838b83ae68e58043481e104794532a
|
4
|
+
data.tar.gz: 21e9e6e48a552ced54dd1e8129b4cf10d7e64659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fc99f45a03df848dc588481d75a84963a782f8555fb3a321397c6f12a67cc66b2bbde226c46a34fb9fcedf9b197d7d23933b6e5fc89ba80fd29f31ccd4c374
|
7
|
+
data.tar.gz: f5492b704021be34b4ea414c1b7697aa3b0fd72a18e26eee887c58d65a3322afac186daba0d786929011f92f8c3537df60c1b2047736a91b1aa78a519e495cad
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Feedjira Changelog
|
2
2
|
|
3
|
+
## 1.4.0
|
4
|
+
|
5
|
+
* General
|
6
|
+
* Test OX on Travis
|
7
|
+
* Loosen dependency requirements
|
8
|
+
|
9
|
+
* Enhancements
|
10
|
+
* Upgrade to SaxMachine 1 [#234][]
|
11
|
+
* Upgrade to Rspec 3
|
12
|
+
* Move lstrip before preprocess [#216][]
|
13
|
+
|
14
|
+
[#216]: https://github.com/feedjira/feedjira/pull/216
|
15
|
+
[#234]: https://github.com/feedjira/feedjira/pull/234
|
16
|
+
|
3
17
|
## 1.3.1
|
4
18
|
|
5
19
|
* Bug fixes
|
data/Gemfile
CHANGED
data/feedjira.gemspec
CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
21
|
|
22
|
-
s.add_dependency 'sax-machine', '~> 0
|
23
|
-
s.add_dependency 'curb', '~> 0.8
|
24
|
-
s.add_dependency 'loofah', '~> 2.0
|
22
|
+
s.add_dependency 'sax-machine', '~> 1.0'
|
23
|
+
s.add_dependency 'curb', '~> 0.8'
|
24
|
+
s.add_dependency 'loofah', '~> 2.0'
|
25
25
|
|
26
|
-
s.add_development_dependency 'rspec', '~>
|
26
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
27
27
|
end
|
data/lib/feedjira/version.rb
CHANGED
@@ -10,14 +10,14 @@ describe Feedjira::FeedUtilities do
|
|
10
10
|
describe "handling dates" do
|
11
11
|
it "should parse an ISO 8601 formatted datetime into Time" do
|
12
12
|
time = @klass.new.parse_datetime("2008-02-20T8:05:00-010:00")
|
13
|
-
time.class.
|
14
|
-
time.
|
13
|
+
expect(time.class).to eq Time
|
14
|
+
expect(time).to eq Time.parse_safely("Wed Feb 20 18:05:00 UTC 2008")
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should parse a ISO 8601 with milliseconds into Time" do
|
18
18
|
time = @klass.new.parse_datetime("2013-09-17T08:20:13.931-04:00")
|
19
|
-
time.class.
|
20
|
-
time.
|
19
|
+
expect(time.class).to eq Time
|
20
|
+
expect(time).to eq Time.parse_safely("Tue Sep 17 12:20:13 UTC 2013")
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -28,20 +28,20 @@ describe Feedjira::FeedUtilities do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "doesn't fail when no elements are defined on includer" do
|
31
|
-
expect { @klass.new.sanitize!
|
31
|
+
expect { @klass.new.sanitize! }.to_not raise_error
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should provide a sanitized title" do
|
35
35
|
new_title = "<script>this is not safe</script>" + @entry.title
|
36
36
|
@entry.title = new_title
|
37
|
-
@entry.title.sanitize.
|
37
|
+
expect(@entry.title.sanitize).to eq Loofah.scrub_fragment(new_title, :prune).to_s
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should sanitize content in place" do
|
41
41
|
new_content = "<script>" + @entry.content
|
42
42
|
@entry.content = new_content.dup
|
43
|
-
@entry.content.sanitize
|
44
|
-
@entry.content.
|
43
|
+
expect(@entry.content.sanitize!).to eq Loofah.scrub_fragment(new_content, :prune).to_s
|
44
|
+
expect(@entry.content).to eq Loofah.scrub_fragment(new_content, :prune).to_s
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should sanitize things in place" do
|
@@ -54,9 +54,9 @@ describe Feedjira::FeedUtilities do
|
|
54
54
|
cleaned_content = Loofah.scrub_fragment(@entry.content, :prune).to_s
|
55
55
|
|
56
56
|
@entry.sanitize!
|
57
|
-
@entry.title.
|
58
|
-
@entry.author.
|
59
|
-
@entry.content.
|
57
|
+
expect(@entry.title).to eq cleaned_title
|
58
|
+
expect(@entry.author).to eq cleaned_author
|
59
|
+
expect(@entry.content).to eq cleaned_content
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|