diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-12-16 20:09:52 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-12-16 21:02:25 +0300 |
commit | e394d2872aa3a95d0e5cd13afe8e0de1ab01213a (patch) | |
tree | 52134828c91f10bd81ff055510e2f7a9e1ce9e73 /lib/gitlab/checks/force_push.rb | |
parent | 3e1442766f3e2327e1e620b3b11623b09c35142b (diff) |
Implement final review comments from @rymai.
- `raise "string"` raises a `RuntimeError` - no need to be explicit
- Remove top-level comment in the `RevList` class
- Use `%w()` instead of `%w[]`
- Extract an `environment_variables` method to cache `env.slice(*ALLOWED_VARIABLES)`
- Use `start_with?` for env variable validation instead of regex match
- Validation specs for each allowed environment variable were identical. Build them dynamically.
- Minor change to `popen3` expectation.
Diffstat (limited to 'lib/gitlab/checks/force_push.rb')
-rw-r--r-- | lib/gitlab/checks/force_push.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/checks/force_push.rb b/lib/gitlab/checks/force_push.rb index e1c967a1f89..de0c9049ebf 100644 --- a/lib/gitlab/checks/force_push.rb +++ b/lib/gitlab/checks/force_push.rb @@ -13,7 +13,7 @@ module Gitlab if exit_status == 0 missed_ref.present? else - raise RuntimeError, "Got a non-zero exit code while calling out to `git rev-list` in the force-push check." + raise "Got a non-zero exit code while calling out to `git rev-list` in the force-push check." end end end |