bandiera-client 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY +4 -0
- data/lib/bandiera/client.rb +4 -4
- data/lib/bandiera/client/version.rb +1 -1
- data/spec/lib/bandiera/client_spec.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d355a320745dae2b2b2311987766f6c2dae8e5c6
|
4
|
+
data.tar.gz: 568db1b2382fb6638d2160ad69716aaa203d5c43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 685d09170649a035942111d913e2ee9c71ec65f8c69a81f4c79843a444895e87388fe525d4301716ab292b18be71b5b21317e1218f516f0712a7082842ca8355
|
7
|
+
data.tar.gz: f575bbf262113894f7b690d5aff2ec76109295695cdeed2d25321f3f5efc783425329aa77ea5b4ec637e855e33622c453c29900ffd93983853f0a87fa1cfe453
|
data/HISTORY
CHANGED
data/lib/bandiera/client.rb
CHANGED
@@ -54,7 +54,7 @@ module Bandiera
|
|
54
54
|
default_response = false
|
55
55
|
error_msg_prefix = "[Bandiera::Client#get_feature] '#{group} / #{feature} / #{params}'"
|
56
56
|
|
57
|
-
logger.debug
|
57
|
+
logger.debug("[Bandiera::Client#get_feature] calling #{path} with params: #{params}")
|
58
58
|
|
59
59
|
get_and_handle_exceptions(path, params, http_opts, default_response, error_msg_prefix)
|
60
60
|
end
|
@@ -76,7 +76,7 @@ module Bandiera
|
|
76
76
|
default_response = {}
|
77
77
|
error_msg_prefix = "[Bandiera::Client#get_features_for_group] '#{group} / #{params}'"
|
78
78
|
|
79
|
-
logger.debug
|
79
|
+
logger.debug("[Bandiera::Client#get_features_for_group] calling #{path} with params: #{params}")
|
80
80
|
|
81
81
|
get_and_handle_exceptions(path, params, http_opts, default_response, error_msg_prefix)
|
82
82
|
end
|
@@ -94,7 +94,7 @@ module Bandiera
|
|
94
94
|
default_response = {}
|
95
95
|
error_msg_prefix = "[Bandiera::Client#get_all] '#{params}'"
|
96
96
|
|
97
|
-
logger.debug
|
97
|
+
logger.debug("[Bandiera::Client#get_all] calling #{path} with params: #{params}")
|
98
98
|
|
99
99
|
get_and_handle_exceptions(path, params, http_opts, default_response, error_msg_prefix)
|
100
100
|
end
|
@@ -113,7 +113,7 @@ module Bandiera
|
|
113
113
|
|
114
114
|
def get_and_handle_exceptions(path, params, http_opts, return_upon_error, error_msg_prefix, &block)
|
115
115
|
res = get(path, params, http_opts)
|
116
|
-
logger.
|
116
|
+
logger.debug("#{error_msg_prefix} - #{res['warning']}") if res['warning']
|
117
117
|
block.call(res['response']) if block
|
118
118
|
res['response']
|
119
119
|
rescue *EXCEPTIONS_TO_HANDLE => error
|
@@ -69,7 +69,8 @@ describe Bandiera::Client do
|
|
69
69
|
it 'logs the warning' do
|
70
70
|
stub = stub_api_request(url, 'response' => false, 'warning' => 'The group does not exist')
|
71
71
|
|
72
|
-
|
72
|
+
# 2 calls - one for the request, one for the warning
|
73
|
+
expect(logger).to receive(:debug).twice
|
73
74
|
|
74
75
|
response = subject.get_feature(group, feature)
|
75
76
|
|
@@ -149,7 +150,8 @@ describe Bandiera::Client do
|
|
149
150
|
it 'logs the warning' do
|
150
151
|
stub = stub_api_request(url, 'response' => {}, 'warning' => 'The group does not exist')
|
151
152
|
|
152
|
-
|
153
|
+
# 2 calls - one for the request, one for the warning
|
154
|
+
expect(logger).to receive(:debug).twice
|
153
155
|
|
154
156
|
response = subject.get_features_for_group(group)
|
155
157
|
|
@@ -228,7 +230,8 @@ describe Bandiera::Client do
|
|
228
230
|
it 'logs the warning' do
|
229
231
|
stub = stub_api_request(url, 'response' => {}, 'warning' => 'The group does not exist')
|
230
232
|
|
231
|
-
|
233
|
+
# 2 calls - one for the request, one for the warning
|
234
|
+
expect(logger).to receive(:debug).twice
|
232
235
|
|
233
236
|
response = subject.get_all
|
234
237
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bandiera-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Springer Nature
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|