glebtv-httpclient 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/httpclient/lru_cache.rb +1 -1
- data/lib/httpclient/version.rb +1 -1
- data/spec/lru_spec.rb +22 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbfa21688174465890638f114dc5c7112585a4fb
|
4
|
+
data.tar.gz: 6c5238d001ceff26fa29e4fbea423c12bd356a30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: deaeacee1fabae239a77494b29b3d39c30a895b0e45cc21d3bed00535bb04718ec87f38d0523f1dfe85d9622a0b0cbcb0cbff6864dc5283d3091191c83e5a004
|
7
|
+
data.tar.gz: af09297a1507784c998f3f2838f1792775fa43be5b07f06b5b5bb82fc032a49a61a71965765a879f67ea7889b15ee15925ba4b9751cc8d6a9503734480e052e8
|
data/Gemfile.lock
CHANGED
@@ -45,8 +45,11 @@ GEM
|
|
45
45
|
rspec-expectations (2.14.5)
|
46
46
|
diff-lcs (>= 1.1.3, < 2.0)
|
47
47
|
rspec-mocks (2.14.5)
|
48
|
+
rubinius-compiler (2.0.4)
|
48
49
|
rubinius-coverage (2.0.3)
|
49
|
-
rubinius-debugger (2.0.
|
50
|
+
rubinius-debugger (2.0.2)
|
51
|
+
rubinius-compiler (~> 2.0)
|
52
|
+
rubysl-readline (~> 2.0)
|
50
53
|
rubinius-developer_tools (2.0.0)
|
51
54
|
rubinius-coverage (~> 2.0)
|
52
55
|
rubinius-debugger (~> 2.0)
|
data/lib/httpclient/lru_cache.rb
CHANGED
data/lib/httpclient/version.rb
CHANGED
data/spec/lru_spec.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe HTTPClient::LRUCache do
|
5
|
+
before :each do
|
6
|
+
@cache = subject.class.new(ttl: 3, max_size: 2, soft_ttl: 2)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'expires values' do
|
10
|
+
@cache.fetch 'test' do
|
11
|
+
2
|
12
|
+
end.should eq 2
|
13
|
+
@cache.fetch 'test' do
|
14
|
+
3
|
15
|
+
end.should eq 2
|
16
|
+
sleep 4
|
17
|
+
@cache.fetch 'test' do
|
18
|
+
4
|
19
|
+
end.should eq 4
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
@@ -196,6 +196,7 @@ files:
|
|
196
196
|
- spec/http_message_spec.rb
|
197
197
|
- spec/httpclient_spec.rb
|
198
198
|
- spec/keepalive_spec.rb
|
199
|
+
- spec/lru_spec.rb
|
199
200
|
- spec/spec_helper.rb
|
200
201
|
- spec/support/1024x768.gif
|
201
202
|
- spec/support/1x1.png
|
@@ -257,6 +258,7 @@ test_files:
|
|
257
258
|
- spec/http_message_spec.rb
|
258
259
|
- spec/httpclient_spec.rb
|
259
260
|
- spec/keepalive_spec.rb
|
261
|
+
- spec/lru_spec.rb
|
260
262
|
- spec/spec_helper.rb
|
261
263
|
- spec/support/1024x768.gif
|
262
264
|
- spec/support/1x1.png
|