hentry_consumer 0.6.0 → 0.7.0
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.
- data/README.md +1 -1
- data/lib/hentry_consumer/h_feed.rb +2 -2
- data/lib/hentry_consumer/version.rb +1 -1
- data/spec/lib/hentry_consumer/h_feed_spec.rb +12 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -2,6 +2,18 @@ require 'hentry_consumer'
|
|
2
2
|
|
3
3
|
describe HentryConsumer::HFeed do
|
4
4
|
let(:feed) { HentryConsumer.parse(File.open("spec/support/example.html")) }
|
5
|
+
|
6
|
+
describe "caching" do
|
7
|
+
it "returns false on 304" do
|
8
|
+
HentryConsumer::HFeed.any_instance.stub(:open).
|
9
|
+
with("spec/support/example.html", last_modified: Time.parse("Jan 1 2012")).
|
10
|
+
and_raise( OpenURI::HTTPError.new("304 Not Modified", nil) )
|
11
|
+
|
12
|
+
lambda { HentryConsumer::HFeed.new("spec/support/example.html", last_modified: Time.parse("Jan 1 2012")) }.
|
13
|
+
should raise_error OpenURI::HTTPError, "304 Not Modified"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
5
17
|
|
6
18
|
describe "#to_json" do
|
7
19
|
let(:json) { JSON.parse(feed.to_json) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hentry_consumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-12-
|
13
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|