would it be better to unify the logic?

```
if rest_app.deployment_type == 'binary'
  if is_file
    deploy_local_file(...)
  elsif is_url
    deploy_file_from_url(...)
  else
    raise ...
  end
elsif is_file || is_url
  raise ...
else
  deploy_git_ref(...)
end
```