Ah, sorry `in almost cases` is wrong.
The correct is `in non production cases`.
It is rare case, so not critical.
But for me, I don't see the strong merit 

```rb
opts[:host] = @host.sub(DEFAULT_ENDPOINT, NEW_DEFAULT_IMPORT_ENDPOINT)
opts[:host] = @host.sub(NEW_DEFAULT_ENDPOINT, NEW_DEFAULT_IMPORT_ENDPOINT)
```

is better than current `if` statement.