Set pro/enterprise feature flags on runtime (#947)
Set pro/enterprise feature flags on runtime (#947)

Historically ENV vars were not enabled when building an app on Heroku,
so we couldn't rely on any checks made in environment.js file (like for
example checking for process.env.TRAVIS_PRO). At some point it must have
changed, because on travis-pro the config is properly compiled with a
proper value for `pro-version` feature flag, but the Travis CI
Enterprise setup relies on the old method of updating the config on
runtime.

This commit makes the ruby server update the pro-version and
enterprise-version feature flags at the time of making request and thus
it remove reliance on availability of ENV vars during build time.

Additionally we don't know if accessing ENV vars when deploying to
heroku is something supported, so this way of doing things is more
future proof. That said, once we confirm that we can rely on availability
of ENV vars during Heroku deploys we could think about simplifying the
config code.
fotinakis/travis-web,fotinakis/travis-web,fotinakis/travis-web,travis-ci/travis-web,travis-ci/travis-web,travis-ci/travis-web,fotinakis/travis-web,travis-ci/travis-web