px-service-client 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/px/service/client/caching.rb +7 -9
- data/lib/px/service/client/version.rb +1 -1
- data/px-service-client.gemspec +2 -2
- metadata +2 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e1b9f1c89d04e85c5a9651110610cd09db6ef51
|
4
|
+
data.tar.gz: c7c29ca34280c62c4bdfb5f509975d2f805b9a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb8754feff57a33821f4f7fb1fe0e3f0e918f127fd339874a7e3e74ed4b1213827764a4b4cc4bc10dad400db052f86094a2898e2e97733de526cb92ab3229dc0
|
7
|
+
data.tar.gz: 6306f318dc756f99d0bcd5a553e2ec77a58fc8bb1afa150aecd246ca355246c6332b3d46673486a2f7759fafc903149b3e85861b996335f281067f6e63367d78
|
@@ -46,16 +46,14 @@ module Px::Service::Client
|
|
46
46
|
@cache_config || self.class.caching
|
47
47
|
end
|
48
48
|
|
49
|
-
def cache_request(url, strategy: nil,
|
50
|
-
strategy ||= config.cache_strategy
|
51
|
-
|
49
|
+
def cache_request(url, strategy: nil, policy_group: config.cache_options[:policy_group], expires_in: config.cache_expiry, refresh_probability: 1, &block)
|
52
50
|
case strategy
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
51
|
+
when :last_resort
|
52
|
+
cache_last_resort(url, policy_group: policy_group, expires_in: expires_in, refresh_probability: refresh_probability, &block)
|
53
|
+
when :first_resort
|
54
|
+
cache_first_resort(url, policy_group: policy_group, expires_in: expires_in, &block)
|
55
|
+
else
|
56
|
+
no_cache(&block)
|
59
57
|
end
|
60
58
|
end
|
61
59
|
|
data/px-service-client.gemspec
CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "pry"
|
30
30
|
spec.add_development_dependency "pry-byebug"
|
31
31
|
spec.add_development_dependency "vcr"
|
32
|
-
spec.add_development_dependency "guard"
|
33
|
-
spec.add_development_dependency "guard-rspec"
|
32
|
+
#spec.add_development_dependency "guard"
|
33
|
+
#spec.add_development_dependency "guard-rspec"
|
34
34
|
spec.add_development_dependency "rspec", "~> 2.99"
|
35
35
|
spec.add_development_dependency "timecop", "~> 0.5"
|
36
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: px-service-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Micacchi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: will_paginate
|
@@ -164,34 +164,6 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: guard
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
171
|
-
- - ">="
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
181
|
-
- !ruby/object:Gem::Dependency
|
182
|
-
name: guard-rspec
|
183
|
-
requirement: !ruby/object:Gem::Requirement
|
184
|
-
requirements:
|
185
|
-
- - ">="
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
188
|
-
type: :development
|
189
|
-
prerelease: false
|
190
|
-
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
requirements:
|
192
|
-
- - ">="
|
193
|
-
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
195
167
|
- !ruby/object:Gem::Dependency
|
196
168
|
name: rspec
|
197
169
|
requirement: !ruby/object:Gem::Requirement
|