File tree Expand file tree Collapse file tree
lib/octocatalog-diff/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,13 @@ def run(opts = {})
3737
3838 private
3939
40- def find_script ( default_script , override_script_path )
40+ # PRIVATE: Determine the path to the script to execute, taking into account the default script
41+ # location and the optional override script path.
42+ #
43+ # @param default_script [String] Path to script, relative to `scripts` directory
44+ # @param override_script_path [String] Optional directory with override script
45+ # @return [String] Full path to script
46+ def find_script ( default_script , override_script_path = nil )
4147 if override_script_path
4248 script_test = File . join ( override_script_path , File . basename ( default_script ) )
4349 if File . file? ( script_test )
@@ -54,6 +60,9 @@ def find_script(default_script, override_script_path)
5460 raise Errno ::ENOENT , "Unable to locate default script '#{ default_script } '"
5561 end
5662
63+ # PRIVATE: Assert that a directory exists (and is a directory). Raise error if not.
64+ #
65+ # @param dir [String] Directory to test
5766 def assert_directory_exists ( dir )
5867 return if File . directory? ( dir )
5968 raise Errno ::ENOENT , "Invalid directory '#{ dir } '"
You can’t perform that action at this time.
0 commit comments