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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e91b9e1a396db568b3b30155336363538b80fff6
4
- data.tar.gz: 72792c99dc994aeed39b1e0a0b586c486bc96e03
3
+ metadata.gz: 9e1b9f1c89d04e85c5a9651110610cd09db6ef51
4
+ data.tar.gz: c7c29ca34280c62c4bdfb5f509975d2f805b9a1b
5
5
  SHA512:
6
- metadata.gz: 1380aa22511673fc12aef1b7e67d165e002429793d6aefebd6786c9d1f0f65c1db2ec80c9921c6b5382936aacfb3fd437644b7c7a8ceac2ab41c7132aef36bb7
7
- data.tar.gz: 45a304051466c4540fbc41dfe21efc454d973e119f4d8637cbce0c947fc213dc3980ea4289fef4f2368d385150afbe01c47d8b91ea19c580aa919c16f74d6604
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, **options, &block)
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
- when :first_resort
54
- cache_first_resort(url, policy_group: config.cache_options[:policy_group], expires_in: config.cache_expiry, **options, &block)
55
- when :last_resort
56
- cache_last_resort(url, policy_group: config.cache_options[:policy_group], expires_in: config.cache_expiry, **options, &block)
57
- else
58
- no_cache(&block)
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
 
@@ -1,7 +1,7 @@
1
1
  module Px
2
2
  module Service
3
3
  module Client
4
- VERSION = "1.2.1"
4
+ VERSION = "1.2.2"
5
5
  end
6
6
  end
7
7
  end
@@ -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.1
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-03-31 00:00:00.000000000 Z
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