Refactor and modularise run_cd4pe_job task #57
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
High Level
Logger,GZipHelper,CD4PEClient,CD4PEJobRunner) into separate files undertasks/run_cd4pe_job/.run_cd4pe_job.jsonto include the new files directory.RunCD4PEJob::CD4PEJobRunner.run_system_cmd.Where This Started
While investigating a bug where some Rake tasks were causing a failure;
This ended up being due to:
Encoding.external_encoding => 'US-ASCII'. WhereOpen3.capture2ewould return the output using this encoding.While the following patch does resolve the issue in isolation, a longer term solution should be investigated to ensure
Encoding.external_encodingshould be UTF-8 or at least configurable to the expected encoding.Why Such A Large Change?
While attempting to investigate the bug, as a whole the existing file structure made it difficult to debug.
This PR includes a restructure of the existing code, while using current Ruby best practice.
Each class has been moved into their own file, while attempting define each classes responsibilities inline with their purpose.
YARD comments have been added to most methods to increase in-code documentation.