-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LoadRaster and LoadVector: refactor to remove Dir.chdir calls, and to…
… improve maintainability (#851) * VectorNormalizer and LoadVector: better variable and parameter names * load_vector_spec.rb: more precise expectation for normalizer.run_shp2pgsql call * Robots::DorRepo::GisDelivery::LoadVector: log an error on (presumed) UTF-8 decoding error fallthrough, add test case for fallthrough logic the Dir.chdir hack in the tests should go away in the commit that gets rid of Dir.chdir * add test for successful codepath of VectorNormalizer#run_shp2pgsql also, remove unnecessary check of return value from system(cmd, exception: true) call, since per docs, it will raise on failed execution or non-zero exit code (instead of returning nil or false, respectively). * LoadVector#perform_work: refactor to avoid Dir.chdir adjust tests: * no longer need to undo effect of Dir.chdir(tmpdir) * file paths for sql generation and loading now include tmpdir * LoadRaster#perform_work: var name improvements, comment fix * LoadRaster: refactor to get rid of Dir.chdir call * move #run_shp2pgsql from VectorNormalizer to LoadVector, make it private LoadVector is the only consumer of the method, and all the info the method relies on is passed to it via params. * comment cleanup * LoadVector#perform_work: turn a TODO/question comment into an issue * remove obsoleted sidekiq config warning
- Loading branch information
1 parent
a726ce2
commit d458c16
Showing
6 changed files
with
87 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters