def human!
Abingo.cache.fetch("Abingo::is_human(#{self.identity})", {:expires_in => self.expires_in(true)}) do
participating_tests = Abingo.cache.read("Abingo::participating_tests::#{self.identity}") || []
if (@@options[:expires_in_for_bots] && !participating_tests.blank?)
Abingo.cache.write("Abingo::participating_tests::#{self.identity}", participating_tests, {:expires_in => self.expires_in(true)})
end
participating_tests.each do |test_name|
viewed_alternative = find_alternative_for_user(test_name,
Abingo::Experiment.alternatives_for_test(test_name))
Alternative.score_participation(test_name, viewed_alternative)
if conversions = Abingo.cache.read("Abingo::conversions(#{self.identity},#{test_name}")
conversions.times { Alternative.score_conversion(test_name, viewed_alternative) }
end
end
true
end
end