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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb898f19dc7be13765ab349587164a43dafcfd02
4
- data.tar.gz: 863ea9ce83f9389dd075e851a00e9e330aa0ea6b
3
+ metadata.gz: b88451721d838b83ae68e58043481e104794532a
4
+ data.tar.gz: 21e9e6e48a552ced54dd1e8129b4cf10d7e64659
5
5
  SHA512:
6
- metadata.gz: 5566f914b0fb53b972f71eb4d3d78b0b42a0f04fca73b9166b4477e3a1324a897275654b363bbb23d3a1330688b44841a380804ebaad6dd04599ac4e21de5f44
7
- data.tar.gz: a3d0592700a2529aaf3602659e556ce809395042d4d3b92332454bf102238fed5ed0f44b026ff29a99341297bda19aa0cbdc33d72595f5bd7858fb9d8e8dcb05
6
+ metadata.gz: f2fc99f45a03df848dc588481d75a84963a782f8555fb3a321397c6f12a67cc66b2bbde226c46a34fb9fcedf9b197d7d23933b6e5fc89ba80fd29f31ccd4c374
7
+ data.tar.gz: f5492b704021be34b4ea414c1b7697aa3b0fd72a18e26eee887c58d65a3322afac186daba0d786929011f92f8c3537df60c1b2047736a91b1aa78a519e495cad
data/.travis.yml CHANGED
@@ -11,3 +11,8 @@ rvm:
11
11
  - 2.0.0
12
12
  - 2.1.0
13
13
  - rbx-2
14
+
15
+ env:
16
+ matrix:
17
+ - HANDLER="nokogiri"
18
+ - HANDLER="ox"
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
@@ -6,4 +6,5 @@ gem 'pry'
6
6
 
7
7
  group :test do
8
8
  gem 'rake'
9
+ gem 'ox'
9
10
  end
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.2.1'
23
- s.add_dependency 'curb', '~> 0.8.1'
24
- s.add_dependency 'loofah', '~> 2.0.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', '~> 2.14.0'
26
+ s.add_development_dependency 'rspec', '~> 3.0'
27
27
  end
@@ -11,8 +11,9 @@ module Feedjira
11
11
 
12
12
  module ClassMethods
13
13
  def parse(xml, &block)
14
+ xml = xml.lstrip
14
15
  xml = preprocess(xml) if preprocess_xml
15
- super xml.lstrip, &block
16
+ super xml, &block
16
17
  end
17
18
 
18
19
  def preprocess(xml)
@@ -1,3 +1,3 @@
1
1
  module Feedjira
2
- VERSION = '1.3.1'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -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.should == Time
14
- time.should == Time.parse_safely("Wed Feb 20 18:05:00 UTC 2008")
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.should == Time
20
- time.should == Time.parse_safely("Tue Sep 17 12:20:13 UTC 2013")
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! }.to_not raise_error
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.should == Loofah.scrub_fragment(new_title, :prune).to_s
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!.should == Loofah.scrub_fragment(new_content, :prune).to_s
44
- @entry.content.should == Loofah.scrub_fragment(new_content, :prune).to_s
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.should == cleaned_title
58
- @entry.author.should == cleaned_author
59
- @entry.content.should == cleaned_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