
This extracts the logic for generating the `system_options` array in the `replace_version_and_checksum` method into a separate `generate_system_options` method. This logic is becoming more complex (after recent changes) and manually testing it is a pain, so this change is intended to allow us to add tests. The tests added here provide 100% coverage for the method.