From f461c892447f972f1c07c124814d793c9118062f Mon Sep 17 00:00:00 2001 From: Steven Ou Date: Fri, 27 Jun 2014 22:50:00 -0700 Subject: [PATCH 1/5] support multiple metrics per experiment --- lib/split/configuration.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index 4a0cdaa6..ba0fd17a 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -109,10 +109,12 @@ def metrics @metrics = {} if self.experiments self.experiments.each do |key, value| - metric_name = value_for(value, :metric).to_sym rescue nil - if metric_name - @metrics[metric_name] ||= [] - @metrics[metric_name] << Split::Experiment.new(key) + metrics = value_for(value, :metric).to_sym rescue nil + Array(metrics).each do |metric_name| + if metric_name + @metrics[metric_name] ||= [] + @metrics[metric_name] << Split::Experiment.new(key) + end end end end From 25bff08f7b53ed38b84c18a2a7a43ca81286227a Mon Sep 17 00:00:00 2001 From: Steven Ou Date: Fri, 27 Jun 2014 23:49:15 -0700 Subject: [PATCH 2/5] bug fix --- lib/split/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index ba0fd17a..095725d5 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -109,7 +109,7 @@ def metrics @metrics = {} if self.experiments self.experiments.each do |key, value| - metrics = value_for(value, :metric).to_sym rescue nil + metrics = value_for(value, :metric) rescue nil Array(metrics).each do |metric_name| if metric_name @metrics[metric_name] ||= [] From 347476a856f184ef801907aa60e393c2efa0a513 Mon Sep 17 00:00:00 2001 From: Steven Ou Date: Fri, 27 Jun 2014 23:49:34 -0700 Subject: [PATCH 3/5] bug fix --- lib/split/configuration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index 095725d5..147394a9 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -111,7 +111,7 @@ def metrics self.experiments.each do |key, value| metrics = value_for(value, :metric) rescue nil Array(metrics).each do |metric_name| - if metric_name + if metric_name.to_sym @metrics[metric_name] ||= [] @metrics[metric_name] << Split::Experiment.new(key) end From 37314797ce19752578c4bb3202ea98789cb75918 Mon Sep 17 00:00:00 2001 From: Steven Ou Date: Sat, 28 Jun 2014 10:03:28 -0700 Subject: [PATCH 4/5] fix to pass spec --- lib/split/configuration.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index 147394a9..b0cc3d3b 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -111,9 +111,9 @@ def metrics self.experiments.each do |key, value| metrics = value_for(value, :metric) rescue nil Array(metrics).each do |metric_name| - if metric_name.to_sym - @metrics[metric_name] ||= [] - @metrics[metric_name] << Split::Experiment.new(key) + if metric_name + @metrics[metric_name.to_sym] ||= [] + @metrics[metric_name.to_sym] << Split::Experiment.new(key) end end end From 832cc802f5c8cdf1f25b212992361cd25fd3b387 Mon Sep 17 00:00:00 2001 From: Steven Ou Date: Mon, 30 Jun 2014 14:00:02 -0700 Subject: [PATCH 5/5] add elb health check to exclusion list --- lib/split/configuration.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/split/configuration.rb b/lib/split/configuration.rb index b0cc3d3b..41922c55 100644 --- a/lib/split/configuration.rb +++ b/lib/split/configuration.rb @@ -85,6 +85,7 @@ def bots 'DigitalPersona Fingerprint Software' => 'HP Fingerprint scanner', 'ShowyouBot' => 'Showyou iOS app spider', 'ZyBorg' => 'Zyborg? Hmmm....', + 'ELB-HealthChecker' => 'ELB Health Check' } end