[Rails5] Fix Ci::Pipeline validator for source
[Rails5] Fix Ci::Pipeline validator for source

In Rails 5 enum returns value instead of key.
For this case, the `NilClass` is returned instead of `unknown` which
breaks validation of the `source` attribute.

This commit adds a custom validatior that returns the correct result for
both rails4 and rails5.

stoplightio/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,axilleas/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,dreampet/gitlab,iiet/iiet-git,iiet/iiet-git,jirutka/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,iiet/iiet-git,axilleas/gitlabhq