Created
May 5, 2015 23:39
-
-
Save jeffday/d7d7b7ada7008ec3b1e1 to your computer and use it in GitHub Desktop.
CDN AB Test Proc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :s3_host_alias => Proc.new{ | |
| if Rails.env.test? or Rails.env.development? | |
| $CDN_HOST | |
| else | |
| bit = rand(4) | |
| case bit | |
| when 0 | |
| $CDN_HOST | |
| when 1 | |
| $CDN_HOST_TWO | |
| when 2 | |
| $CDN_HOST_THREE | |
| when 3 | |
| $CDN_HOST_FOUR | |
| end | |
| end | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment