airship-ruby 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/airship-ruby.gemspec +1 -1
- data/lib/airship-ruby.rb +17 -0
- 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: 10b67c13eae597d9734339b612af2911162085a5
|
4
|
+
data.tar.gz: f6ef3589fbbc65c2707d52eb60cf94cab521a420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a5cc2e58db4d1981f89e0b320191476bbf852bc5cf1cc629f22294e8f6d19a6b83ac2e50aafd426fe25071783dd2a34bbd63e204739ee98619f052dae7b801e
|
7
|
+
data.tar.gz: 1fea8cf3b1654d14f01c5914282e7d489bd625d8fce038158864af36f2e2d5722b74eceaf3c49c82e2b3e8a8bb033894f34a574d7ffd6243c3d7eeeb48a782f9
|
data/airship-ruby.gemspec
CHANGED
data/lib/airship-ruby.rb
CHANGED
@@ -204,6 +204,7 @@ class Airship
|
|
204
204
|
@gate_stats_watcher.execute
|
205
205
|
end
|
206
206
|
@initialization_lock.release
|
207
|
+
self
|
207
208
|
end
|
208
209
|
|
209
210
|
def enabled?(control_short_name, object, default_value=false)
|
@@ -257,6 +258,8 @@ class Airship
|
|
257
258
|
stats['sdk_gate_eligibility'] = is_eligible
|
258
259
|
stats['sdk_gate_type'] = 'value'
|
259
260
|
|
261
|
+
self._enrich_with_metadata(control_short_name, stats)
|
262
|
+
|
260
263
|
stats['sdk_version'] = sdk_version
|
261
264
|
stats['sdk_id'] = @@sdk_id
|
262
265
|
|
@@ -319,6 +322,8 @@ class Airship
|
|
319
322
|
stats['sdk_gate_eligibility'] = is_eligible
|
320
323
|
stats['sdk_gate_type'] = 'variation'
|
321
324
|
|
325
|
+
self._enrich_with_metadata(control_short_name, stats)
|
326
|
+
|
322
327
|
stats['sdk_version'] = sdk_version
|
323
328
|
stats['sdk_id'] = @@sdk_id
|
324
329
|
|
@@ -381,6 +386,8 @@ class Airship
|
|
381
386
|
stats['sdk_gate_eligibility'] = is_eligible
|
382
387
|
stats['sdk_gate_type'] = 'eligibility'
|
383
388
|
|
389
|
+
self._enrich_with_metadata(control_short_name, stats)
|
390
|
+
|
384
391
|
stats['sdk_version'] = sdk_version
|
385
392
|
stats['sdk_id'] = @@sdk_id
|
386
393
|
|
@@ -394,6 +401,16 @@ class Airship
|
|
394
401
|
|
395
402
|
protected
|
396
403
|
|
404
|
+
def _enrich_with_metadata(control_short_name, stats)
|
405
|
+
control_info = @gating_info_map[control_short_name]
|
406
|
+
|
407
|
+
if !control_info.nil?
|
408
|
+
stats['sdk_gate_control_id'] = control_info['id']
|
409
|
+
end
|
410
|
+
|
411
|
+
stats['sdk_env_id'] = @gating_info['env']['id']
|
412
|
+
end
|
413
|
+
|
397
414
|
def _get_gating_info_map(gating_info)
|
398
415
|
map = {}
|
399
416
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airship-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airship Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|